Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loopin a variable length array
Message
From
22/02/1999 03:31:54
 
 
To
22/02/1999 03:25:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189697
Message ID:
00189895
Views:
8
>I recommend that you operate off the end of the array instead of the beginning. Run this to see the difference:
>
>
>#define arraysize 1000
>
>dimension a[arraysize]
>
>for i = 1 to arraysize
>	a = space(1024)
>endfor
>
>? 'beginning'
>s = seconds()
>for i = arraysize to 1 step -1
>	adel(a, 1)
>	dimension a[i]
>endfor
>? seconds() - s
>	
>	
>dimension a[arraysize]
>
>for i = 1 to arraysize
>	a = space(1024)
>endfor
>
>? 'end'
>s = seconds()
>for i = arraysize to 1 step -1
>	dimension a[i]
>endfor
>? seconds() - s

>
Thanks,

I'll try it out.

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform