Sujet : Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 31. Mar 2025, 22:56:35
Autres entêtes
Organisation : None to speak of
Message-ID : <87bjtgsw30.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Gnus/5.13 (Gnus v5.13)
Alan Mackenzie <
acm@muc.de> writes:
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.
I know about Lisp. It doesn't match my description, for the reasons
you pointed out. It use of -5 as a single token doesn't present the
problems it would in a more C-like language.
[...]
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */