Skip to main content

function

Availability

Device + Agent

Description

Squirrel’s function delegate object provides a series of methods which allow you to enhance the utility of function calls.

Note The imp implementation of Squirrel does not support the standard version of the language’s getinfos() method.

Further Information

For more guidance on using functions, please see the Squirrel Programming Guide.

Member Entities

The function object has the following member methods:

  • function.acall()Calls the target function and passes array values into its parameters
  • function.bindenv()Clones the target function and binds it to a specified context object
  • function.call()Calls the function with a non-default context object
  • function.pacall()Calls the function with an array of parameters, bypassing Squirrel error callbacks
  • function.pcall()Calls the function with a non-default context object, bypassing Squirrel error callbacks