endians

Jean-Pierre A. Radley appl at jpr.com
Mon Nov 28 13:40:58 PST 2005


Ken Brody propounded (on Mon, Nov 28, 2005 at 04:15:40PM -0500):
| Quoting Dennis Malen (Mon, 28 Nov 2005 16:07:45 -0500):
| [...]
| > endiantest[3]: 0403-057 Syntax error at line 6 : `(' is not expected.
| >
| > The follwoing is what I used:
| >
| > #include <stdio.h>
| >
| > main()
| > {
| > long l=0x11223344;
| > char *pt=(char*)&l;
| >
| > printf("%02x%02x%02x%02x\n",pt[0],pt[1],pt[2],pt[3]);
| > }
| [...]
| 
| If that's an actual cut-and-paste of your file, then your system is
| broken.  A cut-and-paste from your email compiles just fine here, so
| the code as posted is correct.

He didn't compile -- he tried to run the source code. :-)

-- 
JP


More information about the Filepro-list mailing list