Jump to content

Host introspection: Difference between revisions

no edit summary
(Add Neko)
No edit summary
Line 530:
Endianness: little-endian
</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}}==
<lang Mathematica>If[$ByteOrdering > 0, Print["Big endian"], Print["Little endian" ]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.