Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you test to see if an array exist
Message
From
02/06/1999 20:58:08
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00225707
Message ID:
00225716
Views:
13
>I have an array (a__array1) that is being populated, But sometimes there is nothing to populate and I get an error of the following kind:
>
>file 'a_array1.prg' does not exist
>
>
>I am testing the array by doing to following
>
>if !empty(a__array1(1,2))
> append from array a__array1
>endif
>dimension a__array1(1,8)
>adel(a__array1, 1)
>
>I am checking the 2nd element of the a__array1 to see if it has someting because the first element always has a zero and therefore returns empty = 0 (which is what I want it to do). Is there another way to see if my array is truely empty. Help much appreciate.
>

An array aArrayName exists if TYPE('aArrayName[1]') # "U"

>Nick Patel
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform