Re: Reposting : small bug in euphoria parsing
Alan Oxley wrote:
>
> }}}
<eucode>
> -- demo a tiny bug where Eu parsing breaks.
> -- If "trace" is coded between the procedure declaration and the
> -- first private variables, ie immediately after the proc dcl.
> -- error is "Syntax error - expected to see possibly 'end', not a type"
> -- Euphoria v2.5
> -- workaround is to put the trace(1) after the variables declarations
> --
> with trace
> procedure main()
> trace(1)
> integer i1
> i1 = 0
> i1 = i1 + 1
> end procedure
>
> main()
> </eucode>
{{{
>
> Sorry for the out-of-order post, my original did not get through
I thought that was a bug too, but it's just the way Euphoria works.
Routine scoped variables must be declared at the very beginning of a routine
block.
Try this:
with trace
procedure main()
integer i1
trace(1)
i1 = 0
i1 += 1
end procedure
main()
Regards,
Vincent
|
Not Categorized, Please Help
|
|