On Mon, 26 May 2003, Maurice Lombardi wrote:
There's another odity related to program in this example:
bash-2.05b$ more strconst.pas program strconst (output);
var digits : String [35] value '0123456789abcdefghijklmnopqrstuvwxyz';
begin WriteLn ('digits = ', digits); end.
bash-2.05b$ gpc strconst.pas strconst.pas:5: warning: string constant exceeds capacity -- truncated bash-2.05b$
When digits is set to String[36], only then the constant is not truncated.
Is there some rule about this behavior, or should it be set even higher than Sizeof('0123456789abcdefghijklmnopqrstuvwxyz')+10 so it would be safe for all architectures?
Your string is 36 chars length (10 digits + 26 alphas), isn'it. What is strange then ?
Sorry. I was probably converting number base systems too much today :-P= Excuse moi.
Mirsad