From: Vic Newsgroups: comp.os.msdos.djgpp Subject: Re: loop'ing Date: Sun, 08 Nov 1998 13:01:19 -0500 Organization: Communications Accessibles Montreal, Quebec Canada Lines: 24 Message-ID: <3645DC6F.7F4F@cam.org> References: <000601be0b21$cb57ae60$a4feffc2 AT default> NNTP-Posting-Host: dialup-547.hip.cam.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 3.0Gold (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Lazer ---¤--- wrote: > > I need a function for looping until 'esc' is press'ed! > my code look like this: > > ----------------------------------------------- > again: > > /* the game code */ > > if (key[KEY_ESC]) { > return 0; > } > > goto again > ----------------------------------------------- > > is there a better way of doing this? why not try while(!key[KEY_ESC]) { do stuff }