Slide 7 of 80
Notes:
- The CI currently supports 56 functions, over twice as many functions as in the base release of 5.0. However, the CI only supports predefined functions -- user written functions are unavailable.
- Help is available for all functions by entering HELP functionName. A summary of the CI functions can be seen by entering HELP FUNCTIONS. To get function help on a function that has the same name as a CI command, enter HELP function_nameFN, e.g.. HELP setvarFN or HELP inputFN.
- The arguments to a function can be a literal constant, the name of a variable, or another function. When a variable is used as a function argument, its value will be used as the argument value. However, five functions accept a variable name but do not evaluate the variable (i.e. they don’t use its value): JINFO, PINFO, SETVAR, WORD and XWORD.
- Functions can be nested, that is, function A can invoke function B to obtain the value for one of function A’s parameters. The only nesting limit is defined by the size of the CI’s internal buffer that holds the command line -- currently 511 bytes. There is an exception to nesting -- the ANYPARM function is special. Since anyparm() ignores all delimiters, including all but the last right parentheses, it cannot be nested inside other functions, nor can other functions be nested within anyparm’s argument.
- FSYNTAX(“f.g.a”) “MPE” FSYNTAX(“./a[c-g]”) “POSIX;WILD”
- FQUALIFY(“f”) “F.GRP.ACCT” or “/CWD/F” FQUALIFY(“./f”) “/CWD/f”
- DELIMPOS(“a,b;c d”) 2 useful when delimiter is a set of two or more characters
- EDIT(“ab;cd,ef”,”dw”) “;cd ef” full REDO programmatic editing
- PMATCH(“ab”,”abc”) FALSE easy way to add pattern matching PMATCH(“ab@”,”abc”) TRUE
- WORDCNT(“a b,c=,d”) 5 test if a variable contains the expected number tokens (value of ‘c’ is null, but counts as a token -- consistent with word and xword)
- XWORD(“Hi there, Fred”) “there, Fred”