[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 6.19 Built-in Procedures and Functions

- ``GetMem'` and ``FreeMem'` are supported like in BP. ``GetMem'` can also act as a function in GNU Pascal:

      program GetMemFunctionDemo;
      var p: Pointer;
      begin
        p := GetMem (1024)
      end.

  The second parameter to ``FreeMem'` is ignored by GNU Pascal and may be omitted. Memory blocks are always freed with the same size they were allocated with.

  Remark: Extended Pascal Schema types provide a cleaner approach to most of the applications of ``GetMem'` and ``FreeMem'`.

- ``Min'` and ``Max'`: GNU Pascal has built-in ``Min'` and ``Max'` functions (two arguments) which work for all ordinal types (``Integer'`, ``Char'`, ...) plus ``Real'`.

- ``UpCase'`, ``High'`, ``Low'` and similar functions are built-in. In contrast to Borland Pascal, GNU Pascal's ``UpCase'` function is aware of non-ASCII characters of certain languages (e.g., accented letters and "umlauts"), but for compatibility this feature is disables in ``--borland-pascal'` mode. There is also a ``LoCase'` function.

- ``Lo'`, ``Hi'`, ``Swap'` functions: not built-in, but available in the ``System'` unit.

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html