INTEGER FUNCTION GET_ENDIAN()
int get_endian() ;
BIG_ENDIAN
LITTLE_ENDIAN
PDP_ENDIAN
... INCLUDE 'PARMS3.EXT' ... INTEGER GET_ENDIAN INTEGER IBYTEORDER ... IBYTEORDER = GET_ENDIAN() IF ( IBYTEORDER .EQ. LITTLE_ENDIAN ) THEN ... !! processing for x86-style byte order ELSE IF ( IBYTEORDER .EQ. BIG_ENDIAN ) THEN ... !! processing for Sun/SGI-style byte order ELSE IF ( IBYTEORDER .EQ. PDP_ENDIAN ) THEN ... !! processing for PDP11-style byte order ELSE ... !! something really scrambled: call M3EXIT()? END IF ...
... #include "iodecl3.h" ... int i ; ... i = get_endian() ; /* Now i is byte-order value... */ ...
To: Models-3/EDSS I/O API: The Help Pages