HP3000-L Archives

November 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Woods <[log in to unmask]>
Reply To:
Date:
Wed, 12 Nov 1997 10:50:58 CST
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
Hi, Shawn.

On Wed, 12 Nov 1997 08:21:07 -0800, Shawn Gordon <[log in to unmask]> wrote:
|Does anyone know how you would go about building an environment where
|you are displaying information to a screen every 'n' seconds, but also
|able to accept input from the user.

Use FCONTROL mode 4 to set a timeout on the FREAD waiting for the user
input.  When the read times out, then you will get a zero length return
which you can interpret as no data input.  If the length of data read is
non-zero, then you have input from the user.  Be aware that (at least when
I last coded something like this) if the user is allowed to type multiple
characters on the read, and the FREAD times out before the user presses
return, the data typed is discarded.  In other words, partial reads don't
occur.

It's not too difficult, as I recall and I hope this helps.
--
Jeff Woods
[log in to unmask] at Unison Software
[log in to unmask]   at home  [PGP key available here via finger]

"Truth can never be told so as to be understood, and not be believed."
      --  William Blake

ATOM RSS1 RSS2