{Clear the screen and display a title at the top} display_title(++ TRANSFORMATION of CELESTIAL COORDINATES ++) {Set the delimiter to % so that commas can be used in the prompt string} set_delimiter(%) {Get the coordinates to transform from and into} ask_for_character(Transform from which system [h,a,r,e,g]%hareg%c1) ask_for_character(........... to which system [h,a,r,e,g]%hareg%c2) new_line {Write an appropriate message depending on the coordinates} if (c1=h) write_string(Please input hour angle and declination:) end_if if (c1=g) write_string(Please input galactic longitude and latitude:) end_if if (c1=r) write_string(Please input right ascension and declination:) end_if if (c1=a) write_string(Please input azimuth and altitude:) end_if if (c1=e) write_string(Please input ecliptic longitude and latitude:) end_if new_line {Get the coordinates themselves which are to be transformed...} ask_for_coordinates(c1) {... and transform them} convert_coordinates(c1%c2) {Set the text colour to red...} set_normal_text(4) {... and display the result} new_line display_coordinates(c2) {Reset the text colour to its normal state} set_normal_text(7) new_line {Ask if we want to do it again} ask_for_repeat