Delphi language features
Here is incomplete Delphi/Object Pascal feature tree. Some features are dependent on others so some have precedence during compiler development.
Name | Description | Level |
---|---|---|
Statements | 0 | |
Variables | var keyword, global | 0 |
Variables - Local | Inside function and procedures | |
Constants | const keyword, global | 0 |
Name spaces | Not directly supported | Future |
Memory access | Direct access to memory (pointers, directive absolute) | |
Compiler directives | ||
Compiler directives - Conditionals | $IFDEF, $ENDIF, $DEFINE, ...) | |
Compiler directives - Region | code hiding using $REGION | |
Compiler directives - Options | ($M+/-, ...) | |
Operators | and, or, xor, not, +, -, /, *, div, mod | 0 |
Operators - Shifting | shl, shr | |
Operators - Type | as, in | |
Expressions | operator priority, infix notation | 0 |
Expressions - Parentheses | 1 | |
Assignment | := symbol | 0 |
Integrated assembler | asm-end | |
Comments | One line // or Block level {}, (* *) | |
Functions | Functions and procedures | 0 |
Functions - Overloading | Function overloading, overload keyword | |
Functions - Nested | Local functions inside function | |
Functions - Parameters | ||
Functions - Parameters - Reference | var keyword for references | |
Functions - Parameters - Default value | parameters with default value | |
Functions - Inlined | Inlining code using inline keyword | |
Types | type keyword | 0 |
Types - Enumeration | (Boolean, ...) | |
Types - Subrange | (0..100, ...) | |
Types - Ordinals | SmallInt, Byte, Integer, Word, Cardinal, Int64, ... | 0 |
Types - Floating numbers | Real, Single, Double, Extended, ... | |
Types - Characters | Char, WideChar, AnsiChar, ... | |
Types - Strings | String, ShortString, AnsiString, WideString, PChar, ... | |
Types - Pointers | Pointer, @, ^ | |
Types - Variant | ||
Types - Procedural types | ||
Types - Composed | ||
Types - Array | static/dynamic | |
Types - Record | ||
Types - Record - Variant | Překrývání proměnných (variant records): case Integer of... | |
Types - Record - Packed | ||
Types - Record - Operator redefinition | ||
Types - Record - Advanced | with constants,types,variables,procedure/functions | |
Types - Set | set of, in operator, [] as set initializer | |
Types - Class | class keyword | |
Types - Class - Visibility | published, public, private, protected | |
Types - Class - Methods | Methods (procedure, function) | |
Types - Class - Virtual methods | (virtual, override) | |
Types - Class - Inlining | inline | |
Types - Class - Inheritance | inherited | |
Types - Class - Properties | (property, read, write, default, indexed) | |
Types - Class - Nested definitions | ||
Types - Class - Constructors and destructors | constructor, destructor | |
Types - Interface | interface keyword | |
Globals | (variables, constants, types, functions) | |
Units | Modularity using unit keyword, interface and implementation sections | |
Units - Types | program, unit, package, library | |
Units - Initialization/Finalization | (initialization, finalization) | |
Controls structures | ||
Condition | (if-then-else) | |
Loop with known cycle count | for-to-do | |
Repeat loop | repeat-until | |
While loop | while-do | |
Loop exit | break | |
Loops - Continue | Jump to next iteration (continue) | |
Compound statement | begin-end | |
Multiple branching | case-of | |
Context change | with-do | |
Exceptions | raise (raise) | |
Exceptions - handling | try-except | |
Exceptions - Finalization | try-finally | |
Loop with enumerators | for-in-do | |
Generics | Parametric types | |
Generics - Constraints | Limit generics parameters to class, record, ordinal, float, ... | |
Translation strings | resourcestring keyword | |
Multi-threading | ||
Multi-threading - Thread local variables | threadvar keyword | |
Interfaces | like abstract classes, multiple inheritance | |
Interfaces - Reference counting | ||
Memory manager | Automatic memory management | |
File types | file, text | Obsolete |
Direct jump | goto, label keywords | Obsolete |