Wednesday, September 27, 2007
Tip of the Day #2: Finding INTEGER value for a given TEXT String
Did you know that you can find the INTEGER value for a given
TEXT string by using the undocumented ISTR function of R:BASE?
Here's how:
Syntax:
(ISTR('textstring',position))
Returns the corresponding integer value.
This function converts a single character, which you specify
within a string by position, returning its corresponding ASCII
Character Chart Decimal value.
In the following example, the INTEGER value of vDecimalValue
is 65 for the capital letter A.
Example 01:
Start R:BASE for DOS or R:BASE for Windows
At the R> Prompt:
SET VARIABLE vDecimalValue = (ISTR('R:BASE Rocks!',4))
SHOW VARIABLE
vDecimalValue = 65 INTEGER
Very Best R:egards,
Razzak.