Try NAP
|
|
|       NAP [milliseconds]
|
|
|
| DESCRIPTION
|
|
|
|    Use the NAP statement to suspend  the  execution  of  a  BASIC
|
|    program, pausing for a specified number of milliseconds.
|
|
|
|    milliseconds is an expression  evaluating  to  the  number  of
|
|    milliseconds  for the pause. If milliseconds is not specified,
|
|    a value of 1 is used. If milliseconds evaluates  to  the  null
|
|    value, the NAP statement is ignored.            

Tom Dodds
[EMAIL PROTECTED]
630-235-2975

"Outside of a dog, a book is man's best friend. Inside of a dog it's too
dark to read."
Groucho Marx


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glenn W. Paschal
Sent: Thursday, May 27, 2004 2:45 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] Timed INPUT [UV]


I found this intriguing, so I decided to see if I could write my own
"INPUTWAIT" subroutine. Found only one problem.

I am using a combination of INPUT BUF.TEST,-1 and INKEY() to capture input
and test for timeouts. If I put a sleep in the INPUT BUF.TEST,-1 loop, the
process becomes quirky and delayed. (SLEEP 1) If I take out the sleep, it
works smooth and precise, but eats up resources like a madman! (result of
sit-n-spin loop).

Is there a way to sleep less than 1 sec?  Seems like at one time you could
specify sleep in milliseconds rather than seconds.

(writing in UniVerse 10.1.0 on Win 2000 svr)

Thanks,
Glenn W. Paschal
PasTech LLC
Computer Consulting
ph. (931) 526-9631
fx. (931) 526-9678
email. [EMAIL PROTECTED]
web. www.pastech.net
 
 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan Shaw and Keith
Johnson
Sent: Thursday, May 27, 2004 4:09 AM
To: U2-Users
Subject: Re: [U2] Timed INPUT [UV]


I've sent it in before, but I put the whole thing up on Pickwiki.  Following
is the note I put about it.
***********************
Here's a subroutine to mimic the INPUT WAITING capability that exists in
Unidata. It has all the functionality including duplicating the behaviour of
the underscore and colon when specifying the maximum string length. For
example, if you want to input three characters for variable THIS, waiting
for 10 seconds, requiring a carriage return to signify input but without a
line feed, and defaulting to the string "zip"; you would code:

CALL INPUTWAIT(THIS, '3_:', '10', 'zip' )
***********************

Which in Unidata would have been

INPUT THIS,3_: FOR 10 ELSE THIS = 'zip'

So you can save time by getting the code from

http://www.pickwiki.com/cgi-bin/wiki.pl?InputWait

Regards, Keith Johnson

Owner/Host

www.emeraldglenlodge.co.nz
04 299 3066
-------
u2-users mailing list
[EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users
-------
u2-users mailing list
[EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users

Reply via email to