if/else Statement Examples
|
if (true) a := 1;
the variable a is assigned to 1 if (1) b := 2; an error is raised: boolean expected for condition if (check(10) > 54) {a := 1; b := 2;} else {c := 2; d := 2} here compound statements are used, because several expression statements need to be executed if ((check(10) > 54 || alpha < 2) && beta > 2.3 ) {callme(2);} use of a composite conditional expression if (a == 1) b := 2; else if (b == 3) {c := 2; return 4;} else if (check(1)) return 2; else return 3; selection statements are combined |
EyeDB manual