Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EXTERNAL ARRAY
Message
From
14/06/1997 17:04:50
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
11/06/1997 15:03:31
General information
Forum:
Visual FoxPro
Category:
Project manager
Title:
Miscellaneous
Thread ID:
00035966
Message ID:
00036391
Views:
35
> The selected data is then sent to a REPORT FORM. I am getting an error > in the Project Manager similar to the following: > > Unknown LACOUNT - Undefined > > The LACOUNT is an array of summary statistics. How can I eleminate this > error from being displayed? I don't know how to use the EXTERNAL ARRAY > command from within a REPORT. > > Any ideas/solutions? Just another reocurring bug. Just ignore it. They haven't fixed it since 2.0, and it works that way ever since. The project manager keeps complaining, the reports keep working. Maybe (just maybe) there may be couple of workarounds: - put EXTERNAL ARRAY statement in the program calling the report - use parentheses () instead of brackets [] to surround indices within the report fields; thus you may confuse it with a function with a same name as the array. This also requires making damn sure that such a function is not accessible at runtime (rather tricky, really). The only sure solution is to write a function which returns an array element, and that function does have an External Array declaration. I use this one: * Statc.prg *+ usage * =statc(RowNo, @some_array [, column_no]) *- para nIndexs, ArrRef, nColRef if para()=2 nColRef=1 endif external array ArrRef * if array is one-dimensional if alen(ArrRef,1)=alen(ArrRef) retu iif(betw(nIndexs,1,alen(ArrRef)), ArrRef[nIndexs], " ??") else * array is two-dimensional. nColRef is not range-checked. retu iif(betw(nIndexs,1,alen(ArrRef,1)), ArrRef[nIndexs,nColRef], " ??") endif It should return nth array element, or a "??" if it doesn't exist.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform