Question: Parser in document mode don't work properly

Hi everybody

 

p.276 from the advanced programming guide: example 2 line 11

> r := z = -3 .. 3;

                              r := z = -3 .. 3
> minz:=lhs('if'(r::range,r,rhs(r)));

Error, unable to match delimiters

I encounter a similar  problem of parsing once:
 

> H:=x-> if type(x,even) then print("Even"); else print("Odd"); end if:

Error, invalid arrow procedure

It seems to me that those two should work properly.  Of course, if I do
 

H:=proc(x) if type(x,even) then print("Even"); else print("Odd"); end if:end proc:

there is no problem.  I don't know if it work properly in Classic Worksheet 1D since I never been able to start a new worsheet in that mode.

In fact, when I open a new worksheet, I have the choice between worksheet mode (with the [> ) and document mode.  In both case, it's 2D Input

 

Mario

Please Wait...