🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Orlando Sotomayor-Diaz Thu, 11 Apr 1985 23:21
mod.std.c Digest V5#5
#68
Author: Orlando Sotomayor-Diaz
Date: Thu, 11 Apr 1985 23:21
88 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads