... | ... | @@ -13,6 +13,11 @@ Function{ |
|
|
c = (b < 1) ? -4e6 : 2.2e2;
|
|
|
d() = {a,b,c};
|
|
|
e[] = a + b + c;
|
|
|
If(c > 1) // this test is performed at parse time
|
|
|
Printf["c is greater than 1"]; // print message at parse time
|
|
|
Else
|
|
|
Printf["c is not greater than 1"];
|
|
|
EndIf
|
|
|
}
|
|
|
```
|
|
|
|
... | ... | @@ -43,7 +48,9 @@ Resolution{ |
|
|
While[ $c < 0.9 ]{
|
|
|
Evaluate[ $c = $c + 0.1 ];
|
|
|
}
|
|
|
Print[{$c}, Format "$c = %g"];
|
|
|
Test[ $c > 1 ]{ // test performed at run-time
|
|
|
Print[{$c}, Format "$c = %g is greater than 1"]; // run-time message
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
```
|
... | ... | |