I’m sure I’ve posted this before (under the subject “160 is the new 255”), but 
it never hurts repeating. Perhaps something could be added to the Help, or an 
FTE:

In the ASCII character set used for DOS, CHAR(255) was indeed a hard space. 
Windows, however, uses the ANSI character set in which CHAR(160) is the hard 
space.

As you have noticed, ANSI CHAR(255) is the “y” with an umlaut.


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

From: [email protected] [mailto:[email protected]] On Behalf Of Doug Hamilton
Sent: March-24-15 6:52 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Adding a space to the end of a variable

Bob, wasn't (CHAR(255)) a hard space?

R>
set echo on
set var vtext = ('ABCD')
set var vText = (.vText + (CHAR(32)) )
set v vlen inte = (SLEN(.vTEXT))
sho var vtext
ABCD
sho var vlen
          4
set var vtext = ('ABCD')
set var vText = (.vText + (CHAR(255)) )
set v vlen inte = (SLEN(.vTEXT))
sho var vtext
ABCDÿ
sho var vlen
          5
ret

Or maybe (CHAR(255)) was a smiley-Y, although it showed at the R>, pasted 
above, as a blank; email client probably made it the smiley-Y.
Doug

On 3/24/2015 4:43 PM, [email protected]<mailto:[email protected]> wrote:
This seems like it should be an easy task, but for some reason it is eluding me.

I need to add a space to the end of a text variable, such as :

set var vText = (.vText + '  ')
or
set var vText = (.vText + (CHAR(32)) )

Neither of these add the space.

It is probably staring me in the face and I just can't see it today!

Thanks,
Bob

Reply via email to