Next: Call external objects
Up: Elements of the Fib
Previous: if
Contents
Index
Conditions with the if-element
To evalue subobjects depending on variables, the if-element can be used.
Syntax:
If the condition is true, the first subobject will be evalued, else, if the condition is false, the second subobject will be evalued.
The following conditions are available ( are subfunctions as described for function element in section 9.7 on page ):
- : the condintion is true
- : the condintion is false (=not true)
-
: the condintion is true, if the is false (respectively not true), else the condition is false
-
: the condintion is true, if one or more of the conditions or are true, else the condition is false
-
: the condintion is true, if both of the conditions and are true, else the condition is false
-
: the condintion is true, if exactly one of the conditions or is true, else the condition is false
-
: the condintion is true, if the rounded to an integer value of the subfunction is equal to the rounded to an integer value of the subfunction , else the condition is false; The direct comparison of floating point numbers was rejected, because due to slightly rounding errors the condition can lead to different results on different systems.
- : the condintion is true, if is smaler than (), else the condition is false
- : the condintion is true, if is greater than (), else the condition is false
Notes:
The construct is one of the most powerful programming language constructs, so it was included in the Fib multimedia description language.
Examples:
-
; will be evalued, if the variable is smaler than , else will be evalued
-
; will be evalued, if the variable plus is greater than and is smaler than (thus if is a number betwean and ), else will be evalued
Next: Call external objects
Up: Elements of the Fib
Previous: if
Contents
Index
Betti Österholz
2013-02-13