
138 Appendix A6 OxGauss Language Reference
The do while statement excutes the statement-list as long as the test expression is
nonzero (for a matrix: at least one element is nonzero). The test is performed before
the statement-list is executed. Note that endo has only one d.
The do until statement excutes the statement-list as long as the test expression is
nonzero (for a matrix: at least one element is nonzero). The test is performed before
the statement-list is executed. so do until expr corresponds to do while not expr.
The for expression corresponds to:
identifier = init-expr;
do while identifier <= test-expr;
statement-list
identifier = identifier + increment-expr;
endo;
The main feature is that identifier is local to the loop, so cannot be accessed after the
loop is finished. If another variable with the same name already exists, that variable is
hidden during the loop. The value of test-expr and increment-expr is evaluated when
the loop is entered, and cannot be changed during the loop. If increment-expr is zero,
the loop is not executed; it is allowed to be negative. The values of init-expr, test-expr
and increment-expr are truncated to integers.
A6.7.4 Call statements
Use call to call a function and discard the return values, see §A6.6.3.
A6.7.5 Jump and pop statements
jump-statement:
break ;
continue ;
goto label;
goto label( parameter-list );
gosub label;
gosub label( parameter-list );
return label;
return label( parameter-list );
pop-statement:
pop identifier ;
A continue statement may only appear within an iteration statement and causes
control to pass to the loop-continuationportion of the smallest enclosing iteration state-
ment.
A break statement may only appear within an iteration statement and terminates
the smallest enclosing iteration statement.
The use of goto should be kept to a minimum, but could be useful to jump out of a
nested loop, jump to the end of a routine or when converting Fortran code. It is always
Comentarios a estos manuales