Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Is there a pause command?

Is there a pause command?

Is there a pause command?

Could you please tell ma the command to make a pause between two print command EG:

RE: Is there a pause command?

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
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.

RE: Is there a pause command?

You could also use the SLEEP command...I know I know...It's cheezie but it'll get you out of the pan for the moment.

SLEEP 1 'This sleeps for 1 second
SLEEP 4 'This sleeps for 4 seconds--do ya get my drift?

of course the user can't enter without an input statement.


"The world shrinks more and more with every new user online."

RE: Is there a pause command?

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:

SUB delay(numTicks%)
FOR i% = 1 TO numTicks%
 st# = TIMER
= st#: WEND 'TIMER will change 1/18.2 of a second after the previous line

If you want better precision than this, you can modify the timer frequency with a couple of hardware I/O calls:

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

SUB resetTimerFrequency()
OUT &H43, &H34
OUT &H40, 0
OUT &H40, 0

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close