How to resolve the algorithm Host introspection step by step in the FreeBASIC programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Host introspection step by step in the FreeBASIC programming language
Table of Contents
Problem Statement
Print the word size and endianness of the host machine. See also: Variable size/Get
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Host introspection step by step in the FreeBASIC programming language
Source code in the freebasic programming language
' FB 1.05.0 Win64 (so little endian, 8 byte word size, expected)
' uses intrinsic defines, set by the compiler
#Ifdef __FB_64BIT__
Print "Host has an 8 byte word size"
#Else
Print "Host has a 4 byte word size"
#EndIf
#Ifdef __FB_BIGENDIAN__
Print "Host is big endian"
#Else
Print "Host is little endian"
#EndIf
Sleep
You may also check:How to resolve the algorithm Guess the number step by step in the XBS programming language
You may also check:How to resolve the algorithm Show ASCII table step by step in the MiniScript programming language
You may also check:How to resolve the algorithm Kosaraju step by step in the Standard ML programming language
You may also check:How to resolve the algorithm Mad Libs step by step in the C programming language
You may also check:How to resolve the algorithm Non-decimal radices/Convert step by step in the Raku programming language