The construct
     char x[3] = "ABC";
will legally initialize an array of char without adding the '\0'.  The only
restriction is that this is not a string.

:>: -----Original Message-----
:>: From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
:>: Behalf Of John Gilmore
:>: Sent: Tuesday, September 04, 2012 9:02 AM
:>: To: IBM-MAIN@LISTSERV.UA.EDU
:>: Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12
:>: announcment)
:>:
:>: If you construct an array by initializing it element by element you
:>: get an array, one that is not nul-delimited or 'of conceptually
:>: unlimited length', whatever that may mean.
:>:
:>: If you construct a string by initializing a character array with a
:>: string, you get a nul-delimited string implemented under the
:>: hood|bonnet as an array.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to