docs.roxen.comView this page in a printer friendly mode
DocsPike7.0TutorialStatements
Copyright  2001, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com



Choosing between Alternatives
Repetition (or "Loops")
The Other Statement Types

Statements

The simplest type of statement in Pike is the empty statement, followed by the expression statement. For selection, Pike has if and switch statements. You can also make selections using the conditional operator, "? :". There are four different ways of writing loops: using while, for, do while, and foreach. foreach loops over a collection. Pike also has the statements break, continue and return. Statements can be grouped into blocks, who can contain local variables.