To: Deborah Donovan From: David R Tribble on Fri, Feb 13, 1998 2:49 PM Subject: Comments on ISO/IEC CD 9899 (C9X) Message-Id: <2.2.32.19980213185652.00f2d4fc@central.beasys.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Fri, 13 Feb 1998 12:56:52 -0600 To: ddonovan@itic.nw.dc.us From: David R Tribble Subject: Comments on ISO/IEC CD 9899 (C9X) Public Comment Number(s) PC-____ to PC-____ ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-02-13 Author: David R. Tribble Author Affiliation: Self Postal Address: 6004 Cave River Dr. Plano, TX 75093-6951 USA E-mail Address: dtribble@technologist.com david.tribble@central.beasys.com dtribble@flash.net Telephone Number: +1 972 738 6125, 16:00-00:00 UTC +1 972 964 1729, 01:00-05:00 UTC Fax Number: +1 972 738 6111 Number of individual comments: 1 ------------------------------------------------------------------------ Comment 1. Category: Request for clarification Committee Draft subsection: 5.2.2, 7.3.1.4, 7.3.1.6, 7.3.1.8. Title: isprint('\t') Detailed description: Section 5.2.2 defines the semantics of the standard nongraphic characters ('\a' through '\v'). Sections 7.3.1.4, 7.3.1.6, and 7.3.1.8 define the iscntrl(), isgraph(), and isprint() library functions. What is not clear is whether the "nongraphic" characters of 5.2.2 are printable or not; in particular, is the result of isprint('\t') true or false? 5.2.2 states that '\t' et al are "nongraphic", which would seem to imply that isgraph('\t') is false, and by implication, isprint('\t') is also false. It is also unspecified whether or not the "nongraphic" characters are "control characters", i.e., it does not seem clear that iscntrl('\t') must be true. Vendors are inconsistent about this. (Unix vendors, for instance, usually define isprint('\t')==0, while Microsoft Visual C defines isprint('\t')!=0.) Most seem to agree that the "nongraphic" characters of 5.2.2 are control characters (so that iscntrl('\t') is true). But '\t' appears to be a special case; yes, it's a control character, but is it also a printable character (just like ' ')? This should be clarified in the standard. (I personally think that isprint('\t') should be false; after all, if it's true, shouldn't isprint('\f') and others also be true? But I think that would be a mistake.) Perhaps the use of the word "nongraphic character" (in 5.2.2) should be replaced with something more exact, such as "control character". And perhaps the definitions of the iscntrl(), isprint(), and isgraph() functions could be clarified so that it is impossible for some character code X to be both iscntrl(X)!=0 and isprint(X)!=0, i.e., the "control" and "printable" (or "graphic") characters are defined as mutually exclusive sets. (As I recall, Clive D. W. feather wrote something on this before, but apparently it didn't make it into the draft.) ------------------------------------------------------------------------