Tip of the day!

John Esak john at valar.com
Thu Nov 29 16:52:24 PST 2007


The actual rule... would more probably be better stated as:


Rule: An array must be DIMensioned on a line that comes numerically (and
therefore physically) lower than the first time any of the arrays elements
are referenced or assigned values.

Corollary to the rule: The DIMension statement does NOT have to be
encountered by any processing table execution pointer. In this way they are
like the DECLARE statement which also does not have to be encountered by
processing. They get compiled at runtime no matter where they are on the
table, even if they are on lines that are never reached. DECLAREs, however,
do not have the constraint of having to be physically before their first
reference.


-boy, I should be writing documentation!  :-)


John



> -----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: Thursday, November 29, 2007 5:20 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: Tip of the day!
> 
> I don't know where it's documented, but it >must< be somewhere,
> because I dimension all of my arrays at the top of my tables.
> 
> The rule being:
> 
>   An array must be dimensioned before any of its elements
>   are addressed in any way.
> 
> Bob
> 
> fp at casabellagallery.com wrote (on Thu, Nov 29, 2007 at 02:39:30PM -0700):
> 
> | Did you know that if you associate dummy variables to an array
> | and try to reference these variables prior to having declared (in
> | a line above the line where the array is defined) the array you
> | will get a syntax error?  Now you do!
> |
> | ****** NOT GOOD *******
> | then: ya(10,.2)=xa+xb+xc
> | then: dim xabc(3)(10,.2):xa
> |
> | ****** GOOD *******
> | then: dim xabc(3)(10,.2):xa
> | then: ya(10,.2)=xa+xb+xc
> |
> | Not a big deal but a shocker if you are not aware of this or
> | if your mind has wondered off to wonder-land  :)
> |
> | So there, stop blaming filePro for these errors and make sure your
> | arrays are defined prior to referencing their respective associated
> | variable.
> |
> | Regards,
> |
> |
> | ---
> | Jose Lerebours
> | 954  559  7186
> | http://www.fpgroups.com
> |
> | _______________________________________________
> | Filepro-list mailing list
> | Filepro-list at lists.celestial.com
> | http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> --
> 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