James Goldbloom wrote in a message to Michael Quinlan:
JG> You obviously did not test your theory. I just did, and it
JG> stripped the variable beautifully of the spaces. No need to
JG> declare a second variable with slows down the process, uses memory,
JG> etc., etc. Matter of fact, it's sloppy programming.
My experience with this was with a variable defined in a TYPE statement. To
verify my past results I wrote a NEW test program as follows:
TYPE test
a as STRING * 10
END TYPE
dim b as TEST
dim c as STRING * 10
b.a = "12345"
c = "12345"
b.a = RTRIM$(b.a)
c = RTRIM$(c)
print "["+b.a+"]"
print "["+c+"]"
The results I get on screen are:
[12345 ]
[12345 ]
JG> Sorry, Michael. No offense taken I hope, but you're quite wrong on
I take no offense at someone pointing out what they think is an error on my
part. But since my test gives the results I expected, there must be
something wrong with my test. So, what's wrong with my test?
JG> this stuff, all around. I had to clarify something so blatantly
JG> off, so as not to confuse new users to PB about bad programming
JG> habits. Surely you will see other replies from other users, stay
JG> tuned unfortunately.
The last thing I want is to stear someone wrong, or for someone else to do
Michael
--- timEd 1.10
---------------
* Origin: The University BBS; Shrewsbury Twp NJ; V34+ (1:107/411)
|