PSEUDO_CONST_CALC Function (Macro)

compat.h

#define PSEUDO_CONST_CALC(calc92,calc89,calc92plus,calcv200) (CALCULATOR ? ((CALCULATOR == 1) ? (calc92plus) : (calcv200)) : (calc89))

A macro to construct a pseudo-constant from calculator-based values.

PSEUDO_CONST_CALC is a macro used by PSEUDO_CONST_SCREEN and PSEUDO_CONST_KBD. Most of the time, you should not use it directly, but use these two macros instead.

It takes several values for the different calculators that TIGCC can currently compile code for, and returns one of them based on the calculator that the program currently uses. The values must be plain positive integers up to 65535 (0xFFFF) in decimal or hexadecimal notation, otherwise this macro may fail in some cases.

Uses of this macro may be optimized by defining OPTIMIZE_CALC_CONSTS.


See also: PSEUDO_CONST_SCREEN, PSEUDO_CONST_KBD