delorie.com/archives/browse.cgi | search |
Date: | Sun, 17 May 1998 19:05:58 -0400 (EDT) |
Message-Id: | <199805172305.TAA28269@delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | pderbysh AT usa DOT net |
CC: | djgpp AT delorie DOT com |
In-reply-to: | <vLJ71.1308$qR3.5055883@news20.bellglobal.com> (pderbysh@usa.net) |
Subject: | Re: Byte order of long long? |
> Longs in DJGPP have order 0123 (little endian), as indicated in > machine/endian.h... what does a long long look like though, 01234567 or > 45670123? By your convention, 01234567 Of course, a tiny C program could have shown you this: int main(void) { long long l = 0x123456789abcdefLL; unsigned char *c = (unsigned char *)(&l); int i; for (i=0; i<sizeof(l); i++) printf(" %02x", c[i]); printf("\n"); return 0; }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |