Syntax
Line 16: | Line 16: | ||
− | '''Definition of | + | '''Definition of Inputs:''' |
In the explicit definition of inputs, the variable name will appear and be followed by the type of data it accepts. | In the explicit definition of inputs, the variable name will appear and be followed by the type of data it accepts. | ||
Line 23: | Line 23: | ||
− | In non-explicit definition of inputs, the | + | In non-explicit definition of inputs, the argument number ($1, $2,...,$n) will be shown follwed by the type of data it accepts. |
For example: function($1 = VAR, $2 = STRING ) | For example: function($1 = VAR, $2 = STRING ) |
Revision as of 14:57, 6 March 2006
Description Syntax is an important part of using davinci and this page is desined to give the user a better understanding of how to properly input data into various types of functions. There are two main ways to pass information to a function, explicitly or by an ordered list of unnamed arguments or any combination of either.
In the explicit definition of inputs, the variable name will appear and be followed by the type of data it accepts. For example: function(data = VAR, name = STRING )
For example: function($1 = VAR, $2 = STRING )
By allowing some inputs to be optional, davinci has the ability to have preset values that the user doesn't need to enter for the function to work. A good example of this usage is assuming a null value in functions like thm.deplaid. Optional inputs are enclosed by square brackets ( [ ] ) and defined as ususal.
function(data = VAR, [ ignore = FLOAT ]) function($1 = VAR, [ $2 = FLOAT ])
|
Wiki Navigation Bar Contents
Contact Developers
All other topics
Last Updated: Feb-2011
More News
|