Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Question about settick Post ReplyPost New Topic
<< Prev Page of 2
Message << Prev Topic | Next Topic >>

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2490
Posted: 16 April 2018 at 6:45pm | IP Logged Copy link to clipboard   Quote Geoffg

Yes, the console input is buffered (128 characters). So, for example, the user could type in 20 characters and the next 20 calls to INKEY$ will return all 20 one by one.

Interrupts should be allowable during INPUT and LINE INPUT but it is amazingly difficult to implement so it has remained on my ToDo list for the time being.

Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 6522
Posted: 16 April 2018 at 7:29pm | IP Logged Copy link to clipboard   Quote Grogster

Really? That's never worked for me. If I check INKEY$ at the time I am expecting a keystroke, I get it. If I check it any other time - even if keys have been pressed, I always get back an empty string, so the code never does what it should.

IE: If I check INKEY$ inside a loop, and grab characters as they arrive, no problem.
If I don't check INKEY$ inside a loop, and just request a key from INKEY$, it is always "". I assumed this was cos at the time of the request, no key was being pressed, so you get back an empty string.

I will have a play with this command now - perhaps I was doing something else wrong at the same time.

EDIT: I am wrong. Totally wrong.

This test code does exactly what Geoff says it does. At the time I was trying to get INKEY$ to work for me, I must have been doing something wrong.

I stand corrected.

Edited by Grogster on 16 April 2018 at 7:36pm

Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Search the forums using Google.
<< Prev Page of 2
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1563 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.16