- Code: Select all
#define BYTE unsigned char
#define WORD unsigned short int
BYTE red; BYTE green; BYTE blue;
WORD Height;
WORD Width;
WORD TMP;
What is it good for and how do I use this?
#define BYTE unsigned char
#define WORD unsigned short int
BYTE red; BYTE green; BYTE blue;
WORD Height;
WORD Width;
WORD TMP;
#define true=1,false=0, flag unsigned char;
flag Player_Dead;
Player_Dead=false;
Game A Gogo wrote:yes, and my favorite usage of this is
- Code: Select all
#define true=1,false=0, flag unsigned char;
Is there a need of a semi-colon if there are more then one define arguments in one line?
#define TRUE 1
#define FALSE !TRUE
unsigned char flag;
flag = !flag;
#declare true 1
#declare false 0
flag = true;
flag++;
if (flag == true)
{
putpixel(x, y);
}
else
{
setpen(255, 0, 0, 0.0, 2);
putpixel(x,y);
}
enum logical{false, true}; // sets up the true false type. not a var
enum logical flag; creates a variable of that type for use.
#define true=1, false=0;
Users browsing this forum: No registered users and 1 guest