# Replace an already registered function

**URL:** https://talk.remobjects.com/t/replace-an-already-registered-function/24332
**Category:** Pascal Script
**Created:** [March 5, 2021, 8:25am UTC](https://talk.remobjects.com/t/replace-an-already-registered-function/24332 "2021-03-05T08:25:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![r\_kaiser](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/r/278dde/32.png) [@r\_kaiser](https://talk.remobjects.com/u/r_kaiser)
#### Post date: [March 5, 2021, 8:25am UTC](https://talk.remobjects.com/t/replace-an-already-registered-function/24332/1 "2021-03-05T08:25:13Z")

</div>

Is it possible to replace a function?

Background: The compiler registers some functions (e.g. “LowerCase”) that use the data type “AnyString”. This datatype causes problems when it ist assigned to a “Variant” variable.

I would like to register the standard “LowerCase” function from Delphi (i am registering ist with “AdsDelphiFuntion” but the compiler still uses the innternal added function that works with “AnyString”.

The (very) last workaround would be to modify the compiler unit and remove the function “LowerCase” from there.

Thanks in advance,  
Ralf

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [March 5, 2021, 1:18pm UTC](https://talk.remobjects.com/t/replace-an-already-registered-function/24332/2 "2021-03-05T13:18:09Z")

</div>

Hi,

`TPSPascalCompiler` holds all internal data (like `FRegProcs`) in protected section, so you can create descendant of this class and update declaration for `LowerCase` method.
