www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/17/01:30:20

From: "A.L.A. Corp / A.S.A. Inc." <a_azevedo AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: help!!!
Date: Sat, 17 Oct 1998 02:32:30 -0300
Organization: Mandic S.A. http://www.mandic.com.br (011)8700100 (voz (011)3178-03333 ou 0800-16-2888 se fora de SP)
Lines: 55
Message-ID: <36282BEE.577A@hotmail.com>
NNTP-Posting-Host: 200.230.230.147
Mime-Version: 1.0
X-Mailer: Mozilla 3.0 (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

--------------1661371E2755
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I would like to know that there is of having wandered in this program!  
He only accepts just once the key.  
Exemple when I type ESC. 27 he leaves. beauty!  
when I type 3, 51 he is counting you vary times, and it the key ESC
27!!!  
  
I already used the command KBHIT () didn't give right!!!  
  
Please help me!!!

--------------1661371E2755
Content-Type: text/plain; charset=us-ascii; name="Abert.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="Abert.c"

#include <time.h>
#include <conio.h>


#define ESC 283  // 27?
#define CRE 1075 // 51?

int main(void)
{


int credi=0,op=0,a=1;
clrscr();

_setcursortype(0);

while (a==1)
     {
     printf("\33[14;20H"); printf("                     ");
     delay(1);
     printf("\33[14;20H"); printf(" PRESS START BUTTON ");
     if (bioskey(1)==CRE) credi=credi+1;  else credi=credi;
     printf("\33[23;60H"); printf("CREDIT(S) %d", credi);
     if (bioskey(1)==ESC) a=0;
     }

exit(0);

}



--------------1661371E2755--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019