format
From DavinciWiki
(Difference between revisions)
Line 1: | Line 1: | ||
{{DavinciWiki_Function| | {{DavinciWiki_Function| | ||
− | + | Show or change an objects data type. | |
+ | |||
+ | Identical to [[type]] | ||
| | | | ||
+ | Arguments: a numeric array | ||
+ | |||
+ | Return Value: string containing data format/type | ||
| | | | ||
+ | Syntax: format(object=VAL [, format={BYTE,SHORT,INT,FLOAT,DOUBLE}]) | ||
+ | |||
+ | The format() function reports or changes the data format of an object. If used with only one argument, the data format of the object specified by the argument is reported as a string. The return values are one of: | ||
+ | |||
+ | *"byte" - 8 bit unsigned integer | ||
+ | *"short" - 16 bit signed integer | ||
+ | *"int" - 32 bit signed integer | ||
+ | *"float" - 32 bit real | ||
+ | *"double" - 64 bit real | ||
+ | |||
+ | If the second, optional, argument is included, the object specified bt the first argument is duplicated and converted to the specified format. | ||
| | | | ||
+ | dv> a | ||
+ | 4x3x1 array of float, bsq format [48 bytes] | ||
+ | 0.947578 0.792789 0.507263 0.826081 | ||
+ | 0.772994 0.0223106 0.0498551 0.427454 | ||
+ | 0.428879 0.514308 0.264948 0.656318 | ||
+ | |||
+ | dv> format(a) | ||
+ | "float" | ||
+ | |||
+ | dv> format(a,int) | ||
+ | 4x3x1 array of int, bsq format [48 bytes] | ||
+ | 0 0 0 0 | ||
+ | 0 0 0 0 | ||
+ | 0 0 0 0 | ||
| | | | ||
| | | | ||
| | | | ||
+ | *[[type]] | ||
+ | *[[org]] | ||
+ | *[[bip]] | ||
+ | *[[bil]] | ||
+ | *[[bsq]] | ||
| | | | ||
| | | |
Revision as of 14:04, 24 February 2006
Contents: Description, Arguments, Usage, Sub-Functions Supported Under Version: >1.69 Current Davinci Version: 2.27 64-bit Safe: Yes
Description Show or change an objects data type. Identical to type
Arguments and Return Values Arguments: a numeric array Return Value: string containing data format/type
Usage dv> a 4x3x1 array of float, bsq format [48 bytes] 0.947578 0.792789 0.507263 0.826081 0.772994 0.0223106 0.0498551 0.427454 0.428879 0.514308 0.264948 0.656318 dv> format(a) "float" dv> format(a,int) 4x3x1 array of int, bsq format [48 bytes] 0 0 0 0 0 0 0 0 0 0 0 0
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Recent Core Changes Modified On: 07-06-2009 |