next up previous contents index
Next: Assignment statements Up: Control Statements Previous: Iterative statements

Termination statements

  $\blacktriangleright$ BREAK
 
The   statement allows to stop the execution of the current loop. The BREAK statement does not exist in some previous versions of TSF.

          $\vartriangleright$ Example 8:

   line := $cstat.LINENUMBER 
   cpt :=0  
   WHILE (cpt!=10) 
     PRINT cpt 
     IF (cpt==line) THEN
       BREAK 
     ENDIF 
     cpt:=cpt+1 
   ENDWHILE

  $\blacktriangleright$ EXIT
 
The   statement stops the execution of the program.
  $\blacktriangleright$ QUIT
 
The   statement stops the execution of the current script.
  $\blacktriangleright$ RETURN
 
The   statement stops the execution of the program. This is a alias for QUIT.
  $\blacktriangleright$ ERROR
 
The   statement stops the execution of the program and generate an error message. It takes two argument. The first is an error number given by the user and the second is the error message. The ERROR statement does not exist in some previous versions of TSF.

$\vartriangleright$ Example 9:   

   IF ($cstat.VARIANT!="do") THEN 
      ERROR(1,"Please select a DO statement") 
   ENDIF



Yann Mevel
1999-04-30