Christian, I'm copying you since I'm interested in your Senf. :-)
We are discussing whether
test() ==
for i in 1..5 repeat
j := i^2
output(i::OutputForm)$OutputPackage
output(j::OutputForm)$OutputPackage
should produce an error, saying that j is undefined.
"Bill Page" <[EMAIL PROTECTED]> writes:
> Perhaps it is not clear to Martin that "well-written" SPAD code should look
> like this?
>
> j: Integer
> for i in 1..5 repeat
> j := i^2
> output(i::OutputForm)$OutputPackage
> output(j::OutputForm)$OutputPackage
>
> with j defined in the scope where it is used.
Well, I have mixed feelings here. It seems practical to me to allow the current
behaviour as used in test() above. Moreover, what should
j: Integer := 0
for i in 1..5 repeat
j: Integer := i^2
output(j::OutputForm)$OutputPackage
output? It would be different from
j: Integer := 0
for i in 1..5 repeat
j := i^2
output(j::OutputForm)$OutputPackage
but I think the intention is unclear when these semantics are used.
Martin
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel