Ilya Zakharevich on Wed, 23 Oct 2002 14:12:59 -0700

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

Parser problem

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)
    ? b

Why have the type "s" at all?  Suppose that we have type "S" which
takes a PARI expression and converts it to char *; suppose we have
type S* which takes a comma-separated sequence of PARI expressions and
concatenates the string values.  Suppose we have function
STR(comma_seq) of type "S*" (similar to Str() of today).

Is not it better to use something like

  print(b=a, "+", a)

or even

  print(STR(b=a, "+", a))

than the monstrosity above?