Functions are driver-defined procedures which perform a certain action which ColdC is incapable of (such as opening a network connection), or which the driver can handle more efficiently. A function is called using the function call expression, which has the following syntax:
function(arg1, arg2, ...)
In this example function is an identifier naming the function, and arg1, arg2 are expressions. There are no limits to the amount of arguments a function can accept. However, even if there are no arguments the parentheses must be present. Arguments are evaluated from left to right.
As an example, the pad() function pads a string argument with spaces to a certain length. When evaluated with the string "foo" and a length of six characters:
=> "foo "
There are driver functions available for a variety of tasks. A comprehensive explanation of the available functions is available in the section Function Reference.
Data | Operators | Variable Expression | Function Call Expression | Method Call Expression | Error Handling Expression | Looping Expressions