El día Tuesday 28 February 2006 22:47, Anthony Chilco escribió: > Hi Fred, > There are two problems: The function has no declared type and 'a' is > defined twice, in the function declaration and in the function body. > This works (at least in OOo 2.0.1): > > Function addit (a as integer)as integer > a = a + 1 > addit = a > End Function > > So does this: > > Function addit (a as integer)as integer > addit = a + 1 > End Function > > > tc > > Howard Coles Jr. wrote: > >On Tuesday 28 February 2006 18:08, Fred Grant wrote: > >> In the IDE I have: > >> Function addit (a) > >> dim a as integer > >> a = a + 1 > >> addit = a > >> End Function > >>In cell A2 when I enter a user function such as =addit(A1) the screen > >>freezes for a long time. If I try to close the program I get "document > >>cannot be closed while a link is being updated". > >> > >>I have ver 1.1.2 on Fedora Core2 and I've done things like this in the > >>past with no problem. > >> > >>Any thoughts? > > > >Try giving your variable a name different than the function name. That > > may be causing your problems. I'm by NO means a knowledgeable person on > > this, but from what programming I have studied this would be bad thing.
In general, this is a bad practice to assign values to formal parameters. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]