Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How tell if its an Array?
Message
 
 
To
05/07/2002 16:59:04
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00675762
Message ID:
00675772
Views:
14
This message has been marked as the solution to the initial question of the thread.
IF TYPE("laArray[1]") <> "U"    && It's array. 
* The code above doesn't work for array properties.
  
* To check any variables including array property
IF TYPE("ALEN(laArray)") = "N"       && It's array
BTW, you cannot pass array property as parameter because property cannot be passed by reference.

>I need to tell wether a variable is an array or not. If I do :
>
>
>
>DIMENSION laArray(2)
>
>laArray(1) = 'My test'
>laArray(2) = 'My test 2'
>
>?VARTYPE(laArray)
>?VARTYPE(laArray(1)
>
>
>
>I get 'C'. This variable will be passed as an array and I need to know if it is an array. How?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform