#: 11472 S3/Languages
24-Jul-91 05:19:09
Sb: #11458-#C Compiler Problem
Fm: Kevin Darling 76703,4227
To: Pete Lyall 76703,4230 (X)
Pete - Thanks kindly, but no good eye here. Took silly me hours to figure out
(partly because you said it looked okay at first :-).
"That still doesn't directly explain why his ints are FCB 1's instead of FDB
1's though.."
Yeah, that's pretty strange. Playing around, it appears that when it expects
the string array parts, it counts up each item (anything inside quotes counts
as one item) after that as _one_ char (to be put into the string array). In
other words, using:
* "abcdefgh",0,1,
fdb _1 all items (even this line) counted as "one" char, and
fcb 0 this continues until the end of the _entire_ array[3]
fcb 1 at which time rzb's fill up any extra space to make 33
(11 bytes in each unit * 3 units in array)
* { "abcdefgh",0,1},
fdb _1
fcb 0 using the {} around each full array unit here
fcb 1 does slightly better... this forces the compiler
rzb 5 to at least lump each unit's stuff together :-)
rzb 2
rzb 1 = 11 bytes/unit = correct size, at least :-)
* {{ "abcdefgh"},0,1},
fdb _1
rzb 7 more {}'s forced the compiler to try to
fdb 0 add up the first [8] array, then the INT,
fcb 1 then the CHAR. Almost correct!
In other words, it was trying to fill up the "char _mnen[8]" unit first... and
I think it was using ","s to find them. More {}'s forced it to lump things
together better. Of course, the _mnen assignment source had to be changed to
make it all perfect. kevin
There is 1 Reply.
|