Base Types

Top  Previous  Next

Smart Pascal supports most of the data types from Delphi. Some base types are missing because there is not direct JavaScript support for them and some complex type were added.

 

tipbulbBase Types

Smart Pascal implements following base types:

 

In traditional Smart Pascal all classes inherit from a root type called TObject


This object reference:


this (JS reference):



this (SMART reference):



 

Type Mappings

 

Unit System.Types defines following type mappings for better compatibility with existing Pascal codebase.

 

  TDateTime   = Float;

  Real        = Float;

  Double      = Float;

  Extended    = Float;

  TColor      = Integer;

  THandle     = Variant;   

  char        = string;

  byte        = integer;

  word        = integer;

  cardinal    = integer;

  Int64       = integer;

  currency    = float;

  TPersistent = TObject;

  TObjectList = array of TObject;

  TStringList = array of string;

  TVariantDynArray = array of variant;

  TIntegerDynArray = array of integer;