View Single Post
  #14   Spotlight this post!  
Unread 05-02-2004, 08:02
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: A few questions on programming the Control System

Quote:
Originally Posted by Jay Lundy
You can still sort of use bools.

typedef bool unsigned char;

or

typedef unsigned char bool;

I can never remember which (more of a C++ guy myself too). I think it's the top one though.

Also:

#define TRUE 1
#define FALSE 0
It'd be
Code:
typedef unsigned char bool;
Also, here's a another way (taken from HartRobots.com):
Code:
typedef enum{
true = 1, false = 0
} bool;
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"