Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7  117
Chapter 2 Program Instructions
IF...THEN...(ELSE)
Field of Application
 Statement  for  conditional  execution  controlled by  the  result  of  a 
numeric expression.
Syntax IF<nexp>[,]THEN<stmt
1
>[ELSE<stmt
2
>]
 IF<nexp>[,]THEN  ↵
 <stmt
1
>  ↵
 [...<stmt
1+n
>]  ↵
 [ELSE    ↵ 
 <stmt
2
>  ↵
 [...<stmt
2+n
>]]  ↵
 ENDIF    ↵ 
<nexp> is a numeric expression, which is either true or false.
<stmt
1
>  is the statement or list of statements telling the program what 
to do, should the IF-condition be true. 
<stmt
2
>  is an optional statement or list of statements specifying what 
will happen, should the IF-condition be false. 
Remarks
 THEN and ELSE statements may be nested.
 Multiple THEN  and  ELSE  statements  can  alternatively  be  entered  on 
separate lines. If so, the instruction should be appended by ENDIF. See 
second example below. 
Examples
 These two examples illustrates the different syntaxes:
  10   A%=100:B%=20
  20   C$="A LARGER THAN B"
  30   D$="A NOT LARGER THAN B"
  40   IF A%>B% THEN PRINT C$ ELSE PRINT D$
  RUN
  yields:
  A LARGER THAN B
  10    A%=VAL(TIME$)
  20   IF A%>120000 THEN 
  30   PRINT "TIME IS ";TIME$; ". ";
  40   PRINT "GO TO LUNCH!"
  50   ELSE
  60   PRINT "CARRY ON - ";
  70   PRINT "THERE’S MORE WORK TO DO!"
  80   ENDIF
  RUN
  yields for example:
  TIME IS 121500. GO TO LUNCH!










