Syntax
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.
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
|