Larry,
 
Now I have an understanding but how do you know all the codes.
 
IE: What does would this do?
 
(CHAR(10)) 
 
Thanks 
 
Steve

________________________________

From: [email protected] on behalf of Lawrence Lustig
Sent: Sun 3/9/2008 11:33 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: CHAR


<<
Can any one let me know where I can learn more about how CHAR works.
>>

Each character on the computer is represented internally by a numerical code.  
That's true of all the letters, numbers, symbols, and various non-printable 
characters.  For instance, "A" is, I believe number 65 (lower case "a" is 
something else).

Normally, you can just manipulate characters in R:Base using text values:

SET VAR vMyChar = "A"

Sometimes, however, you need to insert non-printable (and non-typeable) 
characters into a text string.  For instance, you often need to insert a 
carriage return (character number 13) into a text string to cause wrapping at a 
particular location.  This won't work:

SET VAR vMyString = "Wrap Text (Hey, Carriage Return Here) Before This Word"

R:Base allows you to "create" an instance of any character using the CHAR 
function.  You feed in an integer stating which character you're trying to 
create, and the return value of the CHAR function will be that character:

SET VAR vMyString = "Wrap Text" + (CHAR(13)) + "Before This Word"

Hope this is what you were looking for.
--
Larry


Reply via email to