Jump to content
Excelsior Forums
Sign in to follow this  
widom

IO.RdCard() - read buffer problem when Window.def module imported

Recommended Posts

I have noted following problem when using TopSpeed Modula compatibility pack -IO.RdCard() function. The first IO.RdCard()  goes fine. But all next one keeps in read buffer the last red CARDINAL digit. Therefore it is diplaying a wrong value when next IO.RdCard() executed. This problem only happen when Window.def is imported and used !

Following screenshots below shows the problem:

3 * 3 = _      (*OK - the read buffer is empty, so I type a result 9 *)

4 * 5 = 9_    (* The read buffer still keeps old previous input 9    *)

Any idea how to cean the read buffer ?

w := c1 * c2;

        IO.WrCard(c1,1); IO.WrStr(" * "); IO.WrCard(c2,1); IO.WrStr(" = ");Window.CursorOn;

        c := BiosIO.RdKey();

Share this post


Link to post
Share on other sites

I've never used TopSpeed, sorry.  But I'm wondering if perhaps that IO.EndOfRd is needed?  Just thinking of SkipLine with some of the other types of reads.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×