Go Down

Topic: Data type int and long, anything in between? (Read 795 times) previous topic - next topic

Bebbetufs

I'm just curious if there is a data type besides long which can hold more than an int. I need to hold a large number, but long seems like overkill.

AWOL

No.
Have you tried "unsigned int" (0..65535)?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Bebbetufs

Yep.
I though maybe I could specify a double int or something. :)

AWOL

Quote
I though maybe I could specify a double int or something

A "double int" would be a long.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

robtillaart

What are the minimum and maxiumum value you want to store?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Bebbetufs


NI$HANT

"Real Men can Accomplish  Anything"
- <a href="http://www.winacro.com">  <b><font color="red">Website</font></b> </a> 
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

davekw7x

#7
Feb 28, 2011, 08:34 pm Last Edit: Feb 28, 2011, 08:37 pm by davekw7x Reason: 1
...I need to hold a large number, but long seems like overkill.


Quote from: Bebbetufs

...double int...



With the Arduino compiler, avr-gcc, an int occupies two bytes and a long occupies four bytes.  There is no built-in data type that occupies more than two bytes and fewer than four bytes.  Period.  Full stop.


Regards,

Dave

Bebbetufs


Go Up