Ralf Hemmecke wrote:
> 
> Your error lies in the pile syntax.
> 
> in
> 
>    g(): Void ==  x := 1
>                  while x<  4 repeat {output x;  x := x + 1}
> 
> the first line is the definition of g.
> The second line does not belong to g anymore, but is just some indented 
> something.
>

Actually, this is an example of "single line rule": single line
indented more than previous line is joind to the previous line.
In other words, the input is equivalent to:

g(): Void ==  x := 1 while x < 4 repeat {output x;  x := x + 1}

Multiple lines, like:

g(): Void ==  x := 1
              while x <  4 repeat {output x;  x := x + 1}
              void()

give a pile which is attached to previuos line so that the
above is equivalent to:

g(): Void ==  x := 1 {while x <  4 repeat {output x;  x := x + 1} ; void()}

             
-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to