FOR x = 1 TO 10
y = x
ENDFOR
Showing posts with label Conditional Structure. Show all posts
Showing posts with label Conditional Structure. Show all posts
DO CASE...ENDCASE syntax
DO CASE
CASE x = 1
y = 1
CASE x = 2
y = 2
CASE x = 3
y = 3
OTHERWISE
y = 0
ENDCASE
IF..ELSE syntax
IF x > y
* Your code come hereELSE
* Your code come here
ENDIF
Another form of IF..ELSE statement in Visual Foxpro is the IIF (,,) function. The first parameter is the expression you want to evaluate, the second parameter is the code to execute if the first parameter is true. The third parameter will be executed if the first parameter is evaluated as false.IIF (x > y, x=1, y=1)
Subscribe to:
Posts (Atom)