Gentee Programming Language > Documentation > Syntax Download documentation

Statements Of a Function Body

A function body contains some statements that are used to interrupt the sequential execution of a program. Some of them contain blocks which also have nested statements.
There are several types of statements, as follows:

Conditional statements:
 
if-elif-elseConditional statement.
switchCase statement.

Loop statements:
 
whileSimple loop statement.
do-whileSimple loop statement, evaluated at the bottom.
forLoop statement that provides initialization and increment clauses.
fornumLoop statement that executes a finite number of iterations and has autoincrement.
foreachLoop used for searching elements.

Instructions of unconditional transfer of control:
 
returnFunction termination.
breakLoop termination.
continueImmediate transfer of control to the next loop iteration.
labelLabel definition.
gotoUnconditional transfer of control to a label.


 Copyright © 2004-2006 Gentee Inc. All rights reserved.