VMS Help
Lexicals, F$STRING
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Returns the string that is equivalent to the specified
expression.
Format
F$STRING(expression)
A character string equivalent to the specified expression.
expression
The integer or string expression to be evaluated.
If you specify an integer expression, the F$STRING function
evaluates the expression, converts the resulting integer to
a string, and returns the result. If you specify a string
expression, the F$STRING function evaluates the expression and
returns the result.
When converting an integer to a string, the F$STRING function
uses decimal representation and omits leading zeros. When
converting a negative integer, the F$STRING function places a
minus sign at the beginning string representation of the integer.
$ A = 5
$ B = F$STRING(-2 + A)
$ SHOW SYMBOL B
B = "3"
The F$STRING function in this example converts the result of
the integer expression (-2 + A) to the numeric string, "3".
First, the F$STRING function evaluates the expression (-2
+ A). Note that 5, the value of symbol A, is automatically
substituted when the integer expression is evaluated.
After the integer expression is evaluated, the F$STRING
function converts the resulting integer, 3, to the string "3".
This string is assigned to the symbol B.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.