Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
External array command
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
External array command
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01658178
Message ID:
01658178
Views:
61
Hi everybody,

I'm a bit rusty in VFP now and the newly downloaded AppendFromXlsx program complains about an array. I checked my Help file and the sample there is
DIMENSION gaArrayOne(2)      && Create an array
EXTERNAL ARRAY gaArrayTwo   && Name of the array used in the UDF
SET TALK OFF
STORE 10 TO gaArrayOne(1)
STORE  2 TO gaArrayOne(2)
= ADDTWO(@gaArrayOne)      && Pass the array by reference to a UDF
FUNCTION ADDTWO
PARAMETER gaArrayTwo
CLEAR
gaArrayTwo(1) = gaArrayTwo(1) + 2
gaArrayTwo(2) = gaArrayTwo(2) + 2
? gaArrayTwo(1)
? gaArrayTwo(2)
My question is - is it possible to just add external array taArray right after the function lparameters declaration?

E.g.
function get_cells
lparameters lcStr, cCurSheet, cCurStr, laField, tnStartRow, llEmptyCells, tcExcludeColumn
laField is an array the PM is complaining about.

BTW, I wish the author of this procedure used the "normal" VFP convention of naming variables and parameters.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform