#236 nary(";") confuses parser

closed
nobody
Lisp Core (472)
5
2005-04-11
2003-02-24
Stavros Macrakis
No

(C1) nary(";")$
(C2) 1; --> infinite loop

Not a very important bug....

Discussion

  • Robert Dodier
    Robert Dodier
    2005-04-11

    • status: open --> closed
    • labels: --> Lisp Core
    • summary: nary(";") confuses parser --> nary(";") confuses parser
     
  • Robert Dodier
    Robert Dodier
    2005-04-11

    Logged In: YES
    user_id=501686

    I don't think this is a bug. When 1; is entered, the parser
    is waiting for more stuff -- additional arguments for the ;
    operator or $ to terminate. Maxima seems to handle the ;
    correctly as an operator:

    (%i1) nary (";")$
    (%i2) ";" ([L]) := apply ("+", L)$
    (%i3) a: 2;3;4;5;6;7$
    (%i4) print (a)$
    27

    Incidentally the roles of ; and $ can be reversed:

    (%i1) nary ("$");
    (%o1) "$"
    (%i2) "$" ([L]) := apply ("+", L);
    (%o2) nodisplayinput([L]) := apply("+", L)
    (%i3) a: 2 $ 3 $ 4 $ 5 $ 6 $ 7;
    (%o3) 27

    I wonder what "nodisplayinput" is about.