VMS Help  —  Lexicals  F$LENGTH  Example
  $ MESSAGE = F$MESSAGE(%X1C)
  $ SHOW SYMBOL MESSAGE
    MESSAGE = "%SYSTEM-F-EXQUOTA, exceeded quota"
  $ STRING_LENGTH = F$LENGTH(MESSAGE)
  $ SHOW SYMBOL STRING_LENGTH
    STRING_LENGTH = 33   Hex = 00000021  Octal = 000041

      The first assignment statement uses the F$MESSAGE function
      to return the message that corresponds to the hexadecimal
      value 1C. The message is returned as a character string and
      is assigned to the symbol MESSAGE.

      The F$LENGTH function is then used to return the length of
      the character string assigned to the symbol MESSAGE. You
      do not need to use quotation marks (" ")  when you use the
      symbol MESSAGE as an argument for the F$LENGTH function.
      (Quotation marks are not used around symbols in character
      string expressions.)

      The F$LENGTH function returns the length of the character
      string and assigns it to the symbol STRING_LENGTH. At the end
      of the example, the symbol STRING_LENGTH has a value equal
      to the number of characters in the value of the symbol named
      MESSAGE, that is, 33.
Close Help