Function Calls

A function call expression passes an optional list of arguments to a MAXScript or user-defined function, and the value returned by the function is the function call expression’s result. A <function_call> has one of the following forms:

<operand> { <argument> }+ -- one or more arguments
<operand> () -- no arguments      

in which, <argument> is one of the following:

<operand><name>: <operand> -- keyword argument

EXAMPLES:

   sin a
   tan2 x y
   print (n + 1) to:debug
   fns[i] $box01 -- get function out of array fns
   move object1 [10,20,x * 3]

This syntax is unlike most programming languages that typically use parenthesized lists of comma-separated arguments. This syntax was chosen for MAXScript for the following reasons:

All 3ds Max objects including geometric objects, splines, materials, and so on are created using function calls. The name of the object creation function is the object’s class name.

FOR EXAMPLE:

   standard() -- create a standard material
   bend angle:45 -- create a bend modifier
   box height:20 width:40 -- create a box