Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Request for Charter and/or FAQ

0 views
Skip to first unread message

Thomas A. Baker

unread,
Sep 1, 1993, 8:31:05 AM9/1/93
to
My two specific requests are:

1) Where is the charter for this group (if there is one)?

2) Where is the FAQ for this group (if there is one)?

Responses by E-mail are appreciated.

Also, please understand in advance that letters in which the author
"explains the purpose of the newsgroup" are okay, but necessarily
don't carry the same weight as either of the two documents mentioned.
(Just trying to get to the heart of it.)

Thank you.

Tom Baker
C/C++/Unix

Stan Brown

unread,
Sep 1, 1993, 5:30:26 PM9/1/93
to
In article <2624m9$k...@news.bu.edu> tomb...@world.std.com (Thomas A. Baker) writes:
> 2) Where is the FAQ for this group (if there is one)?

Time for a reminder. comp.std.c as such has no FAQ list.

The FAQ list on comp.lang.c is very, very good, however. Since it's
about the C language, ANSI standards issues are very well covered there,
along with pre-ANSI idioms.

--
Stan Brown, Oak Road Systems br...@Ncoast.ORG

Can't find FAQ lists? ftp to 'rtfm.mit.edu' and look in /pub/usenet
(or email me >>> with valid reply-to address <<< for instructions).

John R Kennedy

unread,
Sep 20, 1993, 3:08:07 PM9/20/93
to
I know there are mechanisms for inserting control characters in string
constants, e.g. "\n" or "\015", but does the ANSI standard forbid inserting
control codes directly? I realize that inserting newlines or tabs directly
won't produce the desired result, but what about other characters, for
example control-A? My Borland compiler excepts this without warning, BTW.

Thanks,
JFK
p00...@psilink.com

Data Rentals and Sales

unread,
Sep 20, 1993, 4:19:13 PM9/20/93
to

It's OK for a compiler to accept control characters in string
constants, but the your code isn't strictly-conforming. The reason
control codes are excluded is that they cannot be represented on all
machines. Not all machines *have* control-A.

--
#include <standard.disclaimer>
_
Kevin D Quitt 96.37% of all statistics are made up

John R Kennedy

unread,
Sep 21, 1993, 4:54:39 PM9/21/93
to
I know we are not supposed to make assumptions about the character
set in ANSI C. But can I at least assume that the digits are in
consecutive order? For example, can I assume that '5' - '0' = 5?

Thanks,
John
p00...@psilink.com

Norman Diamond

unread,
Sep 21, 1993, 8:53:11 PM9/21/93
to
In article <295772338...@psilink.com> "John R Kennedy" <p00...@psilink.com> writes:
>But can I at least assume that the digits are in consecutive order?

ANSI Classic section 2.2.1, page 11 lines 25 to 26, says yes: "In both
the source and execution basic character sets, the value of each character
after 0 in the above list of decimal digits shall be one greater than the
value of the previous."
--
<< If this were the company's opinion, I would not be allowed to post it. >>
A program in conformance will not tend to stay in conformance, because even if
it doesn't change, the standard will. Force = program size * destruction.
Every technical corrigendum is met by an equally troublesome new defect report.

Vince DeMarco

unread,
Sep 21, 1993, 5:21:24 PM9/21/93
to

This is a test

Vince DeMarco

unread,
Sep 21, 1993, 5:23:37 PM9/21/93
to

This is a test

Norman Diamond

unread,
Sep 22, 1993, 3:39:38 AM9/22/93
to

As another respondent pointed out, this would render your program not
strictly conforming. However, this is already a fuzzy area in the standard.
The conversion from physical source file characters to the source character
set occurs in phase 1 but is not standardized and is not required to be
implementation-defined (ANSI classic section 2.1.1.2, page 6 lines 25 to 26).

A byte with numeric value 1 probably exists in the physical character set
and probably doesn't have a graphic associated with it, though it might not
be a control-A. An implementation is free to map it to a C character (such
as the letter A) but that would be rather rude. An implementation is also
free to map it to some other member of the basic source character set which
doesn't have to be defined. Your implementation did this.

If such a character occurs outside of a character constant, string literal,
comment, or preprocessing token that is never converted to a token, then
behavior is undefined (ANSI Classic section 2.2.1, page 11 lines 29 to 31).
But if such a character occurs inside one of those, such as your control-A
inside a string literal, then it seems that the behavior is not undefined.
The implementation must accept, but doesn't have to say what it did with it.

If you include a tab in a string literal then it works, but if you try to
include a newline in a string literal then it's a syntax error (ANSI Classic
section 3.1.4, page 31 lines 29 to 30).

Arjan Kenter

unread,
Sep 22, 1993, 5:30:08 AM9/22/93
to

<VINCE.93S...@pacific.cpsc.ucalgary.ca> writes:

>This is a test

This is not a test site :-)

Christopher R. Volpe

unread,
Sep 22, 1993, 9:17:14 AM9/22/93
to
In article <295772338...@psilink.com>, "John R Kennedy" <p00...@psilink.com> writes:
|> I know we are not supposed to make assumptions about the character
|> set in ANSI C. But can I at least assume that the digits are in
|> consecutive order? For example, can I assume that '5' - '0' = 5?
|>

Yes. ANSI Classic 2.2.1 states:

In both the source and execution character sets, the value of
each character above 0 in the above list of decimal digits shall be


one greater than the value of the previous.

|> Thanks,
|> John
|> p00...@psilink.com
|>

--

Chris Volpe
G.E. Corporate R&D
vol...@crd.ge.com

Peter Holzer

unread,
Sep 22, 1993, 9:37:01 AM9/22/93
to
dia...@jit.dec.com (Norman Diamond) writes:

>In article <295763051...@psilink.com> "John R Kennedy" <p00...@psilink.com> writes:
>>control codes directly? I realize that inserting newlines or tabs directly

>>won't produce the desired result [...]

>If you include a tab in a string literal then it works, but if you try to
>include a newline in a string literal then it's a syntax error (ANSI Classic
>section 3.1.4, page 31 lines 29 to 30).

Seems you two don't agree whether a tab works (whatever that means) or
not. The problem John had was probably (guessing from my own experience
from using various editors) that Borland's editor (not compiler)
decided that John really didn't want a tab in there and silently
replaced it by an appropriate number of spaces.

ObStandardRelatedQuestion: Is the editor part of the C Implementation?
:-)

hp
--
_ | h...@vmars.tuwien.ac.at | Peter Holzer | TU Vienna | CS/Real-Time Systems
|_|_) |------------------------------------------------------------------------
| | | ...and it's finished! It only has to be written.
__/ | -- Karl Lehenbauer

Lezz Giles

unread,
Sep 22, 1993, 10:06:09 AM9/22/93
to
In article <27o7ln$7...@usenet.pa.dec.com>, dia...@jit.dec.com (Norman Diamond) writes:
|>In article <295772338...@psilink.com> "John R Kennedy" <p00...@psilink.com> writes:
|>>But can I at least assume that the digits are in consecutive order?
|>
|>ANSI Classic section 2.2.1, page 11 lines 25 to 26, says yes: "In both
|>the source and execution basic character sets, the value of each character
|>after 0 in the above list of decimal digits shall be one greater than the
|>value of the previous."

For people interested in the latest standard, ISO/IEC 9899 section 5.2.1
contains exactly the same wording (and presumably exactly the same list
of decimal digits :-)

Lezz "not a language lawyer but training to be one" Giles

0 new messages