F$LENGTH(): Difference between revisions
Jump to navigation
Jump to search
Created page with "'''F$LENGTH()''' is a lexical function that returns the length of the specified character string as an integer. =Format= F$LENGTH(string) '''String'''..." |
No edit summary |
||
| Line 21: | Line 21: | ||
$ if f$locate(b,a) .ne. f$length(a) then write sys$output "A contains B" | $ if f$locate(b,a) .ne. f$length(a) then write sys$output "A contains B" | ||
</nowiki> | </nowiki> | ||
[[Category: Lexical Functions]] | |||
Latest revision as of 05:48, 15 January 2019
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"