From: jordan@Starbase.NeoSoft.COM (Jordan Henderson)
Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA *
Date: 1998/09/07 [thread overview]
Message-ID: <6t24vj$kep$1@Starbase.NeoSoft.COM> (raw)
In-Reply-To: 6t1i0l$241@web.nmti.com
In article <6t1i0l$241@web.nmti.com>,
Peter da Silva <peter@baileynm.com> wrote:
>In article <6t18af$p83$1@Starbase.NeoSoft.COM>,
>Jordan Henderson <jordan@Starbase.NeoSoft.COM> wrote:
>>I still don't have the Standard document at hand, but does it clearly
>>say that non-hosted systems cannot have command line arguments?
>
>No, of course not. It says that hosted systems *do*. For embedded
>systems it's undefined behaviour, and you're allowed to initiate
>posterior expulsion of avian primates[1] if you see main(int ac, char
>**av).
>
>>Even if command line arguments are not supported in non-hosted environments,
>>I have the string constants to fall back on for my claim that nul-terminated
>>strings are a "feature" of the language.
>
>No, nul-terminated string *constants* are. What you do with them after that
>is outside the language definition, and since sizeof("...") does the right
>thing you can have any character, including a nul, in one.
>
This is getting absurd.
If nul-terminated string *constants* are a "feature" of the language, then
so are nul-terminated strings. Denying this is like saying that
ints aren't a part of the language, just int constants. After all, what
you _do_ with an int variable is outside of the definition of the language.
I know, there's a subtle difference. int is a data type, but the
nul-terminated string is not.
I would claim that the reason there is no nul-terminated string data type
in the language is one of economy. char * works so well and is so
flexible that you don't need a data type. The nul-terminated string may
not enjoy the status of "data type" in C, but I still claim that it
is a "feature" of the language.
The nul-terminated string is intimately linked to the logical expression
semantics (you can do things like "while (*s++) {"). It was thought to
be so integral that the string constant used it. Also, the entire Standard
Library makes heavy use of it.
I still claim that it's a feature of the language. You can demonstrate
programs that use other character handling techniques, just like one could
demonstrate alternate integer numeric representations in legal C language
programs without using integral types.
As I said, this is getting absurd. It's just a semantic question without
an authority to decide it. I would expect that the Standard is silent on
what constitutes a "feature". I still think arguing that the nul-terminated
string is not a "feature", for any reasonable definition of "feature" is
just pointless contentiousness.
>(in fact I recall writing code that involve doubly-nul-terminated string
>constants[2], and in embedded environments I've had occasion to use $ as the
>terminator[3])
>
>[1] STR
>[2] while(*(p+=strlen(p)+1) != '\0') ...
>[3] mercifully I've forgotten the RTOS that chose a printing character, but
> not the subtle bugs generated by passing financial info to their runtime.
>
>--
>In hoc signo hack, Peter da Silva <peter@baileynm.com>
> `-_-' "If Microsoft don't think you need it, it's not there and there's no
> 'U` way to include it yourself." -- Geoff Lane, a.s.r.
-Jordan Henderson
jordan@neosoft.com
next prev parent reply other threads:[~1998-09-07 4:00 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0095000017115526000002L062*@MHS>
[not found] ` <35E04DF1.1911@world.std.com>
[not found] ` <35E09E76.6773@earthlink.net>
1998-08-23 4:00 ` Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Terry C. Shannon
1998-08-23 4:00 ` Glenn C. Everhart
1998-08-24 4:00 ` Paul Sture
1998-08-25 4:00 ` Gregg E Economou
1998-08-25 4:00 ` John Wilson
1998-08-26 4:00 ` Gregg E Economou
1998-08-27 4:00 ` John Wilson
1998-08-25 4:00 ` Jordan Henderson
1998-08-26 4:00 ` Bob Koehler
[not found] ` <6s910k$2bo$1@Starbase.NeoSoft.COM>
[not found] ` <35e833be.0@news.wizvax.net>
1998-08-29 4:00 ` Jordan Henderson
1998-08-30 4:00 ` John Wilson
1998-08-30 4:00 ` Lawrence Kirby
1998-08-30 4:00 ` JF Mezei
1998-08-30 4:00 ` Martin Ambuhl
1998-08-31 4:00 ` Michael Rubenstein
[not found] ` <6scur7$qtk@bgtnsc02.wo <35EA0E22.C59E9476@videotron.ca>
1998-08-31 4:00 ` Will Rose
1998-08-31 4:00 ` Craig Franck
1998-08-30 4:00 ` JF Mezei
1998-08-31 4:00 ` firewind
1998-08-30 4:00 ` JF Mezei
1998-08-30 4:00 ` Chris Torek
1998-08-31 4:00 ` Gregg E Economou
1998-08-31 4:00 ` Chris Torek
1998-09-04 4:00 ` Thor Lancelot Simon
1998-08-30 4:00 ` Gregg E Economou
1998-08-30 4:00 ` K&R fight over ketchup (was: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA ) Clint Comes
1998-08-31 4:00 ` Bob Koehler
1998-09-05 4:00 ` Gregg E Economou
1998-09-05 4:00 ` Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Peter da Silva
1998-09-05 4:00 ` Jordan Henderson
1998-09-07 4:00 ` Peter da Silva
1998-09-07 4:00 ` Jordan Henderson
1998-09-07 4:00 ` Richard Stamp
1998-09-07 4:00 ` Dan Pop
1998-09-07 4:00 ` Peter da Silva
1998-09-07 4:00 ` Jordan Henderson [this message]
1998-09-08 4:00 ` Peter da Silva
[not found] ` <6t2im5$mke@espresso.cafe.net>
1998-09-08 4:00 ` Peter da Silva
1998-09-08 4:00 ` Peter da Silva
1998-09-08 4:00 ` Tim Shoppa
[not found] ` <6t4cui$hfu@espresso.cafe.net>
1998-09-09 4:00 ` Tim Shoppa
1998-09-08 4:00 ` JF Mezei
1998-09-09 4:00 ` Dan Pop
1998-09-09 4:00 ` Peter da Silva
1998-09-08 4:00 ` JF Mezei
1998-09-08 4:00 ` Dan Pop
1998-09-08 4:00 ` Peter da Silva
1998-09-08 4:00 ` Dan Pop
1998-08-29 4:00 ` Gregg E Economou
1998-08-30 4:00 ` Jay Maynard
1998-08-26 4:00 ` Paul Sture
1998-08-27 4:00 ` Gregg E Economou
1998-08-28 4:00 ` Paul Sture
1998-08-26 4:00 ` Bob Koehler
1998-08-27 4:00 ` Peter da Silva
1998-08-31 4:00 ` Boris
1998-08-27 4:00 ` Thor Lancelot Simon
1998-08-28 4:00 ` TERENCE MURPHY
1998-08-28 4:00 ` George Cornelius
1998-08-28 4:00 ` Monty Brandenberg
1998-08-28 4:00 ` Greg Thomas
1998-08-29 4:00 ` mathog
1998-09-01 4:00 ` Greg Thomas
1998-08-29 4:00 ` Gregg E Economou
1998-09-05 4:00 ` Peter da Silva
1998-08-28 4:00 ` Bob Koehler
1998-09-05 4:00 ` Peter da Silva
1998-09-08 4:00 ` Carl Perkins
1998-08-31 4:00 ` Boris
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox