Re: String too long
Posted in 1998
Goran Domazet wrote: > We started to compile our applications with -anyerr flag (on I4GL > 4.13, C compiler version). > Now the following code quits program with -4401 error (string too long > to fit): > > main > define a,b char(3) > let a = " " clipped > let b = "xxx",a > end main > > Why does it happen? Because your string is too long. A is 3 characters. B is 3 characters. "xxx" is 3 characters. When you assign " " clipped to A, it gets padded with blanks, out to 3 characters. CHAR variables are always padded to their defined length. You can't add a 3-character string to another 3-character string and assign the result to a 3-character string. (Well, you can, but you did say -anyerr.) June -- june_t@hotmail.com Grounded in Palo Alto, living on Oreo's