Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Languages Misc > Re: NUL to term...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 33 of 61 Topic 1118 of 1217
Post > Topic >>

Re: NUL to terminate strings; was reinventing ASCII?

by Morris Dovey <mrdovey@[EMAIL PROTECTED] > Mar 8, 2008 at 09:45 AM

James Harris wrote:
> 
> On 6 Mar, 10:34, torb...@[EMAIL PROTECTED]
 (Torben Ęgidius Mogensen)
> wrote:
> > James Harris <james.harri...@[EMAIL PROTECTED]
> writes:
> ...
> > Why would we need a null character?  I know that it in C is used as
> > end-of-string marker, but that is a horrible design decision.  If any
> > single character should mark the end of a string, it should be EOT.

> I expect the C folks will be able to correct me. Hence I'm copying
> them this reply.

The NUL terminator was one of the methods used to terminate
strings before C came along (other methods included setting the
high-order bit of the final character and the '$' as a
terminating character). The selection of NUL was probably an
attempt to choose a "do no harm" option, since some hardware
recognized the EOT and might react in unintended/undesirable
ways, while NUL was generally harmless.

> Of course, there are other ways strings can be defined, even in C,
> with the right library sup****t.

Stratus VOS was originally written in PL/I and their C compiler
allowed both PL/I strings (where the start-of-string included a
length) and the standard-compliant NUL terminator. (The amount of
confusion produced by using both methods in a single system has
to be experienced to be believed.)

-- 
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto
 




 61 Posts in Topic:
reinventing ASCII?
wildhalcyon <wild.halc  2008-03-03 05:56:01 
Re: reinventing ASCII?
"cr88192" <c  2008-03-04 05:35:03 
Re: reinventing ASCII?
"Rod Pemberton"  2008-03-03 15:13:13 
Re: reinventing ASCII?
Jacko <jackokring@[EMA  2008-03-03 12:58:14 
Re: reinventing ASCII?
torbenm@[EMAIL PROTECTED]  2008-03-04 10:19:06 
Re: reinventing ASCII?
Eliot Miranda <eliotm@  2008-03-04 13:18:31 
Re: reinventing ASCII?
"Charlie Gordon"  2008-03-05 03:58:24 
Re: reinventing ASCII?
ram@[EMAIL PROTECTED] (S  2008-03-05 03:26:51 
Re: reinventing ASCII?
torbenm@[EMAIL PROTECTED]  2008-03-05 10:31:40 
Re: reinventing ASCII?
Edward Feustel <efeust  2008-03-05 06:32:23 
Re: reinventing ASCII?
James Harris <james.ha  2008-03-05 15:05:37 
Re: reinventing ASCII?
torbenm@[EMAIL PROTECTED]  2008-03-06 11:34:33 
Re: NUL to terminate strings; was reinventing ASCII?
James Harris <james.ha  2008-03-08 07:16:34 
Re: NUL to terminate strings; was reinventing ASCII?
Eric Sosman <esosman@[  2008-03-08 10:48:58 
Re: NUL to terminate strings; was reinventing ASCII?
"Rod Pemberton"  2008-03-08 19:29:00 
Re: NUL to terminate strings; was reinventing ASCII?
Ulrich Eckhardt <dooms  2008-03-09 09:18:15 
Re: NUL to terminate strings; was reinventing ASCII?
torbenm@[EMAIL PROTECTED]  2008-03-11 11:04:42 
Re: NUL to terminate strings; was reinventing ASCII?
santosh <santosh.k83@[  2008-03-11 16:26:16 
Re: NUL to terminate strings; was reinventing ASCII?
richard@[EMAIL PROTECTED]  2008-03-11 11:10:37 
Re: NUL to terminate strings; was reinventing ASCII?
torbenm@[EMAIL PROTECTED]  2008-03-12 09:43:18 
Re: NUL to terminate strings; was reinventing ASCII?
santosh <santosh.k83@[  2008-03-12 14:25:04 
Re: NUL to terminate strings; was reinventing ASCII?
"Wilhelm B. Kloke&qu  2008-03-12 09:18:23 
Re: NUL to terminate strings; was reinventing ASCII?
Marco van de Voort <ma  2008-03-12 11:08:21 
Re: NUL to terminate strings; was reinventing ASCII?
"Wilhelm B. Kloke&qu  2008-03-12 12:33:14 
Re: NUL to terminate strings; was reinventing ASCII?
Marco van de Voort <ma  2008-03-12 14:11:25 
Re: NUL to terminate strings; was reinventing ASCII?
Chris Dollin <chris.do  2008-03-12 13:33:42 
Re: NUL to terminate strings; was reinventing ASCII?
"Wilhelm B. Kloke&qu  2008-03-12 15:34:40 
Re: NUL to terminate strings; was reinventing ASCII?
"Default User"   2008-03-12 18:22:45 
Re: NUL to terminate strings; was reinventing ASCII?
"Default User"   2008-03-12 18:22:45 
Re: NUL to terminate strings; was reinventing ASCII?
"Default User"   2008-03-11 21:26:05 
Re: NUL to terminate strings; was reinventing ASCII?
Micah Cowan <micah@[EM  2008-03-11 15:14:10 
Re: NUL to terminate strings; was reinventing ASCII?
richard@[EMAIL PROTECTED]  2008-03-11 22:27:14 
Re: NUL to terminate strings; was reinventing ASCII?
Morris Dovey <mrdovey@  2008-03-08 09:45:05 
Re: NUL to terminate strings; was reinventing ASCII?
Ben Bacarisse <ben.use  2008-03-08 17:22:36 
Re: NUL to terminate strings; was reinventing ASCII?
billg999@[EMAIL PROTECTED  2008-03-08 18:27:46 
Re: NUL to terminate strings; was reinventing ASCII?
James Harris <james.ha  2008-03-09 17:16:03 
Re: NUL to terminate strings; was reinventing ASCII?
richard@[EMAIL PROTECTED]  2008-03-10 01:08:23 
Re: NUL to terminate strings; was reinventing ASCII?
Ben Bacarisse <ben.use  2008-03-10 12:13:19 
Re: NUL to terminate strings; was reinventing ASCII?
James Harris <james.ha  2008-03-10 08:45:25 
Re: NUL to terminate strings; was reinventing ASCII?
"Rod Pemberton"  2008-03-10 19:26:16 
Re: NUL to terminate strings; was reinventing ASCII?
Eric Sosman <esosman@[  2008-03-10 21:03:06 
Re: NUL to terminate strings; was reinventing ASCII?
Marco van de Voort <ma  2008-03-11 11:06:14 
Re: NUL to terminate strings; was reinventing ASCII?
CBFalconer <cbfalconer  2008-03-11 15:22:58 
Re: NUL to terminate strings; was reinventing ASCII?
Eric Sosman <Eric.Sosm  2008-03-13 17:37:20 
Re: NUL to terminate strings; was reinventing ASCII?
rlb@[EMAIL PROTECTED] (R  2008-03-14 09:32:54 
Re: NUL to terminate strings; was reinventing ASCII?
Eric Sosman <esosman@[  2008-03-14 09:21:41 
Re: NUL to terminate strings; was reinventing ASCII?
"Rod Pemberton"  2008-03-14 17:48:27 
Re: NUL to terminate strings; was reinventing ASCII?
Morris Dovey <mrdovey@  2008-03-10 10:35:21 
Re: NUL to terminate strings; was reinventing ASCII?
"Rod Pemberton"  2008-03-10 19:09:27 
Re: NUL to terminate strings; was reinventing ASCII?
Eric Sosman <esosman@[  2008-03-10 21:00:14 
Re: NUL to terminate strings; was reinventing ASCII?
Marco van de Voort <ma  2008-03-11 11:04:46 
Re: NUL to terminate strings; was reinventing ASCII?
billg999@[EMAIL PROTECTED  2008-03-11 12:04:26 
Re: NUL to terminate strings; was reinventing ASCII?
billg999@[EMAIL PROTECTED  2008-03-11 12:07:36 
Re: NUL to terminate strings; was reinventing ASCII?
Neilist <lattoralee@[E  2008-03-11 14:28:23 
Re: NUL to terminate strings; was reinventing ASCII?
richard@[EMAIL PROTECTED]  2008-03-11 22:22:36 
Re: NUL to terminate strings; was reinventing ASCII?
Richard <devr_@[EMAIL   2008-03-11 23:23:21 
Re: NUL to terminate strings; was reinventing ASCII?
Jacko <jackokring@[EMA  2008-03-12 11:49:33 
Re: NUL to terminate strings; was reinventing ASCII?
Micah Cowan <micah@[EM  2008-03-12 19:01:00 
Re: NUL to terminate strings
CBFalconer <cbfalconer  2008-03-10 17:35:16 
Re: NUL to terminate strings
rlb@[EMAIL PROTECTED] (R  2008-03-14 09:28:38 
Re: NUL to terminate strings; was reinventing ASCII?
BruceMcF <agila61@[EMA  2008-04-12 18:27:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:10:41 CDT 2008.