Newsgroups: comp.lang.c Path: utzoo!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Subject: Re: ANSI C idea: structure literals (and short constants) Message-ID: <8803071657.AA11735@explorer.dgp.toronto.edu> Keywords: ANSI, structure literals Organization: University of Toronto References: <56@vsi.UUCP> <1988Feb28.130526.4147@jarvis.csri.toronto.edu> <2743@mmintl.UUCP> Distribution: comp Date: Mon, 7 Mar 88 11:57:52 EST I, flaps@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@mmintl.UUCP> franka@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?