Published online by Cambridge University Press: 17 February 2010
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.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.