Delphi language features: Difference between revisions

From LibreDevelop
Jump to navigation Jump to search
(Created page with "* Statements * Variables (var) * Constants (const) * Name spaces (namespace) * Direct access to memory (pointers, directive absolute) * Compiler directives: IFDEF, ENDIF, DEFI...")
 
No edit summary
Line 1: Line 1:
Here is incomplete Delphi/Object Pascal feature tree. Some features are dependent on others so some have precedence during compiler development.

* Statements
* Statements
* Variables (var)
* Variables (var)
Line 4: Line 6:
* Name spaces (namespace)
* Name spaces (namespace)
* Direct access to memory (pointers, directive absolute)
* Direct access to memory (pointers, directive absolute)
* Compiler directives: IFDEF, ENDIF, DEFINE, ...
* Compiler directives:
** Conditionals (IFDEF, ENDIF, DEFINE, ...)
** Region, code hiding (REGION)
** Compiler options (M, ...)
* Operators (and, or, xor, not, shl, shr, +, -, /, *, div, mod, as, in, ...)
* Operators (and, or, xor, not, shl, shr, +, -, /, *, div, mod, as, in, ...)
* Expressions (parenthesis, operator priority, infix notation)
* Expressions (parenthesis, operator priority, infix notation)
Line 10: Line 15:
* Function overloading (overload)
* Function overloading (overload)
* Integrated assembler (asm-end)
* Integrated assembler (asm-end)
* Comments ( {}, //, (* *) )
* Subroutines (function, procedure)
* Subroutines (function, procedure)
** Nested functions
** Nested functions
Line 46: Line 52:
* Globals (variables, constants, types, functions)
* Globals (variables, constants, types, functions)
* Modularity (unit)
* Modularity (unit)
** Types (program, unit, package, library)
** Initialization (initialization)
** Initialization (initialization)
** Finalization (finalization)
** Finalization (finalization)
Line 64: Line 71:
** Loop with enumerators (for-in-do)
** Loop with enumerators (for-in-do)
* Parametric types (generics)
* Parametric types (generics)
** Constraints (class, record, ordinal, float, ...)
* Translation strings (resourcestring)
* Translation strings (resourcestring)
* Thread local variables (threadvar)
* Thread local variables (threadvar)

Revision as of 21:18, 8 May 2013

Here is incomplete Delphi/Object Pascal feature tree. Some features are dependent on others so some have precedence during compiler development.

  • Statements
  • Variables (var)
  • Constants (const)
  • Name spaces (namespace)
  • Direct access to memory (pointers, directive absolute)
  • Compiler directives:
    • Conditionals (IFDEF, ENDIF, DEFINE, ...)
    • Region, code hiding (REGION)
    • Compiler options (M, ...)
  • Operators (and, or, xor, not, shl, shr, +, -, /, *, div, mod, as, in, ...)
  • Expressions (parenthesis, operator priority, infix notation)
  • Assignment (:=)
  • Function overloading (overload)
  • Integrated assembler (asm-end)
  • Comments ( {}, //, (* *) )
  • Subroutines (function, procedure)
    • Nested functions
    • Functions parameters
    • Inlined code (inline)
  • Types (type)
    • Elementary
      • Enumeration (Boolean, ...)
      • Subrange (0..100, ...)
      • Ordinals (SmallInt, Byte, Integer, Word, Cardinal, Int64, ...)
      • Floating numbers (Real, Single, Double, Extended, ...)
      • Characters (Char, WideChar, AnsiChar, ...)
      • Strings (String, ShortString, AnsiString, WideString, PChar, ...)
      • Pointers (Pointer, @, ^)
      • Variant
      • Procedural types
    • Composed
      • Array, static/dynamic
      • Record
        • Překrývání proměnných (variant records): case Integer of...
        • Packed
        • Operator redefinition
        • Advanced with constants,types,variables,procedure/functions
      • Set
      • Class
        • Visibility (published, public, private, protected)
        • Methods (procedure, function)
          • Virtual methods (virtual, override)
          • Inlined (inline)
        • Inheritance (inherited)
        • Properties (property, default, indexed)
        • Events (property with function type)
        • Nested definitions
        • Constructors and destructors (constructor, destructor)
      • Interface (interface)
  • Globals (variables, constants, types, functions)
  • Modularity (unit)
    • Types (program, unit, package, library)
    • Initialization (initialization)
    • Finalization (finalization)
    • Sections (interface, implementation)
  • Controls structures
    • Condition (if-then-else)
    • Loop with known cycle count (for-to-do)
    • Loop (repeat-until)
    • Loop (while-do)
    • Loop exit (break)
    • Jump to next iteration (continue)
    • Compound statement (begin-end)
    • Multiple branching (case-of)
    • Context change (with-do)
    • Exception raise (raise)
    • Exception handling (try-except)
    • Exception finalization (try-finally)
    • Loop with enumerators (for-in-do)
  • Parametric types (generics)
    • Constraints (class, record, ordinal, float, ...)
  • Translation strings (resourcestring)
  • Thread local variables (threadvar)
  • Reference counting (interface)
  • Automatic memory management (memory manager)

Historic features

  • File types (file, text)
  • Direct jump (goto, label)