mod.std.c Digest V6#1

Orlando Sotomayor-Diaz osd7 at homxa.UUCP
Thu May 2 23:06:14 AEST 1985


From: Orlando Sotomayor-Diaz (The Moderator) <cbosgd!std-c>


mod.std.c Digest            Thu,  2 May 85       Volume 6 : Issue   1 

Today's Topics:
                             #endif Stuff
                            space around #
----------------------------------------------------------------------

Date: 28 Apr 85 23:05:26 CDT (Sun)
From: plus5!hokey at cbosgd.ATT.UUCP (Hokey)
Subject: #endif Stuff
To: std-c at cbosgd

Rather than just adding another voice to the group which does not like the
proscription of "#endif blah", I'd also like to ask a question:

	Why not permit "#endif blah"?

(I really don't like "#endif /* blah */", because 1) I'd have to change
a bunch of code, and 2) It is ugly; the "tag" doesn't line up with the #ifdef
above.)

------------------------------

Date: 29 Apr 85 15:12:43 CDT (Mon)
From: ihnp4!utzoo!henry
Subject: space around #
To: ihnp4!cbosgd!std-c

[ The subject refers to the question: Can I do

# define BLAH
 ^  notice this blank

My answer was:

>  This is legal as long as # is the first character in the source
>   file OR the first character after a new line character.  -Mod- ]

Actually, in the current drafts, there can even be white space preceding
the #.

				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

[ Henry has a point. In my effort to summarize the relevant paragraph
in the draft, I forgot what was in parenthesis. So here it is:

 From Section C.8, p. 46, draft 85-008

"...[preprocessing capabilities] are controlled
by directives that are "lines" in the source file that "begin with"
a # separator character; more precisely, by a # token that is the
first character in the source file (after any number of space and
horizantal-tab characters) or that follows a new-line character
(after any number of space and horizontal-tab characters)."

  Note that it is not white space that can go
before the # token, only space characters and horizontal-tabs.  (White
space consists of space characters, horizontal tabs, new-lines,
vertical tabs, form feeds, and comments. See Section C.1-Semantics.)
				-- Mod -- ]

------------------------------

End of mod.std.c Digest - Thu,  2 May 85 09:00:03 EDT
******************************
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