|03-14-2004, 05:01 AM||#1|
Longs, ints and printf (ansi-C)
I have just finished my little hexadecimal to decimal tool, and again stumbled on the stupid 32 bit barrier of integer values...
A few questions:
a) ints and longs are usually the same these days, aren't they? The ansi-C reference I'm looking at claims ints are 16 bit and longs are 32 bits, but ints are 32 as well these days?
b) why won't printf print longs and is there any way around that (besides casting to integer)?
c) Why does an unsigned integer overflow with values such as FFFF FFAA?
d) Working with longs I appear to get no overflows no matter how big a number I use, at least the if(number < 0) is never true for longs. Why is that?
|ints , printf , longs , ansic|
|Thread||Thread Starter||Forum||Replies||Last Post|
|ansi capable telnet application for OS3.x?||AmiKit||Amiga Software Issues and Discussion||5||04-09-2009 12:37 PM|
|C++ - convert string to array of ints||motorollin||CH / Science and Technology||12||09-01-2007 10:27 AM|
|printf output to string possible ?||Jose||Amiga OS -- Development||7||09-11-2005 04:05 AM|
|Karlos' weekly GNU/ANSI C++ on amiga bash :-)||Karlos||Amiga OS -- Development||5||04-08-2004 04:43 PM|
|More GNU C++ (ANSI C++ mode) oddness||Karlos||Amiga OS -- Development||14||03-26-2004 11:02 AM|