DEFAULT
The handling programs in this book, whose names all begin with the letter H (e.g. HEQECL, HALTAZ, etc.) require the user to supply answers to questions such as ‘Today's date?’ or ‘Geographical latitude?’. Often it is convenient to make use of default settings for the answers, especially if they are many characters in length. Routine DEFAULT allows you to do this very simply. To use it, you supply the question in the string variable Q$, the number of variables to be entered in N (= 1, 2, or 3) and the default settings for those variables in X, Y, and Z. The routine then displays the question on the screen together with the default settings in square brackets [], and waits for a response. You may enter new numbers for the variables as usual if you wish. Alternatively, you can enter a comma (,) in place of every variable, and the routine uses the default values instead. The new values, or default settings, are returned in the same variables X, Y, and Z.
Routine DEFAULT is used later in the book in the handling programs HELOSC, HPCOMET, HPFIT, and HEFIT. In HELOSC, for example, lines 160 and 165 get the date of the epoch (D,M,Y) by setting Q$=“Epoch (D,M,Y)”, X, Y, and Z to the default values of the day, month, and year respectively, and N=3 (since there are three variables to assign). Suppose that X, Y, and Z were given the default values 12, 3, 1986 respectively.