Conditional and looping control structures |
Conditional and looping control structures |
For Loops |
If, If..Else, If..ElseIf..ElseUnlike the control structures introduced above, the next three are not concerned with theTime variable, but allow the user to specify
conditional execution by providing Boolean expressions. They do not require
much explanation really so all that is included here is the syntax:
If <expr>: <body> ... If <expr> <body1> ... Else <body2> ... If <expr1> <body1> ... ElseIf <expr2> <body2> ... ElseIf <expr3> <body3> ... . . Else <default_body> ... Note that the block terminating symbol
| ||
Conditional and looping control structures |
Conditional and looping control structures |
For Loops |
©1999,2000 Mark Pearson
m.pearson@ukonline.co.uk April 30, 2000 |