Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you tell if a property is an array (version 8)
Message
From
09/04/2009 15:46:08
 
 
To
09/04/2009 13:16:13
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01393713
Message ID:
01394030
Views:
62
Mike --

One more minor point in this issue. Your suggestion is not identical in effect to the suggestion I prefer:
type("alen(loForm.arrProperty)") <> "U"
Your suggestion fails if the property / memory variable does not exist.

I mention this only because I always try to be very careful when replacing code with "better" code to make sure that there are not some edge conditions not accounted for.

Jim


>>Mike --
>>
>>Thanks for the link. I admire the attempt at clarity -- even I won't be using this to replace the only reference I have to it.
>>
>>Jim
>
>All the more reason to have it, IMO. What do you think this means: GOMONTH(DATE() - DAY(DATE()) + 1, 1) - 1
>
>A rose by any other name would smell as sweet, but having to decipher a formula stinks.
>
>>
>>>>I have a question about determining whether a variable is an array: From the Help file: (version 8, not 9!)
>>>>
>>>>You can also use the TYPE( ) function to check if a memory variable is an array. For example:
>>>>? TYPE("myarray[1]")#"U"

>>>>
>>>>This apparently works as well for properties. Except for one special counter-example - native properties:
>>>>
>>>>Guesses on the results from the following?
>>>>
?Type("loForm.visible(1)")
>>>>?Type("loForm.visible(0)")
>>>>
>>>>Is there some other consistent method for determining whether a property is an array?
>>>
>>>http://fox.wikis.com/wc.dll?Wiki~X2ISARRAY~VFP
Jim Nelson
Newbury Park, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform