Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adir function
Message
From
07/12/1998 10:34:46
 
 
To
07/12/1998 10:25:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00164664
Message ID:
00164764
Views:
22
>Hi Ed:
>
>It must have been the case sensitive issue. I wonder if you could help me with one other thing. I need my array to list all the files except .fpt,
>using "declare aFilelist[1,5], I just receive the first file. I won't know
>know how many files will be in my directory so it'll be a variable amount.
>How can I do this? I appreciate your help. Thanks.

If the array doesn't exist before the COPY TO ARRAY it should be created fresh, so you have two options - either RELEASE aFileList instead of the DECLARE, or set the entire array to NULLs by aFileList=NULL before doing the COPY TO ARRAY, and then finding the first NULL and redimensioning.

I just tried both, and both work - if the scope of the array is local to the function that creates it, I'd go with the first approach.

>
>Sheena
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
Next
Reply
Map
View

Click here to load this message in the networking platform