MQ> My experience with this was with a variable defined in a TYPE
MQ> statement. To verify my past results I wrote a NEW test program as
MQ> follows:
MQ>
MQ> TYPE test
MQ> a as STRING * 10
MQ> END TYPE
MQ>
Ok, this is what you will learn from this venture... Strings are null
padded when defined in TYPE structures and the actual data length is
less than the defined length.
Hence, you now see why your rtrim$(variable) does not work, because this
function without additional parameters defaults to stripping a space,
ascii 32, and not a null, ascii 0.
Hence, rtrim$(variable, any chr$(0)+" ") takes BOTH into consideration,
and also bear in mind there is more than 1 way of expressing this (see
other examples.)
So, statements such as "it does not work" was factually incorrect, since
you told the computer to strip spaces from a string which was null padded,
and - of course - the computer did exactly as told by the programmer.
Your original statement, not in context to what you presented in the
last message, MATTERS in the results you get from programmers such as
myself in this echo.
Take care,
-James (SysOp/AD Message System)
--- QuickBBS 2.80 (Zeta-1.9A)
---------------
* Origin: [Team QuickBBS] [Team OmegaSoft] [PB Fanatic!] (FIDONET 1:109/611)
|