Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I check to see if an array has been created?
Message
From
12/10/2001 16:38:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00567404
Message ID:
00567964
Views:
11
>You can ran into a slight problem if using type() if the parameter is a form property. For example, run any form and type in the command window:

Some interesting things:
oX = NEWOBJECT('form')
?TYPE("oX.top[0]")
?TYPE("oX.top[1]")

DIMENSION xx[1]
?TYPE("xx[0]")
?TYPE("xx[1]")

oX.AddProperty('aA[1]')
?TYPE("oX.aA[0]")
?TYPE("oX.aA[1]")
So, to test if a variable or property is an array:
llArray = TYPE("array[0]") = 'U' AND TYPE("array[1]") <> 'U'
Previous
Reply
Map
View

Click here to load this message in the networking platform