VMS Help  —  Lexicals  F$STRING
    Returns the string that is equivalent to the specified
    expression.

    Format

      F$STRING(expression)

1  –  Return Value

    A character string equivalent to the specified expression.

2  –  Argument

 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.

3  –  Example

  $ 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.
Close Help