http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to captue enter, up, down, left, right and Fx



On Sun 05 Sep, justin howard wrote:
> The number ten being returned is the ASCII code for it I believe.
> Check an ascii table.
> I think ENTER is equivalent to 0x10 or &H10 or Hexadecial 10 in otherwords.
> Hope that helps
> >From: "AcidNaught" <luisfertv@geocities.com>
> >Subject: How to captue enter, up, down, left, right and Fx
> >  clrscr();
> >  flushall();
> >  c = getchar();

Yes, the `getchar()` function returns the value of the character entered.
Some functions are annoying (like scanf()`) because they only give a value
once return has been pressed.

The arrow keys won't give a value via `getchar()` because they don't have
any ASCII values associated with them.

Btw: ASCII stands for American Standard Character Information Interchange.
Just thought u might like 2 no.


Regards,

Matt. W.
-- 
***  eudoxus@freeuk.com  ***  http://members.xoom.com/eudoxusM/
                 mwebster@apsoft.co.uk

=================================================================
To SUBSCRIBE or UNSUBSCRIBE please visit
http://gameprogrammer.com/mailinglist.html