[Grace-core] Comment proposal

Michael Homer mwh at ecs.vuw.ac.nz
Wed Feb 4 17:59:12 PST 2015


On 5 Feb 2015 14:11, "Kim Bruce" <kim at cs.pomona.edu> wrote:
>
> I could live with either of these.  At this point I lean more toward the
second, but could live with the more restrictive second.
Which?
>
> Checking where ";" can go in Grace, the following program is legal only
if print(x) is indented to the right of ;
>
> var x: Number := 3
> while {false} do {;
>                                 print(x)
> };
That program is not legal at all.
> Odd, especially when the following is fine:
>
> while {false} do {x := x + 3;
>     print(x)
> };
Neither is this one.
> >>        • at the end of a line, (but not at the end of a continuation
that is continued on the following line).
> >>          Such comments attach to the first declaration or expression
on that line.
> > Is this the same as "may appear where a semicolon could, and attaches
> > to the preceding statement or declaration", or is it "may appear at
> > the end of the first physical line of a continuation-line sequence,
> > and attaches to the whole sequence"?
There is also a third option "may only appear at the end of a physical line
that is not part of a continuation-line sequence". That is at least
unambiguous.
-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150205/f5644837/attachment-0001.html>


More information about the Grace-core mailing list