BS> MQ> TYPE test
BS> MQ> a as STRING * 10
BS> MQ> END TYPE
BS> In this case, Quintin is correct, and you are not.A
BS> fixed-length string variable, whether DIMmed or TYPEd, will
BS> always be that length and padded on the right with nulls.
BS> Therefore, while rtrim$ will strip the nulls out ofa
Yes, this has been discussed. What you (and everyone else in this echo,
from what I've seen so far) keep forgetting is the original user in
the original message was defining one structure, then mapping it
to another variable. And, the structure was reading data which earlier
was mapped as nulls by the program which created that data.
In other words, we really are all right (you, me, others) except for
the original user who misunderstood how the original data was created.
We ALL learned something here. Maybe a few things...
* It's a waste to define a variable in a structure then copy it to another
variable.
* Null data exists in most (if not nearly all) other data structures
dynamically created by programs compiled in formats other than basic,
as the padding character. Local variables, and copied dimensioned
ones mapping to the original, can be allocated with spaces.
So, I don't disagree with ya. I just answered according to a *specific*
problem, and you guys are supplying excellent facts in a general sense.
-James
--- QuickBBS 2.80 GoldBase (Zeta-1.9A)
---------------
* Origin: [Team QuickBBS] [Team OmegaSoft] [PB Fanatic!] (FIDONET 1:109/611)
|