Tip of the day!
Bruce Easton
bruce at stn.com
Thu Nov 29 14:58:05 PST 2007
(top post)
I don't see a warning about that in the F10 help, the on-Line Manual,
nor the old Blue filePro 16 3.0 manual, unless I missed something.
But as Jose detailed, having to position the dim statement prior
to any references using it means *positionally* above in the
table, regardless of program flow.
We have in our manual a warning about that, a warning about
locating a dim statement hundreds of lines down in a prc table,
and a warning about separating a dim too far from references that
use it. I'm not sure if these latter two are still problems,
but I do remember running into them with very large prc tables.
It must have been about forty of fifty years ago now - I just
don't make tables that big anymore.
Bruce
Bruce Easton
STN, Inc.
Bob Stockler wrote Thursday, November 29, 2007 5:20 PM:
>
> 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
> |
More information about the Filepro-list
mailing list