Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who'd have thought....
Message
From
02/11/1999 09:26:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00285125
Message ID:
00285438
Views:
21
>Nancy,
>
>My last reply appeared to get munged on me.
>
>Anyway, any loop FOR i = x TO y will fire 0, or y - x + 1 times (whichever is greater).
>
>This FOR loop would fire once
>
>FOR i = 0 TO -1 STEP 1
> WAIT WIND ALLT(STR(i))
>ENDFOR


Nancy's formula is correct.
FOR i = x TO y will fire 0, or y - x + 1 times (whichever is greater)
Above for loop would fire 0 times unless it's a typo in step not including (-).
FOR i = 0 TO -1 STEP -1
would fire twice.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform