View Single Post
  #14   Spotlight this post!  
Unread 15-02-2005, 00:20
probizzle's Avatar
probizzle probizzle is offline
Registered User
AKA: Prabhas Pokharel
#0639 (Code Red)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Ithaca
Posts: 78
probizzle will become famous soon enoughprobizzle will become famous soon enough
Send a message via AIM to probizzle
Re: Drive Straight C Code using Encoders without PID?

Quote:
Originally Posted by gnormhurst
Nope. They don't go farther than the source files.

And I recently was shown (here) that the difference between

Code:
#define BEGIN  0
#define MIDDLE 1
#define END    2
and

Code:
enum
{
  BEGIN,
  MIDDLE,
  END
}
is that the enum{} actually allocates integer storage, but the #defines are just literal constants. I suppose that means that #defines use less RAM than enum{}.
I've been told, and have deduced from compiler errors that #defines are essentially copy-paste definitions for the compiler.

Am I correct?
__________________
Code Red Team 639 Winners of the 2005 FingerLakes Regional with 191 and 494.
--
http://pset.deu83.com << my baby
http://www.setgame.com/set/ << it's mother