TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Murray Lesser
from: Bill Patterson
date: 1995-10-05 18:22:36
subject: Re: C Set ++

* In a message originally to Murray Lesser, Bill Patterson writes:

 ML> Excerpted from message dated 09-28-95, Bill Patterson to All:
 ML> 
 ML> BP>help!
 ML> 
 ML> BP>I'm getting really REALLY frustrated with C Set ++. I need to detect
 ML>   >a keypress, but none of the input routines will return untill a
 ML>   >character and a return is entered. I currently need to detect a
 ML>   >carriage return by itself, but will need to detect any key in the
 ML>   >future for a "hotkeys" effect. I've tried everything...
 ML> 
 ML> Bill--
 ML> 
 ML>     IBM C Set++ has the same  non-ANSI I/O functions as all
 ML> other C compilers I am familiar with.  However, C Set++ is a little more
 ML> ANSI-compliant than many other compilers.  In accordance with the
 ML> standard, non-ANSI library functions have an underscore as the leading
 ML> symbol in the function name.
 ML> 
 ML>     _kbhit() returns a nonzero value if there is anything waiting in the
 ML> session's logical type-ahead buffer; it returns a zero if the buffer is
 ML> empty.  _getch() returns the first character (waiting until one appears
 ML> if necessary) without echoing that character to the screen.  (_getch()
 ML> will not read Ctrl-Brk.)  For example: if (_kbhit()) ch = _getch();
 ML> 
 ML>     See _kbhit() and _getch() in the C Set++ manual: "C Library
 ML> Reference" for further details.
 ML> 
 ML>     Hope this helps.
 ML> 
 ML>           --Murray
 ML> 
 ML> ___
 ML>  * MR/2 2.25 #120 * One printed manual is worth a thousand INF files
 ML>                                                                          
 ML>                              
 ML> ---
(1:2625/108)

Thanks man!

Bill


--- LoraBBS-OS/2 v2.40+
ML> * Origin: 2" x 4" bbs - a basic board - (914) 271-9407
* Origin: Planet X * Warp Co-Ordinates: 407-799-0975 (1:374/2528.0)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 374/2528 1 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.