ANSI C idea: structure literals (and short constants)

Alan J Rosenthal flaps at dgp.toronto.edu
Tue Mar 8 02:57:52 AEST 1988


I, flaps at dgp.toronto.edu (Alan J Rosenthal), wrote:
>>... because you can't specify shorts in expressions.  Any
>>attempt to fix this would probably be a very bad addition.

In article <2743 at mmintl.UUCP> franka at mmintl.UUCP (Frank Adams) writes:
>There is an obviously correct way to permit specification of short
>constants: append an s.  Exactly analogous to appending an l for long
>constants.

Not very analogous to appending an L for long constants.  Quite
analogous to appending an F for floating constants, as in the (current)
ansi draft.  It requires doing away with default promotion rules, as
they have for float -> double.  Your method of specifying shorts would
generate ints, just as (short)3 now does.

ajr
-- 
If you had eternal life, would you be able to say all the integers?



More information about the Comp.lang.c mailing list