02/21/84 answer Syntax: answer STR {-control_args} command_line Function: provides preset answers to questions asked by another command. Arguments: STR is the desired answer to any question. If the answer is more than one word, it must be enclosed in quotes. If STR is -query, the question is passed on to you. The -query control argument is the only one that can be used in place of STR. command_line is any Multics command line. It can contain any number of separate arguments (i.e., have spaces within it) and need not be enclosed in quotes. Control arguments: -brief, -bf suppresses printing (on your terminal) of both the question and the answer. -call STR evaluates the active function string STR to obtain the next answer in a sequence. STR must be quoted if it contains command language characters. The surrounding brackets must be omitted, as in "segs *.pl1". The return value "true" is translated to "yes", and "false" to "no". All other return values are passed as is. -match STR answers only questions whose text matches STR. If STR is surrounded by slashes (/), it is interpreted as a qedx regular expression. Otherwise, answer tests whether STR is literally contained in the text of the question. Multiple occurrences of -match and -exclude are allowed (see Notes below). They apply to the entire command line. -exclude STR, -ex STR passes on, to you or other handler, questions whose text matches STR. If STR is surrounded by slashes (/), it is interpreted as a qedx regular expression. Otherwise, answer tests whether STR is literally contained in the text of the question. Multiple occurrences of -match and -exclude are allowed (see Notes below). They apply to the entire command line. -query skips the next answer in a sequence, passing on the question to you. The answer is read from the user_io I/O switch. -then STR supplies the next answer in a sequence. -times N gives the previous answer (STR, -then STR, or -query) N times only, where N is an integer. Notes: Answer provides preset responses to questions by establishing an on unit for the condition command_question and then by executing the designated command. If the specified command calls the command_query_ subroutine (see the Subroutines manual) to ask a question, the on unit is invoked to supply the answer. The on unit is reverted when the answer command returns to command level. See "List of System Conditions and Default Handlers" in the Programmer's Reference Manual for a discussion of the command_question condition. If a question is asked that requires a yes or no answer, and the preset answer is neither "yes" nor "no", the on unit is not invoked. The last answer specified is issued as many times as necessary, unless followed by -times. The -match and -exclude control arguments are applied in the order specified. Each -match causes a given question to be answered if it matches STR; each -exclude causes it to be passed on if it matches STR. A question that has been excluded by -exclude is reconsidered if it matches a -match later in the command line. For example, the command line answer yes -match /fortran/ -exclude /fortran_io/ -match /^fortran_io/ answers questions containing the string "fortran" or beginning with "fortran_io", but does not answer questions containing "fortran_io". ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved