IMS103@psuvm.psu.edu (Ian Matthew Smith) (05/14/91)
This is a small astronomical database of objects in the solar system. Adding and editing objects should be straightforward. Commants appricated. If you make some improvments, post them! PFEILDS: List of field names. PNAMES : List of objects in the database. PDATA : Array that contains the data. PPICK : A custom menu showing objects to select from. Pressing the unshifted softkey will simply display the information. A left-shifted softkey will display the information for that object, and then diaplay a curtom menu to allow you to recall selected values to the stack. PDISP : Called by the custom menu created by PPICK. For those of you with \->PRG, replace the PPICK in the ASTRO directory with this version, which will save over 600 bytes of memory. make sure \->PRG is in the current path when PPICK is run. -- Ian Smith <<ims103@psuvm.psu.edu>> PPICK Chksum: #48F8h Bytes: 160 %%HP: T(3)A(R)F(.); \<< PNAMES \-> pnam \<< 1 pnam SIZE FOR j pnam j GET j 'PDISP' 2 \->PRG j NEG 'PDISP' 2 \->PRG 2 \->LIST 2 \->LIST NEXT pnam SIZE \->LIST TMENU \>> \>> ASTRO Directory Chksum: #8A29h Bytes: 1747 %%HP: T(3)A(R)F(.); DIR PPICK \<< { { "Sun" { \<< 1 PDISP \>> \<< -1 PDISP \>> } } { "Mercury" { \<< 2 PDISP \>> \<< -2 PDISP \>> } } { "Venus" { \<< 3 PDISP \>> \<< -3 PDISP \>> } } { "Earth" { \<< 4 PDISP \>> \<< -4 PDISP \>> } } { "Moon" { \<< 5 PDISP \>> \<< -5 PDISP \>> } } { "Mars" { \<< 6 PDISP \>> \<< -6 PDISP \>> } } { "Jupiter" { \<< 7 PDISP \>> \<< -7 PDISP \>> } } { "Saturn" { \<< 8 PDISP \>> \<< -8 PDISP \>> } } { "Uranus" { \<< 9 PDISP \>> \<< -9 PDISP \>> } } { "Neptune" { \<< 10 PDISP \>> \<< -10 PDISP \>> } } { "Pluto" { \<< 11 PDISP \>> \<< -11 PDISP \>> } } } TMENU \>> PDISP \<< DUP PNAMES SWAP ABS GET "Name: " SWAP + 1 CLLCD DISP DUP ABS \-> c1 c \<< { } PFEILDS SIZE 1 SWAP FOR p PFEILDS p GET DUP PDATA { c p } GET DUP ROT ROT \->STR DUP2 SIZE SWAP SIZE + 22 - NEG " " SWAP 1 SWAP SUB SWAP + + p 1 + DISP SWAP \->TAG + NEXT IF c1 SIGN -1 == THEN TMENU ELSE DROP END 3 FREEZE \>> \>> PFEILDS { "Dist (km)" "Diam (km)" "Orbit(km/sec)" "Axis (Deg)" "Mass (1=Earth)" } PDATA [[ 0 139200 0 7 33300 ] [ 57900000 4880 48 0 .0556 ] [ 108200000 12100 35 3 .8 ] [ 149600000 12756 30 23.45 1 ] [ 384400 3476 1.026 6.68 .0116 ] [ 227900000 6794 24 25.2 .1 ] [ 778300000 143200 13 3.1 318 ] [ 1427000000 120000 9.7 26.7 95 ] [ 2870000000 51800 6.8 82.1 14 ] [ 4497000000 49500 5.4 28.8 17 ] [ 5900000000 3000 4.7 60 .0019 ]] PNAMES { "Sun" "Mercury" "Venus" "Earth" "Moon" "Mars" "Jupiter" "Saturn" "Uranus" "Neptune" "Pluto" } END