Anonymous user
Host introspection: Difference between revisions
Correction to non-portable code
No edit summary |
(Correction to non-portable code) |
||
Line 191:
=={{header|Fortran}}==
{{works with|Fortran|90 and later}}
<lang fortran>
character(len=1) :: c(20)
equivalence (c, i)
WRITE(*,*) bit_size(1)
! which may (or may not!) equal the word size
i = 1
IF (ichar(c(1)) == 0) THEN
WRITE(*,*) "Big Endian"▼
ELSE▼
WRITE(*,*) "Little Endian"▼
END IF</lang>▼
▲ WRITE(*,*) "Big Endian"
▲ELSE
▲ WRITE(*,*) "Little Endian"
▲END IF</lang>
=={{header|F_Sharp|F#}}==
|