Freigeben über


IF Statements

Each language offers equivalent IF functionality.

Visual FoxPro BASIC
IF nCnt < nMax
 nTot = nTot * nCnt
 nCnt = nCnt + 1
ENDIF
If nCnt < nMax Then
 nTot = nTot * nCnt
 nCnt = nCnt + 1
End If
Pascal C/C++
if nCnt < nMax then
 begin
  nTot:=nTot * nCnt;
  nCnt:=nCnt + 1;
 end
if(nCnt < nMax) {
 nTot *= nCnt;
 nCnt++;
 }

See Also

Assignment Statements | Case Sensitivity | CASE Statements | Comments | FOR Loops | Parameter Passing by Reference | Parameter Passing by Value | Variable Declaration | WHILE Loops