The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



Thread: Unsigned int
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-03-2002
AtleRamsli AtleRamsli is offline
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
I wasn't sure is this was HP-UX specific, there is a weirdicious feature in GCC that will make the aforementioned program work with two changes (at least under Linux)

Use data type

long long l; /* Not typo! will compile */

and printf("%Ld", l); /* Notice capital L */

If GCC is used on various Os'es, it should work.
(I just checked on Solaris, it prints 1 :-(


Atle
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS
Reply With Quote