Arrays in sort/select processing
John Esak
john at valar.com
Mon Dec 11 10:14:36 PST 2006
Yes,
What Bob says below is true. Arrays must be DIMensioned on the processing
table *physically* above the line where you first *use* the array for any
purpose. He is also correct in stating that the DIMensioining does not have
to be encountered by the processing... it gets compiled into the program no
matter whether your processing pointer falls through it or not (if line true
or false, no matter). So, it is also not useful to put all your
DIMensioning statements in a subroutine and do a GOSUB to that routine. The
DIM actions just have to be physically above any processing that references
them.
John Esak
> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.com]On
> Behalf Of Bob Stockler
> Sent: Monday, December 11, 2006 11:18 AM
> To: filepro-list at lists.celestial.com
> Subject: Re: Arrays in sort/select processing
>
>
> Rodgers Hemer wrote (on Sun, Dec 10, 2006 at 08:09:46PM -0800):
>
> | If: x eq ""
> | Then: gosub setup
> | If:
> | Then: y=y(3,.0.g) + "1"
> | If: y gt n
> | Then: end
> | If: 2 eq box[y] <===== Failure
> point at left
> | bracket when dcabe checks the syntax
> | Then: select
> | If:
> | Then: end
> | setup If:
> | Then: dim box[100]:aa
> ^^^^^^^^^^^^^^^^^^^^^
> I believe it's required to dimension an array on a line in
> the processing above any line where the array is referenced.
> I don't -think- the line where it's dimensioned even needs
> to be encountered in the processing.
>
> Try moving it up.
>
> Bob
>
> --
> Bob Stockler +-+ bob at trebor.iglou.com +-+
http://members.iglou.com/trebor
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list