procedure main( x ) pq := [] no := 0 yn := [] y := [] pp := x[ 1 ] case pp of { "-i" : { write( "ponga la fecha en la forma: .." ) re := read() write( "ponga el tiempo UTC en la forma: .." ) de := read() jo := open( "$PWD/swetest -topos35.06,32.56,0 -p123456 -b" || re || " -ut" || de, "p" ) } "?" : { write( "Uso: carta [-i] [?]\n_ opciones:\n_ -i modo interactivo\n_ ? esta ayuda" ) exit() } &null : { io := open( "date -u +-b%d.%m.%Y%t-ut%T", "p" ) jo := open( "$PWD/swetest -topos35.06,32.56,0 -p123456 " || read( io ), "p" ) close( io ) } } while mn := read( jo ) do { no +:= 1 no = 2 & write( "Carta para ", mn ) no < 7 & next no > 13 & break mn ? { tab( 18 ) pn := move( 3 ) move( 1 ) pt := move( 2 ) } put( yn, pn, pt ) put( y, yn ) yn := [] } close( jo ) no = 1 & stop( mn ) every g := !y do { q := ( ( g[ 1 ] * 60 ) + g[ 2 ] ) / 6 if q % 2 = 0 then qo := 1 else qo := 2 put( pq, qo ) } a := pq[ 1 ] b := pq[ 2 ] c := pq[ 3 ] d := pq[ 4 ] e := pq[ 5 ] f := pq[ 6 ] writes( "Luna " ) if a = 1 then writes( "0" ) else writes( "1") if b = 1 then writes( "0" ) else writes( "1") if c = 1 then writes( "0" ) else writes( "1") if d = 1 then writes( "1") else writes( "0" ) if e = 1 then writes( "1") else writes( "0" ) if f = 1 then write( "1") else write( "0" ) writes( "Mercurio " ) if d = 1 then writes( "0" ) else writes( "1") if f = 1 then writes( "1") else writes( "0" ) if b = 1 then writes( "1") else writes( "0" ) if e = 1 then writes( "0" ) else writes( "1") if a = 1 then writes( "1") else writes( "0" ) if c = 1 then write( "0" ) else write( "1") writes( "Venus " ) if a = 1 then writes( "1") else writes( "0" ) if d = 1 then writes( "1") else writes( "0" ) if b = 1 then writes( "0" ) else writes( "1") if e = 1 then writes( "0" ) else writes( "1") if c = 1 then writes( "1") else writes( "0" ) if f = 1 then write( "0" ) else write( "1") writes( "Tierra " ) if a = 1 then writes( "0" ) else writes( "1") if c = 1 then writes( "0" ) else writes( "1") if e = 1 then writes( "1") else writes( "0" ) if b = 1 then writes( "1") else writes( "0" ) if d = 1 then writes( "1") else writes( "0" ) if f = 1 then write( "0" ) else write( "1") writes( "Marte " ) if a = 1 then writes( "0" ) else writes( "1") if b = 1 then writes( "0" ) else writes( "1") if c = 1 then writes( "1") else writes( "0" ) if d = 1 then writes( "1") else writes( "0" ) if e = 1 then writes( "0" ) else writes( "1") if f = 1 then write( "1") else write( "0" ) writes( "Jupiter " ) if d = 1 then writes( "0" ) else writes( "1") if f = 1 then writes( "0" ) else writes( "1") if b = 1 then writes( "0" ) else writes( "1") if e = 1 then writes( "1") else writes( "0" ) if a = 1 then writes( "0" ) else writes( "1") if c = 1 then write( "1") else write( "0" ) writes( "Saturno " ) if a = 1 then writes( "1") else writes( "0" ) if d = 1 then writes( "0" ) else writes( "1") if b = 1 then writes( "0" ) else writes( "1") if e = 1 then writes( "1") else writes( "0" ) if c = 1 then writes( "0" ) else writes( "1") if f = 1 then write( "0" ) else write( "1") writes( "Sol " ) if a = 1 then writes( "0" ) else writes( "1") if c = 1 then writes( "1") else writes( "0" ) if e = 1 then writes( "1") else writes( "0" ) if b = 1 then writes( "1") else writes( "0" ) if d = 1 then writes( "1") else writes( "0" ) if f = 1 then write( "1") else write( "0" ) end