This section describes some language constructions which are less fundamental than the ones described in previous articles. They could be defined in stdlib.fc but it would leave less room for the FunC optimizer.
Exceptions can be thrown by conditional primitives
throw_unless, and by unconditional
throw. The first argument is the error code; the second is the condition (
throw has only one argument). These primitives have parametrized versions
throw_arg. The first argument is the exception parameter of any type; the second is the error code; the third is the condition (
throw_arg has only two arguments).
trueis alias for
falseis alias for
A variable can be dumped to the debug log by the
A string can be dumped to the debug log by the
muldivis a multiple-then-divide operation. The intermediate result is stored in 513-bit integer, so it won't overflow if the actual result fits into a 257-bit integer.
divmodis a operation that takes two numbers as parameters and gives the quotient and remainder of their division.
null?checks whether the argument is
null. By the value
nullof a TVM type,
NullFunC represents absence of a value of some atomic type; see null values.
~touchmove a variable to the top of the stack
atgets the value of a tuple component on the specified position