Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How determine if variable is an array
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00395400
Message ID:
00395504
Views:
10
>I'm glad you asked, it prompted me to add ISARRAY to my own code libary like this:
FUNCTION ISARRAY( tcVar)
>RETURN TYPE("tcVar[1]") <> "U"
For ISARRAY() to work you need to pass the variable by reference. For example:
myVar = 3   && a variable
>dimension myArray[1]    && an array
>myArray[1] = 3
>?ISARRAY( @myVar)   && returns .F.
>?ISARRAY( @myArray) && returns .T.
Hi Rick,

You may want to add this function to UT FAQ section.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform