Jim-
>Partially correct, the FOR loop will execute at least once under all conditions. You cannot create a FOR loop that won't run once.
I often rely on a FOR loop to not execute, such as when I've called a function that returns a number (like ASCAN, or AFIELDS, whatever). For example, I made a prg called testy.prg with the following:
SET PROCEDURE TO testy.prg
x = doNothingMuch(0)
FUNCTION DoNothingMuch
LPARAMETER tnNumLoops
LOCAL lni
tnNumLoops = IIF( VARTYPE( tnNumLoops ) = "L", 0, tnNumLoops )
FOR lni = 1 TO tnNumLoops
WAIT WINDOW "You asked for " + LTRIM( STR( tnNumLoops ) ) + "(" + LTRIM( STR( lni ) ) + ")"
NEXT lni