Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does the MOO pass arguments to builtin functions?

builtin functions MOO pass
0
Posted

How does the MOO pass arguments to builtin functions?

0

The argument list is represented in the same way as all MOO values; in this case, it is a MOO list containing all of the arguments passed to the built-in function by the MOO programmer. First, I’ll describe MOO value representation in general; after that I’ll get back to built-in function argument lists in particular. MOO values are represented by C structures of type `Var’. There are two members of such a structure, the `type’ and the value, `v’. The `type’ member is one of TYPE_NUM, TYPE_OBJ, TYPE_ERR, TYPE_STR, or TYPE_LIST. This type corresponds exactly to the MOO programmer’s idea of the standard five MOO data types. The particular `type’ value used in each instance determines the form of the `v’ or value member of the structure; `v’ is a union of a number of different representations, one for each type. If x.type == TYPE_NUM, then x represents a MOO number, the value of which is found in x.v.num (a C integer). The TYPE_OBJ and TYPE_ERR cases are handled similarly, representing MO

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123