Charles Mills wrote:
Just because you *can* create a malformed string with no delimiter does not
mean that my statement about proper C behavior is untrue.
It is a true statement that "the z architecture stores integers in big-endian
form." Nonetheless, I *can* create a little-endian
integer on z. That does not make the statement untrue.
BTW, C++ gives an error for the s6[6] = "wombat" case.
Charles
There is a different reason for this error - although it's done "on
purpose". C++ is
much more strongly typed than C... it checks things more rigourously.
You can imagine
given the ideas of function overloading, templates, etc... that the type
system needs this
rigor to properly differentiate things.
The Dignus C++ compiler with this example yields these two error
messages (which might
be more informative to the programmer):
cxx: t.c line 3:Error #144: a value of type "const char [7]" cannot
be used to initialize an entity of type "char [6]"
char s6[ 6 ] = "wombat";
cxx: t.c line 6:Error #144: a value of type "const char [7]" cannot
be used to initialize an entity of type "char [5]"
char s5[ 5 ] = "wombat";
- Dave RIvers -
--
[email protected] Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN