AmigaActive (158/1728)

From:David Bateman
Date:4 Jun 2001 at 14:00:19
Subject:Re: Header Files (StormC v3)

Hello David

On 04-Jun-01, you wrote:

> It's not daft, it's linked to the way DOS (and DOS boxes) handles it's
> keyboard input. Anyway, all it does is wait for a key to be pressed
> and returns that.
>
> If you are just waiting for a return, you could always use:
>
> char buf[2];
> scanf("%s", buf);
>
> Althoguh I can't remember how to make scanf limit the number of
> characters it puts in the buffer. I'm sure there's a better way to do
> it than that, but my head hurts ATM, I need to drill it a bit to
> relieve the pressure ;)

i just wanted to enter one keypress and act on that, without having to press
return first.

such as selecting an option from a text menu such as:

[H]ire Film
[R]eturn Film

etc.

Regards



Team AMIGA
ICQ:22288065
http://www.robotheaven.freeserve.co.uk
http://www.hvymetal.u-net.com

EZTower/Amiga A1200
OS3.9/MorphOS/Linux(2.2.10 kernel)/MUIPPC
64Mb/PPC 603e(200/040)
2.1Gb HD/8x CD-ROM/PortJnr/USR 56k/250MB ZIP
17" SVGA/BVisionPPC/CGX v4.2(pre 8)

A hundred times every day I remind myself that my inner and outer life are
based on the labours of others.
-- Albert Einstein

Quote carefully and read all ADMIN:README mails

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/