DECLARE (was Re: Filepro-list Digest, Vol 78, Issue 28)

Kenneth Brody kenbrody at spamcop.net
Fri Jul 23 09:29:36 PDT 2010


On 7/23/2010 11:43 AM, Richard Kreiss wrote:
[...]
>>>>>> DECLARE generates no executable code, and need not be reached during
>>>>>> execution.
[...]
>> DIM doesn't generate executable code, and need not be reached during execution.
[..]
> I have run into the same issue with arrays.  I have found that the dim foobar() needs to occur prior to using the array. Never considered that this might be a "bug" if placed after
> Dummy variables, declared variables can be placed anywhere in the processing table.  My preference, in most cases is at the top of the processing table.
[...]

The claim up-thread was that the declaration must be executed in order to 
examine the variable's value inside the debugger.

There's a difference between "the declaration must be executed before the 
variable is used" and "the declaration must appear higher up in the source 
code than any reference to it".

-- 
Kenneth Brody


More information about the Filepro-list mailing list