Index

1 Overview

Basics:
All routines in the subroutine library, and any Pascal code that calls them, must include the EDEFINES.INC file. This defines several useful conditional compilation symbols that are used to provide for compilation under various compiler and system platforms. These symbols are described below along with the other conditional compilation symbols used by the subroutine library.

The conditional symbols fit into the following categories:
Platform: Information about software/hardware platform, including Operating system and compiler.
Capabilities: Information about which features are available. C&C: Options and debugging.
Note: Use of platform symbols should be avoided outside of EDEFINES.INC. Instead, use the capabilities symbols.

Conditional Symbols:

Symbol Category Description

Compiler:
TP Platform Turbo Pascal
TP4 Platform Turbo Pascal 4.0
TP4UP Platform Turbo Pascal 4.0 or later
TP5 Platform Turbo Pascal 5.0
TP5UP Platform Turbo Pascal 5.0 or later
TP55 Platform Turbo Pascal 5.5
TP55UP Platform Turbo Pascal 5.5 or later
TP6 Platform Turbo Pascal 6.0
TP6UP Platform Turbo Pascal 6.0 or later
TPW Platform Turbo Pascal for Windows
TPW10 Platform Turbo Pascal for Windows 1.0
TPW10UP Platform Turbo Pascal for Windows 1.0 or later
TPW15 Platform Turbo Pascal for Windows 1.5
TPW15UP Platform Turbo Pascal for Windows 1.5 or later
BP7 Platform Borland Pascal 7.0
DELPHI1 Platform Delphi 1.0
DELPHI2 Platform Delphi 2.0
DELPHI3 Platform Delphi 3.0
DELPHI4 Platform Delphi 4.0
DELPHI5 Platform Delphi 5.0
DELPHI6 Platform Delphi 6.0
DELPHI7 Platform Delphi 7.0
DELPHI2005 Platform Delphi 2005
DELPHI2006 Platform Delphi 2006
DELPHI2007 Platform Delphi 2007
DELPHI2009 Platform Delphi 2009
DELPHI2010 Platform Delphi 2010
KYLIX1 Platform Kylix 1.0
CBUILDER1 Platform C++ Builder 1.0
CBUILDER3 Platform C++ Builder 3.0
CBUILDER4 Platform C++ Builder 4.0
CBUILDER5 Platform C++ Builder 5.0

Minimum compiler versions:
DELPHI1UP Platform Delphi 1.0 and above (any Delphi)
DELPHI2UP Platform Delphi 2.0 and above
DELPHI3UP Platform Delphi 3.0 and above
DELPHI4UP Platform Delphi 4.0 and above
DELPHI5UP Platform Delphi 5.0 and above
DELPHI6UP Platform Delphi 6.0 and above
DELPHI7UP Platform Delphi 7and above
DELPHI2005UP Platform Delphi 2005 and above
DELPHI2006UP Platform Delphi 2006 and above
DELPHI2007UP Platform Delphi 2007 and above
DELPHI2009UP Platform Delphi 2009 and above
DELPHI2010UP Platform Delphi 2010 and above
DELPHIXE Platform Delphi XE
DELPHIXEUP Platform Delphi XE or later
DELPHIXE2 Platform Delphi XE2
DELPHIXE2UP Platform Delphi XE2 or later
DELPHIXE3 Platform Delphi XE3
DELPHIXE3UP Platform Delphi XE3 or later
DELPHIXE4 Platform Delphi XE4
DELPHIXE4UP Platform Delphi XE4 or later
DELPHIXE5 Platform Delphi XE5
DELPHIXE5UP Platform Delphi XE5 or later
DELPHIXE6 Platform Delphi XE6
DELPHIXE6UP Platform Delphi XE6 or later
KYLIX1UP Platform Kylix 1.0 and above (any Kylix)
CBUILDER1UP Platform C++Builder 1.0 and above or Delphi 2 and above (any C++Builder)
CBUILDER3UP Platform C++Builder 3.0 and above or Delphi 2 and above (any C++Builder)
CBUILDER4UP Platform C++Builder 4.0 and above or Delphi 2 and above (any C++Builder)
CBUILDER5UP Platform C++Builder 5.0 and above or Delphi 2 and above (any C++Builder)

Compiler types:
BP Platform Borland Pascal (not Delphi or C++Builder)
DELPHI Platform Any Delphi version (but not C++Builder or Kylix)
KYLIX Platform Any Kylix version
NET Platform .Net
CBUILDER Platform Any C++Builder (Pascal)
CBUILDER Platform Any C++Builder (Pascal)
FPC_OR_DELPHI Platform Either FPC or DELPHI.
DELPHI_16BIT Platform 16-bit Delphi.
DELPHI_32BIT Platform 32-bit Delphi.
CBUILDER_32BIT Platform 32bit C++Builder's Pascal (but not Delphi).
DOS Platform Any MSDOS (plain and DPMI)
REALMODE Platform 16-bit realmode DOS.
PROTECTEDMODE Platform 16-bit DPMI DOS.
MSWINDOWS Platform Any Windows platform.
WIN16 Platform 16-bit Windows.
WIN32 Platform 32-bit Windows.
LINUX32 Platform 32-bit Linux.
LINUX64 Platform 64-bit Linux.
_16BIT Platform 16-bit application.
_32BIT Platform 32-bit application.
_64BIT Platform 64-bit application.
WINDOWS_OR_CONSOLE Platform Either Windows GUI or Console mode.

Capabilities:
ASM_CPUIDCapabilitiescpuid instruction supported by internal assembler.
CARDINALCapabilitiesCardinal data type (usigned 32-bit integer) supported.
DELEGATIONCapabilitiesDelegation is supported.
DIRECT_RAM_ACCESSCapabilitiesDirect access to RAM, via Mem[], is supported.
DYNAMIC_ARRAYSCapabilitiesDynamic arrays are supported.
DYNAMIC_OBJECTSCapabilitiesDynamic (heap) objects supported.
DYNAMIC_STRING_INITIALIZATIONCapabilitiesDynamic strings in static objects are initialized and finalized automatically. If not set, dynamic strings should be initialized in static class constructors and finalized in static class destructors.
DYNAMIC_STRINGSCapabilitiesDynamic strings are supported.
EXCEPTIONSCapabilitiesExceptions are supported.
FUNCTION_RESULT_REQUIREDCapabilitiesFunctions must have a target for what they return.
INLINE_FUNCTIONSCapabilitiesInline functions are supported.
INT64CapabilitiesTrue 64-bit integers (non-COMP int64) supported.
OLEVARIANTCapabilitiesOLE variants are supported.
OVERLOADCapabilitiesOverloaded functions are supported.
PROPERTIESCapabilitiesProperties supported. See also STATIC_PROPERTIES.
REAL48CapabilitiesReal48 data type is supported.
RECORD_RETURNSCapabilitiesFunctions can return record structures. Otherwise only simple data types can be returned.
REINTRODUCECapabilitiesreintroduce is supported on methods.
STATIC_PROPERTIESCapabilitiesProperties are supported in static objects.
STDCALL_SUPPORTEDCapabilitiesstdcall calling convention (and keyword) is supported.
UNIT_INIT_AND_FINALCapabilitiesUnit initialization/finalization supported.
VARIABLE_DECLARATION_ASSIGNCapabilitiesAssigning a variable a value in its declaration supported.
WIDESTRINGSCapabilitiesWidestring data type is supported.
CL_CONTROL_HELPCONTEXTCapabilitiesTControl.HelpContext, .HelpKeyword, and .HelpType supported.
CL_LIST_CAPACITYCapabilitiesTrue if TList has .Capacity property.

C&C:
CC_Regression_Test C&C Surrounds regression test code. If defined, the application will run regression tests when it starts.
CC_Balance C&C Used to validate proper pairing of matched operations (such as allocations and deallocations).
CC_Debug C&C Surrounds debugging code. If defined, debugging code will be included in the compile. This can slow the application down due to the extra work involved with logging data, etc. It may also enable certain options, especially on UI elements.
CC_Auto_Free_Application_Manager C&C If defined, the application manager is automatically destroyed as the application exits.
CC_Auto_Free_Operating_System C&C If defined, the Operating System interface is automatically destroyed as the application exits.
CC_Track_Resources C&C If defined, resources are tracked.
CC_Validate C&C If defined, data is validated. For instance, calls to methods of nil objects is checked for.

Layers:
The Subroutine Library is organized into layers. Each layer represents a group of related functionality. Dependancy rules require that routines only reference routines that are in the same, or a lower, layer. The lowest layer is layer 0, which has no dependencies (except upon inherent Pascal features).

Layer 0 - Object model layer
This layer includes the base class definitions from which all classes of the Subroutine Library derive. It also includes some basic type and constant definitions, localization support, and collection classes, which are used by various units in this layer.
_Octal: Constants for octal values
_RGB: RGB definitions
_TSRs: DOS internals structure definitions
_Types: Simple type definitions
TypeDefs: Basic type definitions
_ASCII: ASCII definitions

ASCIIDef: ASCII support functions
Collect: Collection classes
L10n: Text localization support

_Common: Base class definitions
_DebugIn: Base debugging interface
_GenVal: Generic value (variant) class definition
_NameVal: Named values classes
_ObjectF: Subroutine object factory
_Propert: Dynamic property support
_Streams: Base stream interface
_TestInt: Abstract test interface
_UE: Unified exception

_COMInter: Abstract base COM classes
COMInter: Base COM classes
_COMLists: Abstract COM list class
COMLists: Defines a COM list class
CommBase: Common non-COM base classes that all other subroutine classes derive from.
Streams: Base stream classes to assist in creating stream descendants.
_TE_Interface: Abstract text editor class definition.

Layer 1 - Utility layer
This layer contains various utility classes and functions, such as logging mechanisms, data cache support, and numeric conversions.
_AEL: Application Event Logger class definition
ArrayInt: Interfaces to arrays
Behavior: Base Behavior class definitions
BehavMan: Behavior manager class
Button_2D: 2D GUI speed button class
_Cache: Cache handling class definitions
Cache: Cache control classes
_CacheMa: Cache manager class definition
CacheMan: Including this unit creates the cache manager on program startup
_Colors: Defines numerous RGB color constants
Commands: Command object classes
CommonUt: Common utility routines
Compress: Compression/decompression routines
CVT: Numeric conversion routines
DebugInt: Base classes from which to descend debug interfaces and support routines
DebugMa: Standard Debug Manager instance
Disk: Absolute disk read/write routines (MSDOS)
EBCDICs: EBCDIC support routines
English: English language support routines
Format: Various text formatting routines
Heaps: Memory heap class
Instrs: Instr and Rinstr functions
MStores: Managed store classes
NameVals: Standard named values implementation
Num1s: Number to string conversion routines
Operatio: Multi-part operation logger
_Deferred: Deferred execution class definition
_Events: Event class definitions
_FacMan: Facility manager class definition
_Fonts: Abstract font characteristic class definition
_Buffers: Generic buffer class definition
_Languag: Language support
_Lib: Abstract librarian class definitions
_Loggers: Defines a logging class
_ObjectM: Defines the object manager class
_Stores: Defines store classes
Radix50s: Radix-50 conversion and support routines
Randoms: Random number generator
RGB: RGB to angstrom conversion
RPG_Character: Abstract classes related to Role-Playing Games
Soundx: Provides the Soundex function
SpellChk: Spell checker
SStreams: String stream classes
Symbols: Symbol table classes
_TPM: Text Presentation Manager class definitions
UE: Standard Unified Exception classes
_Validate: Validator class definition

_Applic: Application class definition
Compatib: Provides consistent types and functions across different Pascal platforms
Decorations: Class for non-Windows-handle objects that can draw themselves on other controls
Deferred: Standard deferred manager
_DevMan: O/S Device Manager class definitions.
DPropert: Dynamic Properties class
ExtentSt: Extent store class
_Chars: Abstract character class definition
_Files: File class definitions.
_FiP: File system interface
FStreams: Stream class for PFiles.
_OS: Operating system interface
TSRS: MSDOS Terminate and Stay Resident function
Devman: COM wrappers for static Device Manager instances
_FileSys: File system class definition
FSError: File system error codes
Language: Language-related numeric conversion routines
Maths: Arithmetic routines
Stores: Base classes from which to descend stores.
Weather: Wind-chill factor routine
XLate: Wildcard support functions

RAMDisk: An in-memory buffer accessed as a 64-bit store
VCL_Std: Various routines supporting VCL/LCL controls

Layer 2 - Application framework layer
This layer contains classes that support the Subroutine Library Application Framework. This framework provides a consistent, advanced framework for all types of applications. It includes such things as unit/application testing, debugging support, and event logging.
_APM: Application Performance monitoring
_CompInt: Abstract compiler interface class definition
_DebugMa: Debug manager class definition
_TestMa: Test manager class definition
Test: Routines to aid in testing

AEL: Default Application Event Logger class
APM: Default Application Performance Monitor class
TestMan: Test manager implementation
_UOS_File_System: Abstract UOS file system class definition

Layer 3 - Platform abstraction layer
This layer contains classes that provide an abstraction to the underlying hardware/software platform, including interfaces to the Operating System and File System.
OS_DOS: TOperating_System descendant for the MSDOS operating system. Accessed via O_S unit.
OS_Windows: TOperating_System descendant for the MS Windows operating system. Accessed via O_S unit.
OSWinDeb: Debugger for Windows operating system class

Allocatr: Allocation table classes
Allocatr64: 64-bit Allocation table classes
Allocation_Cluster_Manager: Allocation Cluster Manager
Applic: Standard Application Manager instance
Database: Database class definitions
Dates: Date and time functions
Filestd: File access functions and classes
FileSys: File System server class
FiP: File Processor class. Allows for abstraction of files and file systems.
FSFH: File System and File Heap classes
GetChars: Keyboard input classes
GIO: General I/O functions, such as Log_Error
Intlist64: 64-bit integer list
MSWin: Support for Microsoft Windows programming
O_S: Operating system class instance
Parse: Parsing functions
SMUBIOS: I/O drivers for SMU.
Standard: Misl. common-use functions and classes
UStrings: String utility routines
Wildcard: Filename wildcard routines
WinAPI: Wrapper for Windows
WinEvents: Windows event classes

Layer 4 - Application layer
This layer contains various classes and routines that are built upon the previous layers.
B_Dialog_Button_Nav: Button navigate behavior
B_Dialog_Default_Key: Button default behavior
B_Horizontal_Spacing: Horizontal spacing behavior
BigFH: 64-bit address file heap
CRCs: Checksum functions
Express: Expression analyzer.
ExtStore: Extendable Store class
GenVal: Simple Generic Value class
HTML: HTML and XML parsing classes
LoadArra: Loads arrays from tables in files
MemStore: In-memory contiguous store class
Menu_2D: 2D menu class
Menu_Popup_Form: Form for popup menus used in Menu_2D
Misc: Various routines, such as Sleep and Mid.
ObjectFa: Including this in uses constructs a default object factory object
Outlines: Outline class
Performa: Performance monitoring support
SMU: Screen Management Utility
StorHeap: Store heap class (a managed store on a store)
_StoreLis: List-in-a-store class definitions
StoreLis: 64-bit store list class
Structur: Various data structure classes
Tables: Random table class
TDialogs: Base dialog class
UEditor: Text editor class
VCLDebug: Debugger support for VCL/LCL controls

Layer 5 - GUI layer
This layer includes graphical UI components.
ArrayDis: Displays array contents on a Windows control
Array_Display_Main: And array display form with optionsc
TPanels: Transparent panel control
Editor_Panel: Windows control for a text Editor.
EditPref: Preferences dialog for editor.
EditWin: Embeddeable Text editor
Linenumb: Line number dialog
Output_Panel: Scrolling text output panel
SaveEdit: Save changes dialog
ScrollPanel: Automatically scrolling panel
SMU_Pane: Window that wraps an SMU window.
SReplace: Save/replace dialog
SSearch: Search dialog