Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is a parameter an array?
Message
From
11/11/2003 21:12:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Is a parameter an array?
Miscellaneous
Thread ID:
00848944
Message ID:
00848944
Views:
40
Hi all,

I have a multi-function processor, sort of like a train station (methoddirector). It holds parameters passed from various functions and then sends them on (for various reasons).

Okay, I have methodX on a form:
*-- this will send some data and an array to the application.methoddirector
LOCAL lnReturn, laMyArray, lcMyString, lnMyNumber
DIMENSION laMyArray[1,4]
laMyArray[1,1] = 'This number'
laMyArray[1,2] = 4
laMyArray[1,3] = 'is spelled'
laMyArray[1,4] = 'four'
lcMyString = 'Testing Four'
lnMyNumber = 4
lnReturn = application.methoddirector(lcMyString, @laMyArray, lnMyNumber)
Okay, so far... the PARAMETERS() of application.methoddirector will catch all of this fine...
*-- method.methoddirector
PARAMETERS pItem1, pItem1, pItem1, pItem1, pItem1, pItem1, 
DO CASE
 CASE PCOUNT()=1
  lnReturn = mehtod.oneparamterthingy(pItem1)
 CASE PCOUNT()=2
  lnReturn = mehtod.oneparamterthingy(pItem1, pItem2)
 .....
ENDCASE
RETURN lnReturn
I hope you can see the problem here. One of the items I passed in the first codeblock was an array. It might not be an array all the time, or anytime, based on what is sending data to the method.director. I need to be able to ascertain if there is an array passed to method.director which will need to have the '@' inserted.

When I do have to pass an array item, from a passed parameter array item, how do I determine if ANY parameter is an array?


TIA

Ric
Next
Reply
Map
View

Click here to load this message in the networking platform