Article View: mod.std.c
Article #68mod.std.c Digest V5#5
From: Orlando Sotomayor-Diaz
Date: Thu, 11 Apr 1985 23:21
Date: Thu, 11 Apr 1985 23:21
88 lines
3282 bytes
3282 bytes
From: Orlando Sotomayor-Diaz (The Moderator) <cbosgd!std-c>
mod.std.c Digest Thu, 11 Apr 85 Volume 5 : Issue 5
Today's Topics:
CTRL(X)
junk after #else
----------------------------------------------------------------------
Date: Wed, 10 Apr 85 18:48 EST
From: Mark Purtill <ucbvax!Purtill@MIT-MULTICS.ARPA>
Subject: CTRL(X)
To: cbosgd!std-c@BERKELEY
I doubt if anyone cares, but I think CTRL(X) can be done as follows in
ANSI C:
/* formerly #define CTRL(XX) ('XX' & '\037') */
#define CTRL(XX) (#XX[0] & '\037')
this converts
CTRL(A) --> ("A"[0] & '\037') --> ('A' & '\037')
just like I wanted in my original complaint.
Mark
^.-.^ Purtill at MIT-MULTICS
((")) 2-032 MIT Cambrige MA 02139
[ Please reply to the author on this one. -- Mod -- ]
------------------------------
Date: Wed, 10 Apr 85 20:44:14 est
From: decvax!minow (Martin Minow)
Subject: junk after #else
To: std-c@cbosgd.ATT.UUCP
As I read the November 84 standard, it even disallows comments
on # lines. Thus:
#if foo /* is foo nonzero? */
#else /* nope */
#endif /* foo stuff */
is incorrect (the syntax makes no provision for whitespace after
#if arguments). I would suggest that this is a bit extreme.
[ I'm not sure whether the syntax should describe where comments
should or not should be allowed. Just for your information,
this is what the draft says about comments. (2/11/85 draft)
"Except within a character constant, a string literal,
or a comment, the characters /* introduce a comment. The
contents of a comment are examined only to find the characters
*/ that terminate it. Thus comments do not nest."
Section C.1.7 -
Perhaps the section should be expanded to cover the case
below.
-- Mod --
]
But, then, what are we to make of the following (that could
only happen on Unix...):
#include </*foo>
(Now, some clown is going to standardize "files that can't be
#included in C programs :-)
The November draft also says that angle brackets may not appear
inside #include <...>. Angle brackets are legal in Unix filenames
and are needed to specify directories on Tops-20. What now? Is
it reasonable to restrict such files to #include "..."?
[ Only the '>' character is not allowed. But I don't know
Tops-20. -- Mod -- ]
Martin Minow
decvax!minow
------------------------------
End of mod.std.c Digest - Thu, 11 Apr 85 17:51:58 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.
Technical Details
Message-ID:
<886@homxa.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!bellcore!allegra!ulysses!mhuxr!mhuxt!houxm!homxa!osd7Show Full Headers
Complete Article Headers
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: arc1-ca.pugleaf.net!utzoo!decvax!bellcore!allegra!ulysses!mhuxr!mhuxt!houxm!homxa!osd7 From: osd7@homxa.UUCP (Orlando Sotomayor-Diaz) Newsgroups: mod.std.c Subject: mod.std.c Digest V5#5 Message-ID: <886@homxa.UUCP> Date: Thu, 11-Apr-85 18:21:44 EST Article-I.D.: homxa.886 Posted: Thu Apr 11 18:21:44 1985 Date-Received: Fri, 12-Apr-85 09:34:01 EST Organization: AT&T Bell Labs, Holmdel NJ Lines: 88 Approved: osd7@homxa.UUCP