{Clear the screen and put up a title} display_title(+++ Rising and Setting +++) {Set the delimiter to % so that we can use commas in prompts} set_delimiter(%) {Set the default object name} if (s1=.) set_string(s1%Sun) end_if {Get the name of the object} ask_for_string(Object name [Sun, Moon, a planet etc.]%s1) {Get the ra & dec if necessary} if (s1!sun) if (s1!moon) if (s1!mercury) if (s1!venus) if(s1!mars) if(s1!jupiter) if (s1!saturn) if (s1!uranus) if(s1!neptune) {Phew! none of those, so get ra/dec} ask_for_coordinates(r) end_if end_if end_if end_if end_if end_if end_if end_if end_if {Calculate the rising and setting...} find_rise_set(s1) {...and display the result in a good colour} set_normal_text(10) display_rise_set(s1) set_normal_text(7) {Go again?} ask_for_repeat