Ilya Zakharevich on Thu, 24 Oct 2002 03:00:21 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Parser problem


On Thu, Oct 24, 2002 at 11:50:25AM +0200, Leonhard Möhring wrote:
> At 14:12 23.10.2002 -0700, you wrote:
> >Is there any description how the argument of type "s" is supposed to
> >be parsed?  I find this very counterintuitive:
> >
> >    ? a=2
> >    %1 = 2
> >    ? print(b=a"+"a)
> >    2+2
> >    ? b
> 
> missing the 2 here....
> 
> what's counterintuitive about it? It seems perfectly intuitive
> to me? Assign a to b yields 2 as a result and print that out,
> just perfect, isn't it?

Your analysis would be acceptable if

  b=a"+"a

were a correct PARI expression with a defined side-effect of assigning
a to b.  It is not a correct PARI expression; thus I have no idea what
the defined side effect of this non-expression should be.

Hope this helps,
Ilya