|
|
|
last edited 13 years ago by test1 |
| 1 2 3 4 5 6 7 8 9 10 11 12 | ||
|
Editor: Bill Page
Time: 2008/05/11 06:47:48 GMT-7 |
||
| Note: new | ||
changed: -The above code snippet returns an error in OpenAxiom 1.2.0 (Revision >= 563). The code above returns an error in OpenAxiom 1.2.0 (Revision >= 563).
j is referenced out of scope
(1) -> for i in 1..5 repeat
j:Integer := i^2
output(i::OutputForm)$OutputPackage
1
2
3
4
5
output(j::OutputForm)$OutputPackage
25
The code above returns an error in OpenAxiom? 1.2.0 (Revision >= 563).
It sould be written like this:
j: Integer
for i in 1..5 repeat
j := i^2
output(i::OutputForm)$OutputPackage
1
2
3
4
5
output(j::OutputForm)$OutputPackage
25