Skip navigation.
 
mlRe: long long int
FROM : Nat!
DATE : Sun Jan 20 18:40:08 2002

On Sonntag, Januar 20, 2002, at 06:19  Uhr, Gerriet M. Denkmann wrote:

> unsigned long long     ul64 = 0x12312345678ULL ;
> unsigned long     ul32 = 0x87654321UL ;
> NSLog(@"\nul64 %#-13x ul32 %#10x", ul64, ul32);
> printf("ul64 %#-13Lx ul32 %#10lx\n", ul64, ul32);
>
> both return:       ul64 0x123        ul32 0x12345678
> should return:     ul64 0x12312345678 ul32 0x87654321
>
> What is the prefered work-around for this bug or feature?
>
> Gerriet.



Might be a fluke, but

#include <stdio.h>

main()
{
    printf( "%#qX\n", 0x12345678AAAAULL);
}

produces

0X12345678AAAA

now there's a bug, as you don't want 0X but 0x...

Nat!
------------------------------------------------------
Some people drink deep from the fountains of life, and
some just gargle. -- DLR


Related mailsAuthorDate
mllong long int Gerriet M. Denkman… Jan 20, 18:19
mlRe: long long int Nat! Jan 20, 18:40
mlRe: long long int Kenneth C. Dyke Jan 20, 18:40
mlRe: long long int Gerriet M. Denkman… Jan 20, 19:58
mlRe: long long int Kenneth C. Dyke Jan 20, 21:35
mlRe: long long int Gregory Weston Jan 21, 02:34