7 51 2 GOTO Examples

LANSA Technical

7.51.2 GOTO Examples

Example 1: If field #X is less than 10 then transfer control to label L10:

IF     COND('#X *LT 10')
GOTO   LABEL(L10)
ENDIF
 

Example 2: If field #X is less than 10 then transfer control to label L10: else transfer control to label L11:

IF     COND('#X *LT 10')
GOTO   LABEL(L10)
ELSE
GOTO   LABEL(L11)
ENDIF