registerFunction

Registers a valid function that doesn't already exist.

@safe
bool
registerFunction
(
in dstring name
,
in dstring func
,
in dstring def
)

Parameters

name dstring

The function name.

func dstring

The function parameters and return type.

def dstring

The definition of the function.

Return Value

Type: bool

Whether the function was registered.

Examples

dstring func = "(Number)(Number)"d;
dstring def = "x1"d;
dstring name = "f"d;
assert(registerFunction(name, func, def));
assert(!registerFunction(name, func, def)); //No registering an already-existing function.

Meta