From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,2afd440a210c7fb0 X-Google-Attributes: gidf7344,public X-Google-Thread: 1014db,6bdc5c27a0dec527 X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,df8a3dc583bf1f5f X-Google-Attributes: gid1164f8,public From: "Richard Stamp" Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/09/07 Message-ID: <905244797.23783.0.nnrp-09.9e98ce80@news.demon.co.uk>#1/1 X-Deja-AN: 388965867 Content-Transfer-Encoding: 7bit X-NNTP-Posting-Host: cauldron.demon.co.uk:158.152.206.128 References: <0095000017115526000002L062*@MHS> <6ss8cc$qrl@web.nmti.com> <6ssnp9$6pv$1@Starbase.NeoSoft.COM> <6svdad$ggd@web.nmti.com> <6t18af$p83$1@Starbase.NeoSoft.COM> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 905244797 nnrp-09:23783 NO-IDENT cauldron.demon.co.uk:158.152.206.128 MIME-Version: 1.0 Newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c Jordan Henderson wrote in message <6t18af$p83$1@Starbase.NeoSoft.COM>... >I still don't have the Standard document at hand, but does it clearly >say that non-hosted systems cannot have command line arguments? The opposite of "hosted" is "freestanding". It doesn't say "a freestanding implementation shall not provide a method to obtain command-line arguments", if that's what you mean, but equally it doesn't say that such a method _must_ be provided. A freestanding implementation doesn't even have to start the program by calling main(). >What exactly is the difference between hosted and non-hosted environments? A freestanding implementation, as mentioned above, calls an implementation defined funtion (not necessarily main) to start the program. If the program terminates, the effect is implementation-defined (in embedded systems it may not be expected that the program ever terminate, of course). Most significantly, freestanding implementations don't need to have the standard library -- "any library facilities available to a freestanding program are implementation-defined". Similarly, they only have to provide the headers float.h, limits.h, stdarg.h and stddef.h. >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. Right, but of course all the string-handling functions (strlen etc.) are off-limits. >So, if you >attempt to draw the line at hosted/non-hosted => core/extensions you still >have to allow nul-terminated strings in as part of the core and not just a >"convention". This is getting alarmingly close to the notorious "is the library a part of the language" bust-up we had in comp.lang.c a while ago -- around last Christmas, IIRC. It's extremely hard to draw a line which will satisfy most people, or indeed anyone other than yourself (and believe me, some of us tried). The only line which seems to have widespread acceptance is "standard or non-standard" and that's only because we have a 200-odd page document to define it. Cheers, Richard -- Richard Stamp, Bournemouth, UK