
734 Appendix B
Expression Evaluator Functions
References
6. The FINFO function returns a string, Boolean, or an integer value. The result depends
upon the option specified.
The first parameter, filename, is a string, the name of the file for which you want the
information. This must be a fully or partly qualified file name, or a string expression
that yields such a file name.
This parameter can also be a string that specifies a file equation by backreference, for
example, FINFO(“*XIN‘, 1), which references the equation FILE XIN=....
The second parameter, option, may be an integer (or integer expression) corresponding
to the FLABELINFO intrinsic item numbers. Options 0 and 1 and the negative options
are exceptions. The negative options provide the same information as their positive
counterparts, except the format of the data is different.
The option parameter may also be a string mnenomic which corresponds to an integer
value. The string value is often easier to remember than the integer. Table B-2, which
follows, summarizes all of the FINFO options.
Users with system manager (SM) capabilities may use options 4 and 33 on any file
within the system. Users with account manager (AM) capabilities may use those
options only on files within their account.
7. The DWNS() and UPS() functions operate only on ASCII characters in the ranges "a"
through "z" and "A" through "Z".
8. The ORD() and CHR() functions operate only on ASCII characters in the range 0
through 255.
9. 0^0 (zero to the zero power) yields 1.
10.The INPUT() function is different from other evaluator functions in that the execution
of the command in which the function appears stops while input is taken from the user.
The syntax is as follows:
INPUT([prompt][,wait])
INPUT reads from $STDIN. If a prompt is specified, it is written to $STDLIST before
reading. If a wait is specified, the read is a timed read. The duration of the timed read is
the lesser of wait seconds or the value of the HPTIMEOUT variable in minutes. The result
of the read is returned as the string value of the function. If the user gave no input, but
just pressed
Return, the empty string is returned. If the timeout specified in the function
itself (as opposed to the HPTIMEOUT timeout) expires, the empty string is returned. If
the HPTIMEOUT timeout expires, the session is terminated.
NOTE This function should be used carefully since it interrupts execution of a
command. It is not executed if it is skipped as a result of evaluation of a
previous clause of a Boolean expression. This is the right side of an AND
where the left is FALSE or the right side of an OR where the left is TRUE.
For example:
IF "!filename" = " " AND SETVAR (filename,input &
('Enter filename:'))<>" " THEN
comment If filename is not empty, the left