Skip to content

Function Calls

Ian Senne edited this page Feb 19, 2024 · 1 revision

MCB Supports a few non standards call systems for functions, function calls can be made using a relative path, a hiarchical reference and an absolute function reference as well as normally with a literal function reference.

The hiarchical function reference starts with a ^ and takes a number of steps up from the current function in which its used.

function ^<integer> [data]

The root function reference starts with a * and will make a reference from current namespace with the given path.

function *<path> [data]

The relative function reference starts with either a . or .. and can be used to call a function relative to the call location.

function .<path> [data]

The final way of calling a function is as normal using using an absolute function call.

function <full_function_reference> [data]

ex.

function test{
    block{
        # call this function
        function ^0
        # call the parent function
        function ^1
        function ./dummy
        function ./folder/dummy2
    }
}
function dummy{

}
dir folder{
    function dummy2{
        function ../dummy
        function *dummy
    }
}

Clone this wiki locally