Previous Page
Fake function.

A "fake function", is an alias to an existing C++ function.

A "fake function", is the way to get C++ and Contachit to be compatible.  Contachit syntax is very strict, and is NOT naturally compatible with C++.  However, you can get around this, by adding the function option of fake (as highlighted below), then instead of the function body, you fill in the appropriate info which Contachit needs to know about, so it can create the correct C++ translation.

The code example below, allows you to use the existing C++ function std::abs() in Contachit code.  Everything about the syntax (other than the function body) is just like a regular Contachit function.  In the C++ translation, if you were to make use of this "fake function", it would appear as if you had coded it in regular C++, and is NOT some sort of performance killing wrapper.

[code screenshot]