Sujet : Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?)
De : acm (at) *nospam* muc.de (Alan Mackenzie)
Groupes : comp.lang.cDate : 31. Mar 2025, 18:15:14
Autres entêtes
Organisation : muc.de e.V.
Message-ID : <vseij2$kqj$1@news.muc.de>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : tin/2.6.4-20241224 ("Helmsdale") (FreeBSD/14.2-RELEASE-p1 (amd64))
Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
[ .... ]
I don't know of any language that uses "-" for both negation (prefix,
one operand) and subtraction (infix, two operands) and treats -5
as a single token rather than a unary minus operator applied to the
constant/literal "5".
How about Lisp? The unary operator is (- 5), the binary (- 10 5).
It doesn't match your second parenthetical remark ("infix") but
otherwise it does.
-5 is syntactically not an operator followed by a constant. It surely
gets parsed as a single token.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
-- Alan Mackenzie (Nuremberg, Germany).