Print the word size and endianness of the host machine.

See also: Variable size/Get

 
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
 