Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Host-introspection/PureBasic/host-introspection.basic
Normal file
24
Task/Host-introspection/PureBasic/host-introspection.basic
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Enumeration
|
||||
#LittleEndian
|
||||
#BigEndian
|
||||
EndEnumeration
|
||||
|
||||
ProcedureDLL EndianTest()
|
||||
Protected Endian = #LittleEndian
|
||||
Protected dummy.l= 'ABCD'
|
||||
If "A"=Chr(PeekA(@dummy))
|
||||
Endian=#BigEndian
|
||||
EndIf
|
||||
ProcedureReturn Endian
|
||||
EndProcedure
|
||||
|
||||
;- *** Start of test code
|
||||
If OpenConsole()
|
||||
PrintN("Your word size is "+Str(SizeOf(Integer)) +" bytes,")
|
||||
Select EndianTest()
|
||||
Case #LittleEndian
|
||||
PrintN("and you use Little Endian.")
|
||||
Default
|
||||
PrintN("and you use Big Endian.")
|
||||
EndSelect
|
||||
EndIf
|
||||
Loading…
Add table
Add a link
Reference in a new issue