This function scans an input string for a key.
result = KEYVAL(string,key,[default])
Parameters
Contains one of the following results:
If an error occurs, error text is returned.
If the key is found, the next blank-delimited word is returned.
Otherwise, the value for default is returned.
Text string to be scanned.
Keyword value to scan for in the input string.
If matched, the value that is returned is the first non-blank character after key, and all subsequent characters until the next blank.
Value to be returned if key is not found.
Default: null string.
ARG n MISSING OR INVALID
Example
keyval('a hush was heard','hu','NOT FOUND') == 'was' /* Next word */ keyval('a hush was heard',' hu ','NOT FOUND') == 'NOT FOUND'
Copyright © 2014 CA Technologies.
All rights reserved.
|
|