Could you please tell ma the command to make a pause between two print command EG:
PRINT "HELLO"
PAUSE COMMAND
PRINT "HOW ARE YOU?"
THANK YOU
do you want a timed pause or a keyboard interrupted pause?
timed pause can use for/next loop
for x=1 to 10000:x1=x:next x this for example , jiggle values and do nothing portion to change the timing value. Also it is processor speed dependent.
for keyboard interrupt use the inkey$ and check for length of variable assigned to be greater than zero.
But assuming that you have the program running, somebody coming to the screen will find both lines presented. wouldn't you be better to ask a user name in your first line? Ed Fair
efair@atlnet.com
Any advice I give is my best judgement based on my interpretation of the facts you supply.
Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
The TIMER function returns a value which changes precisely 1193181 times every 65536 seconds -- that is to say, roughly 18.2 times per second. You can use this to do sub-second delays:
[tt] SUB delay(numTicks%) FOR i% = 1 TO numTicks%
st# = TIMER
WHILE TIMER = st#: WEND'TIMER will change 1/18.2 of a second after the previous line NEXT i% END SUB
[/tt]
If you want better precision than this, you can modify the timer frequency with a couple of hardware I/O calls:
[tt] SUB setTimerFrequency(ticksPerSec&) IF (ticksPerSec& < 1) OR (ticksPerSec& > 1193181) THEN ERROR 5 'Illegal function call
clocksPerTick& = 1193181 \ ticksPerSec& OUT &H43, &H34 OUT &H40, clocksPerTick& AND 255 OUT &H40, clocksPerTick& \ 256 END SUB
SUB resetTimerFrequency() OUT &H43, &H34 OUT &H40, 0 OUT &H40, 0 END SUB
[/tt]
Be sure to call resetTimerFrequency before your program exits. This code will cause the system timer to run fast in some situations (dependant on operating system). However, the clock will be reset in these cases to an accurate value on the next reboot.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.