TEST reg1
CASE 1,2,3 :
routine1;
CASE 4 :
routine2;
DEFAULT :
TPWrite "Illegal choice";
Stop;
ENDTEST
Example 2 (TPReadFk)
VAR errnum errvar;
...
TPReadFK reg1, "Go to service position?", stEmpty, stEmpty, stEmpty, "Yes","No"
\MaxTime:= 600
\DIBreak:= di5\BreakFlag:= errvar;
IF reg1 = 4 OR errvar = ERR_TP_DIBREAK THEN
MoveL service, v500, fine, tool1;
Stop;
ENDIF
IF errvar = ERR_TP_MAXTIME EXIT;