View Single Post
  #37   Spotlight this post!  
Unread 15-03-2004, 10:36
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,868
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: quick question: TIMERS

Quote:
Originally Posted by 10intheCrunch
Where's the option for making chars unsigned by default? Does that affect ints and longs as well?
You set compiler flags in MPLAB
Project->Build Options...->Project
under tab "MPLAB C18"

There is a quick radio button for treating "char" as unsigned and one for forcing all calculations to be performed at least as int rather than the smallest type included in the calculation.
You can also enter your own flags by clicking on "Use Alternate Settings" and typing into the box that becomes enabled. You'll find the available compiler flags documented in the MPLAB C18 C Compiler User's Guide that came on the MPLAB installation CD, Appendix C. e.g., -k is the flag for treating char as unsigned. When you click on the radio button you'll see "-k" appear in the "Inherit global settings" window.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle