Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83 based; site homxa.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!cbosgd!ulysses!mhuxr!mhuxt!houxm!homxa!osd7 From: osd7@homxa.UUCP (Orlando Sotomayor-Diaz) Newsgroups: mod.std.c Subject: mod.std.c Digest V5#9 Message-ID: <911@homxa.UUCP> Date: Sat, 27-Apr-85 09:02:41 EDT Article-I.D.: homxa.911 Posted: Sat Apr 27 09:02:41 1985 Date-Received: Sun, 28-Apr-85 07:39:27 EDT Organization: AT&T Bell Labs, Holmdel NJ Lines: 63 Approved: osd7@homxa.UUCP From: Orlando Sotomayor-Diaz (The Moderator) 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@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@BERKELEY.ARPA (NOT to INFO-C) In all cases, you may also reply to the author(s) above.