Sage
Tusk
Welcome to Sage
Volume (5%) Hide Volume
Topics
Progress
This article summarizes what works and what doesn't yet work in Tusk.

Statements

Tusk supports the following statements…
  • type declarations.
  • const declarations (with type inference).
  • var declarations (with type inference).
  • Assignment statements.
  • Function and procedure calls.
  • {$Include ...} statements.
  • if statements.
  • case statements (including a strict option).
  • while loops.
  • repeat loops.
  • for := loops (with optional inline variable).
  • for in loops (with optional inline variable).
  • raise statements.
  • try/finally and try/except statements.

Tusk does not yet support…
  • Ranges in case labels.
  • with statements.

Operators

Tuks supports these operators…
  • Binary: +, -, *, /, div, mod.
  • Binary: and, or, and not.
  • Binary: =, <>, <, >, <=, >=.
  • Unary: +, -, not.
  • The ? : ternary opertor.
  • is and as.
  • in.
  • ^ (for exponentiation and pointer dereferencing).
  • @ (for address-of).
  • @@ (to suppress implicit function calls).

Tusk does not yet support…
  • The xor operator.
  • Bitwise operators.

Types

Tusk supports these data types…
  • Integers: Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Integer, Cardinal, NativeInt, NativeUInt, ShortInt, Byte, SmallInt, Word.
  • Floats: Single, Double, Currency, Decimal.
  • Boolean.
  • string, AnsiString, and UnicodeString.
  • Char, AnsiChar, and WideChar.
  • PChar and PAnsiChar.
  • Variant and object.
  • Dynamic arrays.
  • Enums (including scoped enums).
  • Sets (of enum, Byte, Int8, and AnsiChar).
  • Pointers.
  • Interfaces…
    • Methods
    • Properties
    • Array properties
    • Default array properties
    • GetEnumerator method (supporting forin loops)
    • Generic interfaces
  • Anonymous methods.

Tusk does not yet support…
  • Rational, BigRational, BitInt, BigCardinal.
  • Int96, UInt96.
  • Complex.
  • TDuration, TMoment.
  • TDSCharSet.
  • WideString (use string instead).
  • Other custom variants.
  • Fluent SQL.
  • Records.
  • Static arrays.
  • Generic types (other than dynamic arrays and interfaces).

Functions

Tusk's support for functions is ongoing. It currently supports…
  • Default parameters.
  • const, var, and out.
  • Exit and Result.
  • Global procedures / functions.
  • Overloaded global procedures / functions.
  • Overloaded interface methods.
  • Interface methods (including generics).
  • Anonymous procedures and functions.
  • Forward declared functions (for mutually recursive functions).
  • Static scoping (not dynamic).
  • Implicit procedure / function calls (no need for empty parentheses).

Tusk doesn't yet support…
  • Overloaded functions written in Tusk.
  • Generic functions written in Tusk.

Runtime Library

Tusk exposes a fair amount of Delphi's Runtime Library, as well as some of our own utility libraries.

For more details, please see the Reference section.

Last Modified: 5/31 9:11:16 am
In this article (top)  View article's Sage markup
5/31 9:11:16 am