You are testing :
>> | (2)
>> |         for i in 1..5 repeat
>> |                 j: Integer := i^2
>> |                 output(i::OutputForm)$OutputPackage
>> |
>> |         output(j::OutputForm)$OutputPackage
>> |
>> | (the scope of the variable j is restricted to the loop)
>> |
>> | ... I really like that (1) produces an error, but I really
>> | dislike that (2) does, too...
>>
>>     
And how can I code the really usual Pascal/Basic/C/maple example :

S := 0
for i in 1..10 repeat S := S+i^2
S

This is one of the most usual and first examples in algorithmic course,
and axiom might not be so different than other languages, if we want 
that people uses it. The demonstration I done last week confirm this.

What is the right method with aldor and fresh OpenAxiom ?
Or where am I wrong ?

Have a nice day !

Francois



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to