The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Delphi intrinsic functions that evaluate to consts

Posted by jpluimers on 2021/02/23

A long time ago, I wondered Are these really Windows compiler unsupported Delphi Intrinsic Routines about [WayBack/Archive.is] Delphi Intrinsic Routines – RAD Studio.

Today, I limited the documented intrinsic list to the constant intrinsic functions:

const
  _Abs = System.Abs(1);
  _Chr = System.Chr(1);
  _Concat = System.Concat(1);
  _Hi = System.Hi(1);
  _High = System.High(1);
  _Length = System.Length('');
  _Lo = System.Lo(1);
  _Low = System.Low(1);
  _Odd = System.Odd(1);
  _Ord = System.Ord(1);
  _Pi = System.Pi();
  _Pred = System.Pred(1);
  _Ptr = System.Ptr(1);
  _Round = System.Round(1);
  _SizeOf = System.SizeOf(1);
  _Sqr = System.Sqr(1);
  _Succ = System.Succ(1);
  _Swap = System.Swap(1);
  _Trunc = System.Trunc(1);

The limited table is below the fold.

There is also a set of undocumented generic intrinsics that I wrote about in Source: Delphi Compiler Intrinsics can help you collapse generated code for generics a lot.

Of the those undocumented functions, these are constant intrinsic functions:

const // undocumented compiler intrinsics
  _Default = Default(Integer);
  _IsManagedType = IsManagedType(1);
  _GetTypeKind = GetTypeKind(1);
  _IsConstValue = IsConstValue(1);

–jeroen

Routine Description DCC32 DCC64 DCCOSX DCCAARM DCCIOSARM DCCIOSARM64 DCCIOS32
System.Abs Returns an absolute value. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Chr Returns the character for a specified ASCII value. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Concat Concatenates two or more strings into one. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Hi Returns the high-order byte of X as an unsigned value. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.High Returns the highest value in the range of an argument. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Length Returns the number of characters in a string or elements in an array. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Lo Returns the low order Byte of argument X. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Low Returns the lowest value in a range. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Odd Returns true if argument is an odd number. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Ord Returns the ordinal value of an ordinal-type expression. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Pi Returns 3.1415926535897932385. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Pred Returns the predecessor of the argument. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Ptr Converts a specified address to a pointer. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Round Returns the value of X rounded to the nearest whole number. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.SizeOf Returns the number of bytes occupied by a variable or type. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Sqr Returns the square of a number. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Succ Returns the successor of an argument. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png
System.Swap Exchanges high order byte with the low order byte of an integer or word. Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png Allowed.png

2 Responses to “Delphi intrinsic functions that evaluate to consts”

  1. HeartWare said

    Shouldn’t it be:

    System.Round Returns the value of X rounded to the nearest whole EVEN number.

    • LEIF UNEUS said

      @HeartWare,

      Round uses the Banker’s rounding principle that states:

      “If X is exactly halfway between two integer numbers, the result is always the even number.”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.