home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
bazy
/
videodb
/
calc2.db
< prev
next >
Wrap
Text File
|
1996-07-30
|
1KB
|
96 lines
/* Räknar ut tiden kvar på band i VideoDB
* Av Andreas Ericsson '96
* version 1.2
*/
Options Results
BlockInput
CurrentRecord
startrec=result
Getfield "Band"
bandnr=result
Mode Find
kill
CurrentField "Band"
Putfield bandnr
Findfirst
hit1=result
currentrecord hit1
Getfield "Tid"
tid=result
if tid=? then do
mode find
kill
mode normal
currentrecord startrec
Freeinput
exit
end
CurrentField "Tid"
PutField Trunc(tid, 2)
mode find
findnext
if rc ==5 then do
mode find
kill
mode normal
getfield "Längd"
langd=result
timmar=Trunc(tid)
minuter=Trunc((tid-timmar)*100)
CurrentField "Kvar"
kvarmin=langd-minuter-60*timmar
sluttim=Trunc(kvarmin/60)
slutmin=kvarmin-sluttim*60
EnFilm=sluttim+(slutmin/100)
PutField trunc(EnFilm, 2)
freeinput
exit
end
hit2=result
currentrecord hit2
Getfield "Tid"
tid2=result
if tid2=? then do
exit
end
CurrentField "Tid"
Putfield trunc(tid2, 2)
mode normal
timmar2=Trunc(Tid2)
minuter2=Trunc((Tid2-timmar2)*100)
Getfield "Längd"
langd=result
timmar=Trunc(tid)
minuter=Trunc((tid-timmar)*100)
CurrentField "Kvar"
kvarmin=langd-minuter-minuter2-(60*(timmar+timmar2))
sluttim=Trunc(kvarmin/60)
slutmin=kvarmin-sluttim*60
kvarI=sluttim+(slutmin/100)
PutField trunc(kvarI, 2)
currentrecord hit1
mode find
kill
mode normal
CurrentField "Kvar"
kvarII=sluttim+(slutmin/100)
Putfield trunc(kvarII, 2)
currentrecord startrec
FreeInput