|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3840 (0xf00) Types: TextFile Names: »convtgeotx«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt. └─⟦0364f57e3⟧ └─⟦bf33d74f6⟧ »iogeofile« └─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ. └─⟦b2ec5d50f⟧ └─⟦bf33d74f6⟧ »iogeofile« └─⟦this⟧
; conv_t_geo * page 1 22 05 78, 14.41; if listing.yes char 10 12 10 conv_t_geo = set 1 conv_t_geo = algol external long procedure conv_t_geo(number, tpd); value number, tpd; long number; boolean tpd; begin boolean neg; integer d, p, t, dec, divi, nmb, frac; long save_number, quotient, div; comment conv_t_geo (return) long the geo_type value of number : _ angles are picture -pi to +pi on min long to max long _ meters are pictured in units of '-6 meter number (call, value) long the number to be converted, represented digit after digit as read by e.g. read_geo_t. The number of decimals must be given in tpd, wich too give the geo_type. tpd (call, value) boolean description of number : (type shift 6) + number_of_decimals nr type terminator max dec 1 degr min sec sexagesimal sx 6 2 degr min sexagesimal nt 8 3 degr nonagesimal dg 10 4 hours min sec tm 6 5 degr min sec centesimal cc 6 6 degr min centesimal eu 8 7 degr centesimal (grads) gr 10 8 meters (>=1000 km) m_ 6 9 meters (>=1 km and <1000 km) m_ 6 10 meters (< 1km) m_ 6 type 9 and 10 are recorded at input as type 8. the user may change the type after input; ; t := (tpd shift(-6)) extract 6; dec := tpd extract 6; \f comment conv_t_geo * page 2 22 05 78, 14.41 0 1 2 3 4 5 6 7 8 9 ; neg := number < 0; if neg then number := - number; d := case t of (6, 8, 10, 6, 6, 8, 10, 6); if dec > d then begin comment exess decimals action; divi := 1; for p := d+1 step 1 until dec do divi := 10*divi; save_number := divi shift (-1); number := (save_number + number) // divi; end excess dec; comment default decimals; for p := d - dec step -1 until 1 do number := ((number shift 2) + number) shift 1; if t<8 then begin comment angle action; div := case t of (1296 000 000000, 21 600 00000000, 360 00 00 000000, 86 400 000000, 400 00 00 000000, 400 00 00 000000, 400 00 00 000000); if t<=2 or t=4 then begin comment sexag gms, gm and time actions; frac := number mod 1 000 000; nmb := number//1 000 000; nmb := 6 000*(nmb//10 000) + nmb mod 10 000; if t=1 or t=4 then nmb := 60*(nmb//100) + nmb mod 100; number := nmb; number := 1 000 000*number+frac; end sexagesimal and time actions; save_number := number := number mod div; for p := 0 step 1 until 47 do begin comment division for angle ratio; number := number - div; if number>=0 then quotient := quotient+1 else number := save_number; quotient := quotient shift 1; number := save_number := number shift 1; end division for ratio; number := quotient; end angle action; if neg then number := - number; conv_t_geo := number; end conv_t_geo; end; if warning.yes ( mode 0.yes message convtgeo not ok lookup convtgeo ) end finis ▶EOF◀