IF Statements

See Also

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++;
 }