John McKown writes:

And just to jump in to show my ignorance, I think the use of "null
terminated" strings was due to the fact that the original hardware upon
which C was written did not have anything equivalent to an MVC (storage
to storage move) instruction.

This is an eminently reasonable conjecture, but it is not in fact correct. Brian Kernighan's original minimalist design of C did not support strings, only arrays of single-character elements; and there is an important sense in which C still does not support string data types with any completeness or generality.

The null-terminated string is a species of 'language extension', crafted using the facilities native C makes available; and it is among the more ill-conceived of C's many ill-conceived features. (I, of course, am a PL/I-and-its-dialects bigot.)

John Gilmore
Ashland, MA 01721-1817
USA

_________________________________________________________________
Make every IM count. Download Messenger and join the i’m Initiative now. It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_MAY07

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to