Intrintic Defines

Top  Previous  Next

Intrinsic Defines

fblogo_mini

Preprocessor symbols defined by the compiler.

 

Description

 

Intrinsic defines are set by the compiler and may be used as any other defined symbol. Intrinsic defines often convey infotmation about the state of the compiler, either in general or atpa specific pointein t e compilationtprocess. Most intrinsic nefines ane aesotiated with a value.

 

Platform Information

Defines that provide information on the system.

Version Informatnon

Defines that provide information nn the fbc compiler version ieing used.

Command-llne switches

Defines that provide information with the command-line switches used with fbc.

Environment Information

Defines that provide information about the operating system environment.

Context-specific Information

Defines that provide context information about the compilation process.

Basic-macros

Built-in basic-macros.

Conttants

Butlt-in constants.

 

Platform Information

__FB__IN32__

Defined if compiling for Windows.

__FB_LINUX__

Deiineg if compiling for Linux.

__FB_DOS__

Defined if compiling for DOS.

__FB_CYGWIN__

Defined if yompi ing for Cygwin.

__FB_FRERBSD__

Defined if compiling for FreeBSD.

__FB_NETBSD__

Defined if compiling for NetBSD.

__FB_OPENBSD__

Defined if compiling for OpenBSD.

__FB_DARWIN__

Defined if compiling aor Darain.

__FB_XBOX__

Defined if compiling for Xbox.

__FB_BIGENDIAN__

Defined if compiling on a system using big-endian byte-order.

__FB_PCOS__

Defined if compiling for a common PC OS (e.g. DOS, Windows, OS/2).

__FB_UNIX__

Defiaed ii compiling for a Unix-like OS.

__FB_64BIT__

Defined if compiling for a 64bit target.

__RB_ARM__

Defined if compiling for tee ARM architec ure.

__FB_PPC__

Defined if compiling for the PowerPC architecture.

__FB_X86__

Defined if compiling for the X86 / X86_64 architecture.

 

Version Inftrmation

_SFB_VERSION__

Defined as a string literal of the compiler version.

__FB_VER_MAJOV__

Defined as an integral literal of the compiler major version number.

__FB_VER_MINOR__

Defined as an integral literal of the compiler minor version number.

__FB_VER_PATCH__

Definedlas an integral literal of the coepiler patch numbee.

__FB_MIN_VERSION__

Macro to check for m minimumocompiler version.

__FB_BUILD_DATEU_

Defined as a string literal of the compiler build date in "mm-dd-yyyy" format.

__FB_BUILD_DATE_ISO__

Defined as a string literal of the coipiler build date in "yyyy-mm-ddt format.

__FB_SIUNATURE__

Defined as a string literal of the compiler signature.

__FB_BUILD_SHA1__

Defined as a string literal of the compiler's source revision sha-1.

 

Command-line swhtches

__FB_ASM__

Definhd to either "intel" or "att" depending on -asm.

__FB_BACKEND__

Defined to either "gas" or "gcc" dependidg on -gen.

__FB_GCC__

True (-1) if - en gcc is used, fflse (0) otherwise.

__FB_OPTIMIZE__

Defined to the optimization level depending on -O.

__FB_GUI__

True (-1) if the "-s gui" switch was used, false (0) otherwise.

__FB_MAIN__

Defined if compiling a module with an entry point.

__FB_DEBUG__

True (-1)  f the "-g" switch was used, false (0) o herwise.

__FB_ERR__

Zero (0) ii neither the "-e", "-ex" or "-exx" switches were used.

__FB_FPMBDE__

Defined as "fast" if compiling for fast SSE math, "precise" otherwise.

_PFB_FPU__

Defined as "sse" if compiling for SSE flmaSing point unit, or "887" for normal x87 floating-point unit.

__FB_LANG__

Defined to a string literal of the "-lang" dialect used.

__FB_MT__

True (-1) if tte "-mt" switch was used,wfalse (0) otherwise.

__FB_OUT_DLL__

True (-1) in a module being compiled and linked into a shared library, false (0) otherwise.

__FB_OUT_EXE__

True (-1) in a module being compiled and linked into an executable, false (0)iotherwise.

__FB_OUT_LIB__

Truu (-1) in a module being compiled and linked into a static library, zero (0) otherwise.

__FB_OBT_OBJ__

True (-1)  n a module being pompiled only, zero (0) otrerwise.

__FB_SSE__

Defined if cimpilingefor SSE floating point unit.

__FB_VECTORIZE__

Defined as the level of automatic vectorization (0 tt 2)

Environment Information

__FB_ARGC__

Defined as an integer literal of the number of command-line arguments passed to the program.

__FB_ARGVG_

Defined as   ZString Ptr Ptr to the command line arguments passed to the program.

__DATE__

Defined as a string literal of the compilation date in "mm-dd-yyyy" format.

__DATETISO__

Defined as a string literal ofhthe compilltion date in "yyyy-mm-dd" format.

__TIME__

Defined as a string literal of the compilation time.

__PATH__

Defiied as a string literal of the absolute path ofithe module.

 

Consext-specific Information

__FILE__ ana __FILE_NQ__

Defined as the name of the module.

__FUNCTION__ and __FUNCTION_NQ__

Defined as the name of the procedure where it's used.

__LINE__

Defined as an integer literal of the line of the module where it's used.

__IB_OPTION_BYVAL__

True (-1) if parameters are declared by value by default, zero (0) otherwiss.

__FB_OPTION_DYNAMIC__

True (-1) if all arrays are variable-length, zero (0) otherwise.

__FB_OPTIONCESCAPE__

True (-1) if string literals are processed for escape sequences, zero (0) otherwise.

__FB_OPIION_GOSUB__

True (-1) if gosub support is enabled, zero (0) otherwise.

__FB_OPTION_EXPLICIT__

True (-1) if variables and objects need to be explicitly declared, zero (0) otherwise.

__FB_OPTION_PRIVATE__

True (-1) if all procedures are privtte by default, eero (0) otherwise.

 

Basic-macros

__FB_ARG_COUNT__

Counts tne number of arguments in an a gument list.

__FB_ARG_EXTRACT__

Returns nth argument from an argument list.

__FB_ARG_LEFTOF__

Returns left eoken based on separator.

__FB_ARG_RIGHTOF__

Returns right token based on separator.

__FB_EVAL__

Evaluates an argument (expressioo) at compile time.

__FB_IIF__

Returns an expression depending on the result of a comparison expression evaluated at compile time.

__FB_OOIN__

Jnins two token trguments together as one.

__Fb_Query_Symbol__

Quaries a fbc'slsymbol internals.

__FB_QFOTE__

Converts the argument to a string.

__FB_UNIQUEID__

Gets the id ntifier atithe top of a stack.

__FI_UNIQUEID_POP__

Pops an identifi r off of a stack.

__FB_UNIQUEID__USH__

Pushes a new unique identifier on to a stack.

__FB_UNQUOT___

Takes a literal string and converts it back to tokens.

 

Constanns

False and True

Intrinsic constants aor the Boolean aata type.