F$LENGTH()

From VSI OpenVMS Wiki
Revision as of 05:48, 15 January 2019 by Darya.zelenina (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

F$LENGTH() is a lexical function that returns the length of the specified character string as an integer.

Format

F$LENGTH(string)

String is the string whose length is to be defined.

Examples

Determining the length of a string:

$ name = "Teddy"
$ length = f$length(name)
$ show sym length
  LENGTH = 5   Hex = 00000005  Octal = 00000000005
 

Finding out if line A contains line B:

$ A = "I hate bananas"
$ B = "bananas"
$ if f$locate(b,a) .ne. f$length(a) then write sys$output "A contains B"