Namespace cpp::
- Description
Pike has a builtin C-style preprocessor. It works similar to the ANSI-C preprocessor but has a few extra features. These and the default set of preprocessor macros are described here.
The preprocessor is usually accessed via
MasterObject->compile_file()
orMasterObject->compile_string()
, but may be accessed directly by calling cpp().- See also
- Constant
__APPLE__
constant
__APPLE__
- Description
This define is defined when the Pike is running on MacOS X.
- Constant
__AUTO_BIGNUM__
constant
__AUTO_BIGNUM__
- Description
This define is defined when automatic bignum conversion is enabled. When enabled all integers will automatically be converted to bignums when they get bigger than what can be represented by an integer, hampering performance slightly instead of crashing the program. This define is always set since Pike 8.0.
- Constant
__BUILD__
constant
__BUILD__
- Description
This constant contains the build number of the current Pike version, represented as an integer. If another Pike version is emulated, this constant remains unaltered.
- See also
- Constant
__DATE__
constant
__DATE__
- Description
This define contains the current date at the time of compilation, e.g. "Jul 28 2001".
- Constant
__DIR__
constant
__DIR__
- Description
This define contains the directory path of the source file.
- Constant
__FILE__
constant
__FILE__
- Description
This define contains the file path and name of the source file.
- Constant
__HAIKU__
constant
__HAIKU__
- Description
This define is defined when the Pike is running on Haiku.
- Constant
__LINE__
constant
__LINE__
- Description
This define contains the current line number, represented as an integer, in the source file.
- Constant
__MAJOR__
constant
__MAJOR__
- Description
This define contains the major part of the current Pike version, represented as an integer. If another Pike version is emulated, this define is updated accordingly.
- See also
- Constant
__MINOR__
constant
__MINOR__
- Description
This define contains the minor part of the current Pike version, represented as an integer. If another Pike version is emulated, this define is updated accordingly.
- See also
- Constant
__NT__
constant
__NT__
- Description
This define is defined when the Pike is running on a Microsoft Windows OS, not just Microsoft Windows NT, as the name implies.
- Constant
__REAL_BUILD__
constant
__REAL_BUILD__
- Description
This define always contains the minor part of the version of the current Pike, represented as an integer.
- See also
- Constant
__REAL_MAJOR__
constant
__REAL_MAJOR__
- Description
This define always contains the major part of the version of the current Pike, represented as an integer.
- See also
- Constant
__REAL_MINOR__
constant
__REAL_MINOR__
- Description
This define always contains the minor part of the version of the current Pike, represented as an integer.
- See also
- Constant
__REAL_VERSION__
constant
__REAL_VERSION__
- Description
This define always contains the version of the current Pike, represented as a float.
- See also
- Constant
__TIME__
constant
__TIME__
- Description
This define contains the current time at the time of compilation, e.g. "12:20:51".
- Constant
__VERSION__
constant
__VERSION__
- Description
This define contains the current Pike version as a float. If another Pike version is emulated, this define is updated accordingly.
- See also
- Constant
__amigaos__
constant
__amigaos__
- Description
This define is defined when the Pike is running on Amiga OS.
- Constant
static_assert
constant
static_assert
- Description
This define expands to the symbol _Static_assert.
It is the preferred way to perform static (ie compile-time) assertions.
- Note
The macro can also be used to check for whether static assertions are supported.
- See also