PDA

View Full Version : Constant data types



The Master
- 7th October 2008, 12:52
Hi, What data type is a constant? Can you store a WORD size value in one? The manual suggests you can with a little example but it doesnt say what type of data is allowed. I had a little trouble with a word sized value last night and im not sure if its my code or the constant. It seemed to work when it was a variable instead

skimask
- 7th October 2008, 13:35
Hi, What data type is a constant?
It is whatever it is... If it's an ASCII character, it's a byte. If it's 200, it's a byte. If it's 2355, it's a word. If it's 129943 AND you're using an 18F AND you're using PBP 2.50, it's a long.

The Master
- 7th October 2008, 13:43
Ahh, ok. Must have been a problem somewhere else in my code.

Thanx