home *** CD-ROM | disk | FTP | other *** search
- DELAY Program ! 10/6/91 - James Portanova
- ! HOT PROPERTIES SOFTWARE
- ! Post Office Box 437
- ! Fresh Meadows, New York 11365-0437
- !
- ! Demonstrates how to implement a delay
- ! in program execution based upon ticks
- ! of the system clock.
- !
- MAP
- Proc(MAIN)
- .
- Group,Pre(MEM)
- Starting Long
- Ending Long
- Seconds Byte
- .
-
- CODE
- BLANK
- MAIN
- RETURN
-
- MAIN PROCEDURE
- SCREEN Screen Pre(SCR),Hue(7,0)
- Row(18,21) Paint(1,39),Hue(31,0)
- Row(15,41) Paint(1,10),Hue(0,7)
- Row(16,41) Paint(1,11),Hue(15,0)
- Row(8,19) String('╔═{40}╗')
- Row(9,19) Repeat(10);String('║<0{40}>║') .
- Row(19,19) String('╚═{40}╝')
- Row(10,31) String('DELAY DEMONSTRATION')
- Row(14,26) String('STARTING TIME:')
- Row(15,28) String('ENDING TIME:')
- Row(16,31) String('TIME NOW:')
- Col(41) Entry,Use(?FIRST_FIELD)
- Row(12,24) String('Enter Seconds to Delay (1-60)')
- Col(54) Entry(@N2.0),Use(MEM:Seconds),Hue(15,0),Sel(0,7),Ins |
- Req,Num
- Col(57) Entry,Use(?LAST_FIELD)
- .
-
- CODE
- OPEN(SCREEN)
- SETCURSOR
- DISPLAY
- LOOP
- ACCEPT
- CASE FIELD()
- OF ?FIRST_FIELD
- IF KEYCODE() = 256 THEN RETURN.
-
- OF ?MEM:Seconds
- IF ~INRANGE(MEM:Seconds,1,60)
- BEEP(600,10)
- CLEAR(MEM:Seconds)
- SELECT(?MEM:Seconds)
- CYCLE
- .
- MEM:Starting = CLOCK()
- MEM:Ending = MEM:Starting + (MEM:Seconds*100)
- SHOW(14,42,MEM:Starting,@T4)
- SHOW(15,42,MEM:Ending,@T4)
- LOOP
- SHOW(16,42,CLOCK(),@T4)
- IF CLOCK() >= MEM:Ending THEN BEEP(600,10);BREAK.
- .
- SHOW(18,29,'Press Enter to Restart')
- ASK
- CLEAR(MEM:Seconds)
- RESTART(Main)
-
- . .
-
-