<< Previous Suneido > Contents > LanguageNext >> 

Functions

Note: This documentation refers to parameters when talking about a function definition and arguments when talking about the values passed to a function when it is called.

Function literals are written as follows:

function:

function ( parameters ) { statements }
function ( @name ) { statements }

parameter:

local-variable
local-variable = literal

Parameters must be separated by commas. Parameters with default values must be at the end of the parameter list.

@name places all the supplied arguments into an object.

Note: In Suneido, functions are values. This means they can be assigned to variables, passed to other functions, etc.


<< Previous Suneido > Contents > LanguageNext >> 
Copyright (C) 2000-2007 Suneido Software Corp. All rights reserved worldwide.