Host introspection: Difference between revisions
Content added Content deleted
(Add Neko) |
No edit summary |
||
Line 530: | Line 530: | ||
Endianness: little-endian |
Endianness: little-endian |
||
</pre> |
</pre> |
||
=={{header|M2000 Interpreter}}== |
|||
<lang M2000 Interpreter> |
|||
Module CheckIt { |
|||
\\ Always run in Little-endian, 32 bits (in Wow64 in 64 bit os) |
|||
Module EndiannessAndSize { |
|||
Buffer Check as Long |
|||
Return Check, 0:=1 |
|||
if eval(Check, 0 as byte)=1 then { |
|||
Print "Little-endian" |
|||
} |
|||
\\ 4 bytes |
|||
Print "Word size:"; Len(Check)*8;" bits" |
|||
} |
|||
EndiannessAndSize |
|||
\\ Access to internal com object clsOsInfo |
|||
Declare OsInfo Information |
|||
Print Type$(OsInfo) ="clsOSInfo" |
|||
\\ Build is a read only property |
|||
With OsInfo, "Build" as Build, "OSName" as OSName$, "IsElevated" as IsElevated |
|||
Print OsName$ |
|||
Print "Build=";Build |
|||
\\ IsWow64 is a function |
|||
Method OsInfo, "IsWow64" as IsWow64 |
|||
If IsWow64 Then { |
|||
Print "64 bit Os" |
|||
} Else { |
|||
Print "32 bit OS" |
|||
} |
|||
Print "IsElevated:";IsElevated |
|||
} |
|||
Checkit |
|||
</lang> |
|||
=={{header|Mathematica}} / {{header|Wolfram Language}}== |
=={{header|Mathematica}} / {{header|Wolfram Language}}== |
||
<lang Mathematica>If[$ByteOrdering > 0, Print["Big endian"], Print["Little endian" ]] |
<lang Mathematica>If[$ByteOrdering > 0, Print["Big endian"], Print["Little endian" ]] |