View Single Post
  #6   Spotlight this post!  
Unread 04-01-2005, 23:19
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Program error after controller reset

Quote:
Originally Posted by Astronouth7303
You'd think FIRST would have a variable so that it won't printf before it's initialized.
Jamie,

Hold on a second...

1. The default code that IFI provides us works. If we modify it and break it, it can not be their fault. We must assume responsibility for our actions.

2. Just what is the value of an uninitialized variable? Answer: It is undefined. If you are lucky, it will be 0x0000 or 0xFFFF. If you are unlucky, it can be anything.

My point here is that it is impossible to do what you suggest in an embedded controller.

It is possible in a program running under an operating system (the operating system guarantees the starting state of RAM).
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...