TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DANNY KEOGH
from: TIM DOUGLAS
date: 1997-10-30 05:48:00
subject: Code translation

DK>Ok peoples, I need a little help from those of you who know
DK>pascal.  I need the pascal statement
DK>memW[$0000:$041C] := MemW[$0000:$041A];
DK>translated into C.  That line flushes the keyboard buffer.  If
DK>there's a better way to do it, please let me know.
my knowledge of C(++) is still learning, but I think this will do it: 
memcpy((void *)0x0000041c, (void *)0x0000041a, 2);
this is how I would normally clear the keyboard:-
int ClearKB(void) {
  int JunkKey = 0;
  while (bioskey(1))
    JunkKey = bioskey(0);
  return(JunkKey);
}
but I believe that this is the ++ way to do it:-
fflush(stdin);
I may be wrong on the last one, I have never actually used it although it 
will compile without an error;
Hope this helps
-=cya l8r=-     .
Tim Douglas  ,-.|\  'But sir, Nobody Worries about Upsetting a Droid.'
Melbourne   / ;-) \ `Unlike you, Mulder, I would Like to have a Life.'
Victoria    \_,-._/ `Screeech, !BANG!  D'oh!, A Deer,  A FEmale Deer.'
Australia        v  `There's Someone in My Head... But it's Not Me...'
...to C or to C++, that is the Question
... UNREGISTERED EVALUATION COPY
 * Wave Rider 1.31 [NR] *
--- FMail/386 1.20+
---------------
* Origin: Comms Barrier BBS +61.3.9585.1112, +61.3.9583.6119 (3:632/533)

SOURCE: echomail via exec-pc

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™.