Skip to content
Snippets Groups Projects
Commit 39fe8561 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add a short description of builtin functions

We mainly describe their differences with user-defined onces
parent bcde5441
No related branches found
No related tags found
1 merge request!145git subrepo clone git@gitlab.com:OlMon/org-themes.git packages/org-themes
......@@ -2300,9 +2300,24 @@ there would be no way to end the recursion. Thus, the code
produces the following compilation time error
#+results: no-recursion
*** TODO Builtin functions<<builtin-functions>>
** TODO modules
*** Builtin functions<<builtin-functions>>
In ~pugs~ language, builtin functions are ~C++~ pieces of code that can be
called in scripts. There usage is very similar to user-defined
functions. They differ from user-defined functions in three points.
- Builtin functions can have no parameter or no returned value.
- Builtin functions are polymorphic. More precisely, this means that
the signature of a builtin function is also defined by its expected
arguments types.
- Builtin functions can take user-defined functions as parameters.
- user-defined functions cannot take functions as parameters
- builtin functions cannot take builtin functions as parameters
(actually, this is not a limitation since it is trivial to embed a
builtin function into a user-defined one).
Builtin functions are defined when modules are imported, see [[modules]].
** TODO modules<<modules>>
[fn:pugs-def] ~pugs~: Parallel Unstructured Grid Solvers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment