Appendix D: Built-in Defines
The following system defines are built into the compiler so you can conditionally compile your code based on which defines are set using the .IFDEF-.ELSE-.ENDC compiler directive. For example, you can set an operating system define for the system on which you’re running and then conditionally compile your code for that system with .IFDEF. See Built-in compiler definitions for more information.
Operating system and platform defines
Define |
Description |
---|---|
D_GUI | General Windows (not version dependent) |
OS_MSDOS | MS-DOS |
OS_WINDOWSNT3X | Windows NT 3.x |
OS_WINDOWSNT | Windows NT |
OS_WINDOWS95 | Windows 95 |
OS_WINDOWSNT4X | Windows NT 4.x |
OS_WINDOWSNT5X | Windows NT 5.x |
OS_WINDOWS2000 | Windows 2000 |
OS_WINDOWS98 | Windows 98 |
OS_WINDOWSME | Windows ME |
OS_WINDOWSXP | Windows XP |
OS_WINDOWSNET | Windows .NET |
OS_WINDOWSVISTA | Windows Vista |
OS_WINDOWSSERVER2007 | Windows Server 2007 |
OS_WINDOWSSERVER2008 | Windows Server 2008 |
OS_WINDOWS7 | Windows 7 |
OS_WINDOWSSERVER2008R2 | Windows Server 2008 R2 |
OS_WINDOWS8 | Windows 8 |
OS_WINDOWSSERVER2012 | Windows Server 2012 |
OS_WINDOWS81 | Windows 8.1 |
OS_WINDOWSSERVER2012R2 | Windows Server 2012 R2 |
OS_WINDOWS10 | Windows 10 |
OS_WINDOWSSERVER2016 | Windows Server 2016 |
OS_WINDOWS11 | Windows 11 |
OS_WINDOWSSERVER2019 | Windows Server 2019 |
OS_WINDOWSSERVER2022 | Windows Server 2022 |
OS_WINDOWS64 | Windows 64 |
OS_UNIX | Unix |
OS_VMS | OpenVMS |
D_VMS | General OpenVMS (not version dependent) |
D_V_5 | Unix System V |
D_BIGNDN | Big-endian |
D_LITNDN | Little-endian |
D_ITANIUM | Itanium |
D_AXP | AXP |
D_MONO | Mono |
D_NETCORE | .NET Core |
D_NETSTANDARD | .NET Standard |
DBLNET | Synergy .NET |
_DEBUG | For internal use only |
STOP statement exit values
Define |
Description |
---|---|
D_EXIT_SUCCESS | Operation succeeded |
D_EXIT_FAILURE | Operation failed |
SETKRF | Set key of reference for next operation (used with the DBL$SETKRF routine) |
SNDOPR | Send message to system operator (used with the DBL$SNDOPR routine) |
Version defines
Define |
Description |
---|---|
DBL_DEF | DBLDIR:dbl.def has been included |
DBLV5 | Synergy DBL version 5 features available |
DBLV57 | Synergy DBL version 5.7 features available |
DBLV6 | Synergy DBL version 6 features available |
DBLV63 | Synergy DBL version 6.3 features available |
DBLV7 | Synergy DBL version 7 features available |
DBLV73 | Synergy DBL version 7.3 features available |
DBLV75 | Synergy DBL version 7.5 features available |
DBLV8 | Synergy DBL version 8.1 features available |
DBLV83 | Synergy DBL version 8.3 features available |
DBLV9 | Synergy DBL version 9.1 features available |
DBLV915 | Synergy DBL version 9.1.5 features available |
DBLV93 | Synergy DBL version 9.3 features available |
DBLV95 | Synergy DBL version 9.5 features available |
DBLV103 | Synergy DBL version 10.3 features available |
DBLV1033 | Synergy DBL version 10.3.3 features available |
DBLV11 | Synergy DBL version 11 features available |
DBLV12 | Synergy DBL version 12 features available |
DBLV123 | Synergy DBL version 12.3 features available |
SYN_VER | Current version |
SYN_VERSION | Current version |
SYN_BUILDNUMBER | Current build number |
RUNTIME_TARGET | Runtime compatibility setting for a program (either passed with -qrntcompat or the default runtime target). Enables you to programmatically exclude runtime features that aren’t available in the version you target |
Data type defines
Define |
Description |
---|---|
D_TYPE_A | Alpha |
D_TYPE_D | Decimal |
D_TYPE_ID | Implied-decimal |
D_TYPE_I | Integer |
D_TYPE_OBJ | Object handle (integer + handle) |
D_TYPE_P | Packed |
D_TYPE_IP | Implied-packed (packed + implied) |
D_HANDLE | Size of ^M handle |
D_NATLNG | Size of native long in C |
D_NATINT | Size of native int in C |
D_MAXINT | Maximum supported int size |
D_RFA_TYPE | Type and size of RFA |
D_GRFA_TYPE | Type and size of GRFA |
I/O qualifier defines
Qualifier |
Define |
Description |
---|---|---|
DIRECTION | Q_IGNDIR | Ignore direction qualifier |
Q_FORWARD | Forward direction | |
Q_REVERSE | Reverse direction | |
KEYNUM | Q_PRIMARY | Primary key of reference |
Q_ALT1 | First alternate key of reference | |
Q_ALT2 | Second alternate key of reference | |
Q_ALT3 | Third alternate key of reference | |
Q_ALT4 | Fourth alternate key of reference | |
Q_ALT5 | Fifth alternate key of reference | |
Q_ALT6 | Sixth alternate key of reference | |
Q_ALT7 | Seventh alternate key of reference | |
LOCK | Q_NO_LOCK | No locking performed |
Q_AUTO_LOCK | Automatic locking performed | |
Q_MANUAL_LOCK | Manual locking performed | |
Q_NO_TLOCK | No locking - no tree probe on READS | |
MATCH | Q_GEQ | Match greater than or equal to |
Q_EQ | Match equal to | |
Q_GTR | Match greater than | |
Q_RFA | Match on RFA | |
Q_GEN | Match greater than or equal to with no error | |
Q_SEQ | Match sequential | |
POSITION | Q_IGNPOS | Ignore position |
Q_FIRST | Position at first record | |
Q_LAST | Position at last record | |
Q_EOF | Position at end of file | |
Q_BOF | Position at beginning of file | |
SHARE | Q_EXCL_RW | No sharing, Lock against read and write |
Q_EXCL_RO | Read only, Lock against writing file | |
Q_NO_EXCL | Share file with other users | |
WAIT | Q_WAIT | Wait |
Q_NOWAIT | No wait |
S_PARSE routine qualifiers
Define |
Description |
---|---|
I_ANUM | Alphanumeric token |
I_IDENT | Identifier token (Alphanumeric and “$” | “_”) |
I_DIGIT | One or more decimal digits |
I_FIXED | Digits + “.” + digits |
I_SPACE | Spaces and/or tabs |
I_SQUOTE | String in single quotation marks |
I_DQUOTE | String in double quotation marks |
I_SPECIAL | Any single character not one of the above types |
MEM_PROC functions
Define |
Description |
---|---|
DM_ALLOC | Allocate memory |
DM_REG | Register existing memory |
DM_WNDUSR | Register a window’s user data set |
DM_RESIZ | Resize an existing DM_ALLOC entry |
DM_RALLOC | Reallocate a memory handle |
DM_FREE | Release a memory handle |
DM_GETSIZE | Get size of memory allocated to handle |
DM_TRIMSIZE | Get blank-trimmed size of memory handle |
DM_STATIC | The allocated handle will be static |
DM_BLANK | Fill with blanks |
DM_NULL | Fill with nulls |
DM_ZERO | Fill with zeros |
DM_PROTECT | SYNERGEX INTERNAL USE |
COMPRESS routine control functions
Define |
Description |
---|---|
D_COMP | Compress data record + len |
D_UNCOMP | Uncompress data record + len |
DR_COMP | Compress data record (raw form) |
DR_UNCOMP | Uncompress data record (raw form) |
Select class flags (added to LOCK qualifier flags)
Class |
Define |
Description |
---|---|---|
OnLock | Q_NO_DELETE | Don’t delete record on return from event |
From | Q_NO_GRFA | Don’t generate GRFA on selected records |
Qualifiers to control XCALL SPAWN on Windows
Define |
Description |
---|---|
D_NOACTIVATE | Launched program won’t get focus |
D_MINIMIZED | Launched program is run minimized |
D_NOWAIT | Don’t wait for launched program |
D_NOCONSOLE | Don’t show DOS console window |
D_INHERIT | Allow subprocess to inherit handles such as standard input and output |
D_GAINFOCUS | Application gains focus on return from SPAWN/SHELL |
D_NOWINDOW | Create no console window |
D_DETACHED | Force detached process |
DLL_CALL qualifiers
Define |
Description |
---|---|
DLL_TYPE_C | Use C calling convention |
DLL_TYPE_FASTCALL | Use __fastcall calling convention |
DLL_TYPE_STDCALL | Use __stdcall calling convention |
DLL_TYPE_WINAPI | Use WINAPI calling convention |
DLL_TYPE_DBLCALL | Use C calling convention and DBL descriptors |
Event log defines
Define |
Description |
---|---|
D_EVENTLOG_SUCCESS | A successful operation |
D_EVENTLOG_ERROR_TYPE | A significant problem the user should know about (for example, loss of functionality or data) |
D_EVENTLOG_WARNING_TYPE | A problem that is not immediately significant but that may cause future complications (for example, resource consumption) |
D_EVENTLOG_INFORMATION_TYPE | An infrequent but significant successful operation (for example, successful loading of a major server service) |
D_EVENTLOG_AUDIT_SUCCESS | A security event that occurs when an audited access attempt is successful (for example, a successful log-on attempt) |
D_EVENTLOG_AUDIT_FAILURE | A security event that occurs when an audited access attempt fails (for example, a failed attempt to open a file) |
Class priority defines
Define |
Description |
---|---|
D_ABOVE_NORMAL_PRIORITY_CLASS | Process that has priority above normal-priority but below high-priority class processes |
D_BELOW_NORMAL_PRIORITY_CLASS | Process that has priority above idle-priority but below normal-priority class processes |
D_HIGH_PRIORITY_CLASS | Process that performs time-critical tasks that must be executed immediately |
D_IDLE_PRIORITY_CLASS | Process whose threads run only when the system is idle |
D_NORMAL_PRIORITY_CLASS | Process with no special scheduling needs |
D_BACKGROUND_BEGIN | Begin background processing mode |
D_BACKGROUND_END | End background processing mode |
Data field encryption type defines
Define |
Description |
---|---|
DC_3DES | Triple DES CBC three-key mode (deprecated) |
DC_AES128 | AES 128-bit CBC mode (deprecated) |
DC_AES192 | AES 192-bit CBC mode (deprecated) |
DC_AES256 | AES 256-bit CBC mode |