Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.mrao.cam.ac.uk/~pjds/ascript/users/realtime.txt
Дата изменения: Sat Oct 12 20:06:15 1996
Дата индексирования: Tue Oct 2 10:17:40 2012
Кодировка:

Поисковые слова: solar eclipse
{Program to display an object's position in real time}

{Set the delimiter to "%" so we can use "," in prompts}
set_delimiter(%)

{On first pass, get the name of the object etc.}
if (s1=.)
set_string(s1%Sun)
display_title(+++ Real-time Positions +++)
write_string(Possible objects are:)
new_line
write_string(Sun, Moon, name of a planet, parabolic or elliptical)
new_line
new_line
ask_for_string(Name of object [choose one of the above]%s1)
set_string(s2%true)
ask_for_string(Coordinates: true, apparent, or topocentric%s2)
set_coordinates_type(s2)
set_string(s3%5)
ask_for_string(Time step between updates%s3)
new_line
end_if

{Use the character variable c1 for both coordinate type and error}
set_character(c1%N)

{Check that the calculation is allowed}
if (s1=sun)
set_character(c1%s)
end_if
if (s1=moon)
set_character(c1%m)
end_if
if (s1=mercury)
set_character(c1%p)
end_if
if (s1=venus)
set_character(c1%p)
end_if
if (s1=mars)
set_character(c1%p)
end_if
if (s1=jupiter)
set_character(c1%p)
end_if
if (s1=saturn)
set_character(c1%p)
end_if
if (s1=uranus)
set_character(c1%p)
end_if
if (s1=neptune)
set_character(c1%p)
end_if
if (s1=elliptical)
set_character(c1%o)
end_if
if (s1=parabolic)
set_character(c1%o)
end_if

{Raise an objection if the requested calculation is illegal...}
if (c1=N)
set_normal_text(12)
new_line
write_string( +++ )
write_string(s1)
write_string( is not an allowed calculation type)
new_line
new_line
set_normal_text(7)

{...wait for a response}
pause

{...and reset s1 to its default condition}
set_string(s1%.)

end_if

{If the calculation is allowed...}
if (c1!N)

{...carry out the calculation}
find_position(s1)

{...convert to az/alt}
convert_coordinates(c1%a)

{...clear the screen and put up a title}
set_normal_text(15)
display_title(s1)
set_normal_text(7)

{...display the time and date}
set_decimal_places(0)
display_date(calendar)
display_time(solar)
new_line

{...display the result}
write_string(Coordinate type: )
write_string(s2)
new_line
set_normal_text(14)
display_coordinates(a)
set_normal_text(7)
new_line

{...and wait for the clock}
wait_time_step(s3)

end_if

{Finally repeat the whole lot with no questions asked}
repeat