t3x.org / t3x / t3x-manual / 612.html
 
T3X - A Minimum Procedural Language
Version 8.1.5, Online Edition
Copyright(C) 1996-2004
Nils M Holm
 
Previous:
6.1.1 Declarations
TOC | Index | Back Next:
6.1.3 Operators

6.1.2 Statements

Statement Description
lvalue := expr; Assign the value of expr to lvalue
IF (expr) stmt Run stmt, if expr is true
IE (expr) stmt-T ELSE stmt-F Run stmt-t, if expr is true and stmt-f, if expr is false
WHILE (expr) stmt Repeat stmt while expr is true
FOR (var=start, limit, cexpr)
 stmt
Count from start to limit-cexpr using cexpr increments. If cexpr is negative, count down to limit+cexpr. Run stmt in each step. Start and limit are expressions.
FOR (var=start, limit) stmt Short form of FOR (var=start, limit, 1) ...
LEAVE; Leave the innermost WHILE or FOR loop
LOOP; Restart the innermost WHILE or FOR loop.
In FOR loops, go to the increment step.
RETURN expr; Leave the current procedure and return expr to the calling procedure.
RETURN; Short form of RETURN 0;
HALT cexpr; Terminate program, deliver exit code cexpr
HALT; Short form of HALT 0;
pname(a1, ..., aN); Call procedure pname with arguments a1...aN
CALL ptr(a1, ..., aN); Indirect procedure call through ptr
iname.mname(a1, ..., aN); Send message mname with arguments a1...aN to object (instance) iname
SEND(ptr, cname,
 mname(a1, ..., aN));
Send message mname to the object of class cname pointed to by ptr
DO decls ... stmts ... END Compound statement. Both declarations (decls) and statements (stmts) are optional.
; Empty statement
Previous:
6.1.1 Declarations
TOC | Index | Back Next:
6.1.3 Operators