common.bi

Summary
common.bi
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group
UsageThis file is automatically included and is required by all headers.
extContains global constants and enums.
Enumerations
boolDefines library wide boolean values.
Constants
nullConstant definition of null
FBEXT_MAJOR_VERSIONThe major (0.x.x) version of the library.
FBEXT_MINOR_VERSIONThe minor (x.0.x) version of the library.
FBEXT_PATCH_VERSIONThe patch (x.x.0) version of the library.
FBEXT_VERSIONInteger representation of the library version.
FBEXT_VERSION_STRINGString containing the full Extended Library version.
FBEXT_MIN_BYTEMinimum allowed value in a Byte type.
FBEXT_MAX_BYTEMaximum allowed value in a Byte type.
FBEXT_MIN_UBYTEMinimum allowed value in a UByte type.
FBEXT_MAX_UBYTEMaximum allowed value in a UByte type.
FBEXT_MIN_SHORTMinimum allowed value in a Short type.
FBEXT_MAX_SHORTMaximum allowed value in a Short type.
FBEXT_MIN_USHORTMinimum allowed value in a UShort type.
FBEXT_MAX_USHORTMaximum allowed value in a UShort type.
FBEXT_MIN_INTEGERMinimum allowed value in a Integer type.
FBEXT_MAX_INTEGERMaximum allowed value in a Integer type.
FBEXT_MIN_UINTEGERMinimum allowed value in a UInteger type.
FBEXT_MAX_UINTEGERMaximum allowed value in a UInteger type.
FBEXT_MIN_LONGMinimum allowed value in a Long type.
FBEXT_MAX_LONGMaximum allowed value in a Long type.
FBEXT_MIN_ULONGMinimum allowed value in a ULong type.
FBEXT_MAX_ULONGMaximum allowed value in a ULong type.
FBEXT_MIN_LONGINTMinimum allowed value in a LongInt type.
FBEXT_MAX_LONGINTMaxmimum allowed value in a LongInt type.
FBEXT_MIN_ULONGINTMinimum allowed value in a ULongInt type.
FBEXT_MAX_ULONGINTMaximum allowed value in a ULongInt type.
Types
SizeTypeGlobally used type when defining the Size of an object.
Macros
FBEXT_IS_UNSIGNEDDetermines if a type is an intrinsic unsigned integral type.
FBEXT_IS_SIGNEDDetermines if a type is an intrinsic signed integral type.
FBEXT_IS_INTEGRALDetermines if a type is an intrinsic integral type.
FBEXT_IS_FLOATINGPOINTDetermines if a type is an intrinsic floating-point type.
FBEXT_IS_NUMERICDetermines if a type is an intrinsic numeric type.
FBEXT_IS_INTRINSICDetermines if a type is an instrinic type.
FBEXT_IS_SIMPLEDetermines a type’s simplicity (a type is simple if it is an intrinsic type that can be bit-copied).

License

Copyright © 2009, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License

Usage

This file is automatically included and is required by all headers.

ext

Contains global constants and enums.

Summary
Enumerations
boolDefines library wide boolean values.
Constants
nullConstant definition of null
FBEXT_MAJOR_VERSIONThe major (0.x.x) version of the library.
FBEXT_MINOR_VERSIONThe minor (x.0.x) version of the library.
FBEXT_PATCH_VERSIONThe patch (x.x.0) version of the library.
FBEXT_VERSIONInteger representation of the library version.
FBEXT_VERSION_STRINGString containing the full Extended Library version.
FBEXT_MIN_BYTEMinimum allowed value in a Byte type.
FBEXT_MAX_BYTEMaximum allowed value in a Byte type.
FBEXT_MIN_UBYTEMinimum allowed value in a UByte type.
FBEXT_MAX_UBYTEMaximum allowed value in a UByte type.
FBEXT_MIN_SHORTMinimum allowed value in a Short type.
FBEXT_MAX_SHORTMaximum allowed value in a Short type.
FBEXT_MIN_USHORTMinimum allowed value in a UShort type.
FBEXT_MAX_USHORTMaximum allowed value in a UShort type.
FBEXT_MIN_INTEGERMinimum allowed value in a Integer type.
FBEXT_MAX_INTEGERMaximum allowed value in a Integer type.
FBEXT_MIN_UINTEGERMinimum allowed value in a UInteger type.
FBEXT_MAX_UINTEGERMaximum allowed value in a UInteger type.
FBEXT_MIN_LONGMinimum allowed value in a Long type.
FBEXT_MAX_LONGMaximum allowed value in a Long type.
FBEXT_MIN_ULONGMinimum allowed value in a ULong type.
FBEXT_MAX_ULONGMaximum allowed value in a ULong type.
FBEXT_MIN_LONGINTMinimum allowed value in a LongInt type.
FBEXT_MAX_LONGINTMaxmimum allowed value in a LongInt type.
FBEXT_MIN_ULONGINTMinimum allowed value in a ULongInt type.
FBEXT_MAX_ULONGINTMaximum allowed value in a ULongInt type.
Types
SizeTypeGlobally used type when defining the Size of an object.
Macros
FBEXT_IS_UNSIGNEDDetermines if a type is an intrinsic unsigned integral type.
FBEXT_IS_SIGNEDDetermines if a type is an intrinsic signed integral type.
FBEXT_IS_INTEGRALDetermines if a type is an intrinsic integral type.
FBEXT_IS_FLOATINGPOINTDetermines if a type is an intrinsic floating-point type.
FBEXT_IS_NUMERICDetermines if a type is an intrinsic numeric type.
FBEXT_IS_INTRINSICDetermines if a type is an instrinic type.
FBEXT_IS_SIMPLEDetermines a type’s simplicity (a type is simple if it is an intrinsic type that can be bit-copied).

Enumerations

bool

Defines library wide boolean values.

false0
true-1
ctrue1
invalidnot defined as a number

Constants

null

const null = cast(any ptr,
 )

Constant definition of null

FBEXT_MAJOR_VERSION

const FBEXT_MAJOR_VERSION = 0

The major (0.x.x) version of the library.

FBEXT_MINOR_VERSION

const FBEXT_MINOR_VERSION = 3

The minor (x.0.x) version of the library.

FBEXT_PATCH_VERSION

const FBEXT_PATCH_VERSION = 0

The patch (x.x.0) version of the library.

FBEXT_VERSION

const FBEXT_VERSION = (
   FBEXT_MAJOR_VERSION shl 16
) OR (FBEXT_MINOR_VERSION shl 8) OR FBEXT_PATCH_VERSION

Integer representation of the library version.

FBEXT_VERSION_STRING

const FBEXT_VERSION_STRING = "FreeBASIC Extended Standard Library " & FBEXT_MAJOR_VERSION & "." & FBEXT_MINOR_VERSION & "." & FBEXT_PATCH_VERSION

String containing the full Extended Library version.

FBEXT_MIN_BYTE

const FBEXT_MIN_BYTE as byte = -((2^(sizeof(byte)*8))/2)

Minimum allowed value in a Byte type.

FBEXT_MAX_BYTE

const FBEXT_MAX_BYTE as byte = ((2^(sizeof(byte)*8))/2)-1

Maximum allowed value in a Byte type.

FBEXT_MIN_UBYTE

const as ubyte FBEXT_MIN_UBYTE = 0

Minimum allowed value in a UByte type.

FBEXT_MAX_UBYTE

const as ubyte FBEXT_MAX_UBYTE = (2^(sizeof(ubyte)*8))-1

Maximum allowed value in a UByte type.

FBEXT_MIN_SHORT

const as short FBEXT_MIN_SHORT = -((2^(sizeof(short)*8))/2)

Minimum allowed value in a Short type.

FBEXT_MAX_SHORT

const as short FBEXT_MAX_SHORT = ((2^(sizeof(short)*8))/2)-1

Maximum allowed value in a Short type.

FBEXT_MIN_USHORT

const as ushort FBEXT_MIN_USHORT = 0

Minimum allowed value in a UShort type.

FBEXT_MAX_USHORT

const as ushort FBEXT_MAX_USHORT = (2^(sizeof(ushort)*8))-1

Maximum allowed value in a UShort type.

FBEXT_MIN_INTEGER

const as integer FBEXT_MIN_INTEGER = -((2^(sizeof(integer)*8))/2)

Minimum allowed value in a Integer type.

FBEXT_MAX_INTEGER

const as integer FBEXT_MAX_INTEGER = ((2^(sizeof(integer)*8))/2)-1

Maximum allowed value in a Integer type.

FBEXT_MIN_UINTEGER

const as uinteger FBEXT_MIN_UINTEGER = 0

Minimum allowed value in a UInteger type.

FBEXT_MAX_UINTEGER

const as uinteger FBEXT_MAX_UINTEGER = (2^(sizeof(uinteger)*8))-1

Maximum allowed value in a UInteger type.

FBEXT_MIN_LONG

const as long FBEXT_MIN_LONG = -((2^(sizeof(long)*8))/2)

Minimum allowed value in a Long type.

FBEXT_MAX_LONG

const as long FBEXT_MAX_LONG = ((2^(sizeof(long)*8))/2)-1

Maximum allowed value in a Long type.

FBEXT_MIN_ULONG

const as ulong FBEXT_MIN_ULONG = 0

Minimum allowed value in a ULong type.

FBEXT_MAX_ULONG

const as ulong FBEXT_MAX_ULONG = (2^(sizeof(ulong)*8))-1

Maximum allowed value in a ULong type.

FBEXT_MIN_LONGINT

const as longint FBEXT_MIN_LONGINT = -((2^(sizeof(longint)*8))/2)

Minimum allowed value in a LongInt type.

FBEXT_MAX_LONGINT

const as longint FBEXT_MAX_LONGINT = ((2^(sizeof(longint)*8))/2)-1

Maxmimum allowed value in a LongInt type.

FBEXT_MIN_ULONGINT

const as ulongint FBEXT_MIN_ULONGINT = 0

Minimum allowed value in a ULongInt type.

FBEXT_MAX_ULONGINT

const as ulongint FBEXT_MAX_ULONGINT = 2^(sizeof(ulongint)*8)-1

Maximum allowed value in a ULongInt type.

Types

SizeType

type SizeType as uinteger

Globally used type when defining the Size of an object.

Macros

FBEXT_IS_UNSIGNED

# define FBEXT_IS_UNSIGNED(
   T_
) ( (typeof(T_) = typeof(ubyte)) or (typeof(T_) = typeof(ushort)) or (typeof(T_) = typeof(uinteger)) or (typeof(T_) = typeof(ulong)) or (typeof(T_) = typeof(ulongint)) )

Determines if a type is an intrinsic unsigned integral type.

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

FBEXT_IS_SIGNED

# define FBEXT_IS_SIGNED(
   T_
) ( (typeof(T_) = typeof(byte)) or (typeof(T_) = typeof(short)) or (typeof(T_) = typeof(integer)) or (typeof(T_) = typeof(long)) or (typeof(T_) = typeof(longint)) )

Determines if a type is an intrinsic signed integral type.

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

FBEXT_IS_INTEGRAL

# define FBEXT_IS_INTEGRAL(T_) (FBEXT_IS_UNSIGNED(T_) or FBEXT_IS_SIGNED(T_))

Determines if a type is an intrinsic integral type.

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

FBEXT_IS_FLOATINGPOINT

# define FBEXT_IS_FLOATINGPOINT(
   T_
) ((typeof(T_) = typeof(single)) or (typeof(T_) = typeof(double)))

Determines if a type is an intrinsic floating-point type.

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

FBEXT_IS_NUMERIC

# define FBEXT_IS_NUMERIC(
   T_
) (FBEXT_IS_INTEGRAL(T_) or FBEXT_IS_FLOATINGPOINT(T_))

Determines if a type is an intrinsic numeric type.

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

FBEXT_IS_INTRINSIC

# define FBEXT_IS_INTRINSIC(T_) (FBEXT_IS_NUMERIC(T_) or (T_ = string))

Determines if a type is an instrinic type.

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

FBEXT_IS_SIMPLE

# define FBEXT_IS_SIMPLE(T_) (FBEXT_IS_NUMERIC(T_))

Determines a type’s simplicity (a type is simple if it is an intrinsic type that can be bit-copied).

Parameters

T_A type.

Returns

Returns a boolean expression that can be used in preprocessor #if (and it’s variants) statements.

const null = cast(any ptr,
 )
Constant definition of null
const FBEXT_MAJOR_VERSION = 0
The major (0.x.x) version of the library.
const FBEXT_MINOR_VERSION = 3
The minor (x.0.x) version of the library.
const FBEXT_PATCH_VERSION = 0
The patch (x.x.0) version of the library.
const FBEXT_VERSION = (
   FBEXT_MAJOR_VERSION shl 16
) OR (FBEXT_MINOR_VERSION shl 8) OR FBEXT_PATCH_VERSION
Integer representation of the library version.
const FBEXT_VERSION_STRING = "FreeBASIC Extended Standard Library " & FBEXT_MAJOR_VERSION & "." & FBEXT_MINOR_VERSION & "." & FBEXT_PATCH_VERSION
String containing the full Extended Library version.
const FBEXT_MIN_BYTE as byte = -((2^(sizeof(byte)*8))/2)
Minimum allowed value in a Byte type.
const FBEXT_MAX_BYTE as byte = ((2^(sizeof(byte)*8))/2)-1
Maximum allowed value in a Byte type.
const as ubyte FBEXT_MIN_UBYTE = 0
Minimum allowed value in a UByte type.
const as ubyte FBEXT_MAX_UBYTE = (2^(sizeof(ubyte)*8))-1
Maximum allowed value in a UByte type.
const as short FBEXT_MIN_SHORT = -((2^(sizeof(short)*8))/2)
Minimum allowed value in a Short type.
const as short FBEXT_MAX_SHORT = ((2^(sizeof(short)*8))/2)-1
Maximum allowed value in a Short type.
const as ushort FBEXT_MIN_USHORT = 0
Minimum allowed value in a UShort type.
const as ushort FBEXT_MAX_USHORT = (2^(sizeof(ushort)*8))-1
Maximum allowed value in a UShort type.
const as integer FBEXT_MIN_INTEGER = -((2^(sizeof(integer)*8))/2)
Minimum allowed value in a Integer type.
const as integer FBEXT_MAX_INTEGER = ((2^(sizeof(integer)*8))/2)-1
Maximum allowed value in a Integer type.
const as uinteger FBEXT_MIN_UINTEGER = 0
Minimum allowed value in a UInteger type.
const as uinteger FBEXT_MAX_UINTEGER = (2^(sizeof(uinteger)*8))-1
Maximum allowed value in a UInteger type.
const as long FBEXT_MIN_LONG = -((2^(sizeof(long)*8))/2)
Minimum allowed value in a Long type.
const as long FBEXT_MAX_LONG = ((2^(sizeof(long)*8))/2)-1
Maximum allowed value in a Long type.
const as ulong FBEXT_MIN_ULONG = 0
Minimum allowed value in a ULong type.
const as ulong FBEXT_MAX_ULONG = (2^(sizeof(ulong)*8))-1
Maximum allowed value in a ULong type.
const as longint FBEXT_MIN_LONGINT = -((2^(sizeof(longint)*8))/2)
Minimum allowed value in a LongInt type.
const as longint FBEXT_MAX_LONGINT = ((2^(sizeof(longint)*8))/2)-1
Maxmimum allowed value in a LongInt type.
const as ulongint FBEXT_MIN_ULONGINT = 0
Minimum allowed value in a ULongInt type.
const as ulongint FBEXT_MAX_ULONGINT = 2^(sizeof(ulongint)*8)-1
Maximum allowed value in a ULongInt type.
type SizeType as uinteger
Globally used type when defining the Size of an object.
# define FBEXT_IS_UNSIGNED(
   T_
) ( (typeof(T_) = typeof(ubyte)) or (typeof(T_) = typeof(ushort)) or (typeof(T_) = typeof(uinteger)) or (typeof(T_) = typeof(ulong)) or (typeof(T_) = typeof(ulongint)) )
Determines if a type is an intrinsic unsigned integral type.
# define FBEXT_IS_SIGNED(
   T_
) ( (typeof(T_) = typeof(byte)) or (typeof(T_) = typeof(short)) or (typeof(T_) = typeof(integer)) or (typeof(T_) = typeof(long)) or (typeof(T_) = typeof(longint)) )
Determines if a type is an intrinsic signed integral type.
# define FBEXT_IS_INTEGRAL(T_) (FBEXT_IS_UNSIGNED(T_) or FBEXT_IS_SIGNED(T_))
Determines if a type is an intrinsic integral type.
# define FBEXT_IS_FLOATINGPOINT(
   T_
) ((typeof(T_) = typeof(single)) or (typeof(T_) = typeof(double)))
Determines if a type is an intrinsic floating-point type.
# define FBEXT_IS_NUMERIC(
   T_
) (FBEXT_IS_INTEGRAL(T_) or FBEXT_IS_FLOATINGPOINT(T_))
Determines if a type is an intrinsic numeric type.
# define FBEXT_IS_INTRINSIC(T_) (FBEXT_IS_NUMERIC(T_) or (T_ = string))
Determines if a type is an instrinic type.
# define FBEXT_IS_SIMPLE(T_) (FBEXT_IS_NUMERIC(T_))
Determines a type’s simplicity (a type is simple if it is an intrinsic type that can be bit-copied).