[fpc-devel] Overloading standard functions

Marco van de Voort fpc at pascalprogramming.org
Wed Jun 19 14:34:35 CEST 2019

Op 2019-06-19 om 14:30 schreef Виктор Матузенко:
> Thanks for the answer!
> ср, 19 июн. 2019 г. в 15:07, Marco van de Voort 
> <fpc at pascalprogramming.org <mailto:fpc at pascalprogramming.org>>:
>     - Copy and length are builtins, pos is a function.
>     builtin+function is
>     not "true" overloading since both are not the same kind.
> Is the term "builtin" documented somewhere? Where can I find list of
> all builtin identifiers to check if my libraries conflict with them?

If the documentation lists the function as being in "system.fpd" that is 
probably it. You can look at that file (rtl/inc in the sources) to get 
an idea.

> Can I overload the Pos and not be afraid of that in future versions of fpc
> it may suddenly become "builtin" and break some code?

First, where would be the breakage? Now it works with and without overload?

Second, while the chances are low, there are no guarantees. Avoid overly 
complex layering of the same symbol if you are afraid of this.

More information about the fpc-devel mailing list