Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Need explanation of C syntax for a Perl 6 guy Date: Thu, 09 Mar 2017 09:05:46 -0800 Organization: None to speak of Lines: 26 Message-ID: References: <58c145b4.4445593@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="5aec20d827a52e94d3592c9aad4f0299"; logging-data="25011"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18v0L+WqJjJ7aSYCQZcwF2N" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:lbULOEhoywUVbvlxMQfgR3O67D0= sha1:0U6rBI+Z1RnwRqQ60BzHHAG9Rzw= Xref: csiph.com comp.lang.c:105672 raltbos@xs4all.nl (Richard Bos) writes: > ram@zedat.fu-berlin.de (Stefan Ram) wrote: >> »int« is the name of an integer type, not an abbreviation >> for "integer". > > Well... int _is_ an abbreviation for integer, it's just that in C, this > abbreviation is used for a specific integer type, to wit, the "natural" > type for signed integers on the system. This is at least 16 bits, these > days usually 32 bits, and may be larger. The name "int" certainly originated as an abbreviation for "integer", but in C the name "int" doesn't *mean* "integer". "int" is a C keyword. It is also the name of one particular type, and it's used as part of the syntax for the names of several other types ("unsigned int", "long int", etc.). The type named "int" is one of a dozen or so integer types, all of which are distinct. A similar point of potential confusion: "const" is obviously derived from the word "constant", but C's "const" keyword means "read-only". -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"