home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
applications
/
databases
/
databasepro
/
auto
/
auto.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-07-10
|
1KB
|
58 lines
/* Gesamtstatistik */
OPTIONS RESULTS
ADDRESS DataBase
min.1 = 10000
min.2 = 10000
min.3 = 10
min.4 = 100
min.5 = 1000
max.1 = 0
max.2 = 0
max.3 = 0
max.4 = 0
max.5 = 0
sum.1 = 0
sum.2 = 0
sum.3 = 0
sum.4 = 0
sum.5 = 0
Display Off
LeftTotal
weiter = 1
DO WHILE weiter = 1
idx = 2
DO WHILE idx < 7
GetData $F || idx
wert = result
nr = idx-1
IF wert < min.nr THEN min.nr = wert
IF wert > max.nr THEN max.nr = wert
sum.nr = sum.nr + wert
idx = idx +1
END
RightOne
IF RC ~= 0 THEN weiter = 0
END
LeftTotal
Display On
Show
Total
anzahl = result
ADDRESS
Open(out,"CON:0/0/500/150/Autostatistik/WAIT/CLOSE/SCREENDataBase",W)
WriteLn(out," Minimal Maximal Durchschnitt")
WriteLn(out,"-----------------------------------------------------")
WriteLn(out,"Fahrleistung (Km): " || RIGHT(min.1,8) || RIGHT(max.1,9) || RIGHT((sum.1 / anzahl),14))
WriteLn(out,"Gesamtpreis (DM): " || RIGHT(min.2,8) || RIGHT(max.2,9) || RIGHT((sum.2 / anzahl),14))
WriteLn(out,"Preis pro Liter (DM): " || RIGHT(min.3,8) || RIGHT(max.3,9) || RIGHT((sum.3 / anzahl),14))
WriteLn(out,"Verbrauch (Liter): " || RIGHT(min.4,8) || RIGHT(max.4,9) || RIGHT((sum.4 / anzahl),14))
WriteLn(out,"Zeitraum (Tage): " || RIGHT(min.5,8) || RIGHT(max.5,9) || RIGHT((sum.5 / anzahl),14))
Close(out)
ADDRESS