Syntax
Line 1: | Line 1: | ||
{{DavinciWiki_Glossary| | {{DavinciWiki_Glossary| | ||
− | + | The single-line function usage statement is meant to be a quick reference on how to call a function. Within the parentheses are listed the arguments (or inputs) needed to properly call the function. As not all arguments are passed to the function the same way, the syntax of the argument declaration tells the user how to pass it. | |
− | + | ||
− | + | Most inputs in davinci functions are davinci objects either stored in variables or created during the function call. These objects are listed below. | |
+ | |||
'''Input Types:''' | '''Input Types:''' | ||
− | + | #BYTE - values from 0 to 255 | |
− | + | #SHORT - values from -32768 to 32768 | |
− | + | #INT - values from -2,147,483,648 to +2,147,483,647 | |
− | + | #FLOAT - values from -3.402822655e+38 to +3.402822655e+38 | |
− | + | #DOUBLE - values from | |
− | + | #VAL - any type of numeric value (types 1 - 5 above) | |
− | + | #STRUCT - a davinci structure containing specified elements | |
− | + | #STRING - a arbitrary length object composed of characters | |
− | + | #TEXT - an array of strings | |
− | + | ||
Revision as of 12:57, 21 March 2006
Description The single-line function usage statement is meant to be a quick reference on how to call a function. Within the parentheses are listed the arguments (or inputs) needed to properly call the function. As not all arguments are passed to the function the same way, the syntax of the argument declaration tells the user how to pass it. Most inputs in davinci functions are davinci objects either stored in variables or created during the function call. These objects are listed below. Input Types:
For all examples, thm.rectify will be used. This is a special type of function where both explicit and non-explicit argument passing can be used. There are several other functions like this special one but each of the individual cases is applicable to davinci functions where they apply. In the explicit definition of inputs, the variable name will appear and be followed by the type of data it accepts. For example: function(obj = VAR, ignore = FLOAT ) dv> a 577x1852x10 array of float, bsq format [42,744,160 bytes] dv> a = thm.rectify(obj = a, ignore = -32768) struct, 4 elements data: 301x1883x10 array of float, bsq format [22,671,320 bytes] leftedge: 1x1883x1 array of int, bsq format [7,532 bytes] width: 577 angle: 3.052882433
For example: where obj is the input data ignore is the ignore value with default -32768
For example: function($1 = VAR, $2 = FLOAT ) dv> a 577x1852x10 array of float, bsq format [42,744,160 bytes] dv> a = thm.rectify(a, -32768) struct, 4 elements data: 301x1883x10 array of float, bsq format [22,671,320 bytes] leftedge: 1x1883x1 array of int, bsq format [7,532 bytes] width: 577 angle: 3.052882433
For example: where $1 is the input data $2 is the ignore value with default -32768
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 an ignore value in functions like thm.deplaid. Optional inputs are enclosed by square brackets ( [ ] ) and defined as ususal. For example: function(obj = VAR, [ ignore = FLOAT ]) function($1 = VAR, [ $2 = FLOAT ])
|
Wiki Navigation Bar Contents
Contact Developers
All other topics
Last Updated: Feb-2011
More News
|