copx wrote:
>
Do the standards say anything about size limits for string literals (min
size, max size)? I want to know this to make sure that my code is portable.
The program in question is ANSI C89, but I would also be interested in
whether or not ISO C99 changed the limits (if any exist).
Yes they do. I believe the C89/C90/C95 limit is roughly 510 bytes,
and that C99 expanded it to roughly 1020 bytes. Look in the C
standard.
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://c-faq.com/ (C-faq)
<http://benpfaff.org/writings/clc/off-topic.html>
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf(C99)
<http://cbfalconer.home.att.net/download/n869_txt.bz2(C99, txt)
<http://www.dinkumware.com/c99.aspx (C-library}
<http://gcc.gnu.org/onlinedocs/ (GNU docs)
<http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from
http://www.teranews.com