Dim arrays & mapping fields
Kenneth Brody
kenbrody at bestweb.net
Thu Jul 29 06:49:25 PDT 2004
Butch Ammon wrote:
[...]
> When defining the DIM array, will filePro "see" all 10 fields now, even if they
> are not in sequential order?
>
> i.e. DIM material[10]:10
>
> I might be wrong, I might be a complete moron, but to me, the above statement
> says to lay out a DIM array starting at field 10 for a group of 10 fields.
>
> Long story short and main question: Does a DIM array absolutely have to be in
> sequential order when mapping fields?
Yes, arrays get mapped to fields in sequential order. (How else could it
possibly be?)
However, associated fields (which you are using in your example) do not.
If, for example, you have @WLFa1 processing, any reference to field "a2"
will be the corresponding instance, regardless of their being contiguous
or not.
For example:
1 - a1) foo
2 - a2) bar
3 - a1)
4 - a2)
5 - something else
6 - a1)
7 - a1)
8 - a1)
9 - a2)
10 - another thing
11 - a2)
12 - a1)
13 - a2)
14 - a2)
If you leave the 3rd instance of a1 (field 6), then references to field
a2 will refer to the 3rd instance of a2 (field 9).
[...]
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody at spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
More information about the Filepro-list
mailing list