mod.std.c Digest V5#9
Orlando Sotomayor-Diaz
osd7 at homxa.UUCP
Sat Apr 27 23:02:41 AEST 1985
From: Orlando Sotomayor-Diaz (The Moderator) <cbosgd!std-c>
mod.std.c Digest Fri, 26 Apr 85 Volume 5 : Issue 9
Today's Topics:
CTRL(x) in the ANSI standard (2)
----------------------------------------------------------------------
Date: Fri, 26 Apr 85 01:06:24 est
From: tjr at ihnet.uucp
Subject: CTRL(x) in the ANSI standard
The suggestion was made to implement a CTRL(x) macro using
an enum:
> enum _CTRL_kludge {
> _CTRL_A = 1, /* upper case control chars */
> ...
> _CTRL_Z,
> };
>
> #define CTRL(arg) ((int) _CTRL_ ## arg)
This won't work for any of the control-chars that are not letters
(e.g. ESC = ctrl-[). Often they are the most useful.
Tom Roberts
ihnp4!ihnet!tjr
------------------------------
Date: Wed, 24 Apr 85 23:28:53 est
From: allegra!phri!roy (Roy Smith)
Subject: CTRL(x) in the ANSI standard
To: allegra!cbosgd!std-c
Somewhere along the line I picked up the habit of saying
# define N 10
^ notice the blank after the "#"
K&R makes some mention about being liberal about surrounding
operators with white space; I guess this is where I got if from (no
flames about # not being an operator, please). I never even realized
that what I was doing was different from the rest of the world until
someone pointed it out to me (i.e. flamed at me).
Does this violate the proposed standard?
[ This is legal as long as # is the first character in the source
file OR the first character after a new line character. -Mod- ]
allegra!phri!roy (Roy Smith)
System Administrator, Public Health Research Institute
------------------------------
End of mod.std.c Digest - Fri, 26 Apr 85 19:05:18 EST
******************************
USENET -> posting only through cbosgd!std-c.
ARPA -> ... through cbosgd!std-c at BERKELEY.ARPA (NOT to INFO-C)
In all cases, you may also reply to the author(s) above.
More information about the Mod.std.c
mailing list