You could have downloaded a working User Exit from:

http://www.oliver.com/lists/u2/files

Look at InputWhile.txt, which is a complete implementation for what you are doing. It uses SLEEP but should use NAP (this was written before NAP came along)

At 03:44 PM 5/27/2004, you wrote:
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