REM Please feel to use parts of this code in your own programs, REM however please do not modify it and redistribute it. REM If you believe you have made a useful modification to the code REM however, please do email me and tell me at gary.ewer@earthling.net APP TimeCalc type $1000 icon "\PIC\Icons\timecalc.pic" ENDA PROC TimeCalc: GLOBAL h&(3),m&(3),s&(3) gAT 50,30 gFONT 8 gSTYLE 10 gPRINT "Time Calc v1.0" gAT 20,62 gSTYLE 0 gPRINT "The Time Addition Program" gAT 20,80 gPRINT "for the Psion 3a/c" gSTYLE 0 gFONT 6 gAT 10,145 gPRINT "¸ Gary Ewer 1998. E-mail " gAT 10,158 gPRINT "or visit my website at http://come.to/prosoft" gFONT 9 gAT 350,90 gPRINT "(Press Esc to Quit)" While 1 h&(3)=0 m&(3)=0 s&(3)=0 dINIT "First Time" dLONG h&(1),"Number of Hours",0,99999 dLONG m&(1),"Number of Minutes",0,59 dLONG s&(1),"Number of Seconds",0,59 dPOSITION 1,-1 IF DIALOG=0 STOP ENDIF dINIT "Second Time" dLONG h&(2),"Number of Hours",0,99999 dLONG m&(2),"Number of Minutes",0,59 dLONG s&(2),"Number of Seconds",0,59 dPOSITION 1,-1 IF DIALOG=0 STOP ENDIF s&(3)=s&(2)+s&(1) IF s&(3)>59 s&(3)=s&(3)-60 m&(3)=1 ENDIF m&(3)=m&(2)+m&(1)+m&(3) IF m&(3)>59 m&(3)=m&(3)-60 h&(3)=1 ENDIF h&(3)=h&(2)+h&(1)+h&(3) dINIT "And the Answer is..." dTEXT "",""+FIX$(h&(3),0,100)+":"+FIX$(m&(3),0,-2)+":"+FIX$(s&(3),0,-2)+"",2 dTEXT "","hrs:mins:secs",2 dPOSITION 1,-1 IF DIALOG=0 STOP ENDIF ENDWH ENDP