delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/27/06:37:21

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE30134174B@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: ALLEGRO KEY[]
Date: Tue, 27 Apr 1999 11:37:05 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

moshe writes:
> while (!key[1]){
>     if (key[72] && (Yi<SCREEN_H-4)) {Yi=Yi+5;}

Please don't hardcode those key numbers. Not only does this make your
code less readable than using the KEY_* defines, but it is a certain
way to make sure that your program won't work with any future versions 
of Allegro.

> when i'm compile it its oll ok but in run time allegro kick my 
> program off does some1 know the problem?

It is impossible to say just from the fragment of code that you 
posted. Please give a complete (but small) program that we can 
actually compile and run.


	Shawn Hargreaves.

- Raw text -


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