3 package require "elite" "1.0.0"
6 global economy government
9 puts "Position: $p(x), $p(y) LY"
10 puts "Economy: $economy($p(economy))"
11 puts "Government: $government($p(government))"
12 puts "Tech. level: $p(techlevel)"
13 puts [format "Population: %s billion (%s)" \
14 [expr {$p(population)/10.0}] $p(inhabitants)]
15 puts "Gross productivity: $p(productivity) M Cr"
16 puts "Radius: $p(radius) km"
20 foreach w $p(description) {
22 incr l [string length $w]
23 if {$l > 72} { puts $ll; set ll {}; set l 0 }
29 if {[llength $argv] < 1} {
30 puts stderr "usage: $argv0 \[-g GALAXY\] PLANET ..."
34 for {set i 0} {$i < [llength $argv]} {incr i} {
35 set a [lindex $argv $i]
39 set a [lindex $argv $i]
40 set g [parse-galaxy-spec $a]
41 if {[string equal $g ""]} {
42 puts stderr "$argv0: bad galaxy string `$a'"
48 set n [parse-planet-spec $g $a]
49 if {[string equal $n ""]} {
50 puts stderr "$argv0: unknown planet `$a'"