get struct
Line 1: | Line 1: | ||
− | {{DavinciWiki_Function | + | {{DavinciWiki_Function| |
− | [[ | + | Get an element from a structure |
+ | | | ||
+ | Arguments: A structure and the label of the element desired | ||
+ | |||
+ | Return Value: The element extracted from the structure | ||
+ | | | ||
+ | Syntax: get_struct(object=STRUCT, name=STRING) | ||
+ | |||
+ | The get_struct() returns an element from a structure. This function is shorthand for "object.name", but in this case, name can be a string variable. | ||
+ | |||
+ | get_struct() does not remove the element from the original structure. | ||
+ | | | ||
+ | dv> struct | ||
+ | struct, 3 elements | ||
+ | a: "element 1" | ||
+ | b: "element 2" | ||
+ | c: "element 3" | ||
+ | |||
+ | dv> elem = get_struct(struct,"b") | ||
+ | "element 2" | ||
+ | |||
+ | dv> struct | ||
+ | struct, 3 elements | ||
+ | a: "element 1" | ||
+ | b: "element 2" | ||
+ | c: "element 3" | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | *[[remove_struct]] | ||
+ | *[[insert_struct]] | ||
+ | | | ||
+ | | | ||
+ | }} | ||
[[category:Functions]] | [[category:Functions]] | ||
+ | [[category:Davinci Core]] | ||
[[category:Davinci Variable Information]] | [[category:Davinci Variable Information]] |
Revision as of 15:20, 26 February 2006
Contents: Description, Arguments, Usage, Examples, Related Functions Supported Under Version: >1.69 Current Davinci Version: 2.27 64-bit Safe: Yes
Description Get an element from a structure
Arguments and Return Values Arguments: A structure and the label of the element desired Return Value: The element extracted from the structure
Usage Syntax: get_struct(object=STRUCT, name=STRING) The get_struct() returns an element from a structure. This function is shorthand for "object.name", but in this case, name can be a string variable. get_struct() does not remove the element from the original structure.
Examples dv> struct struct, 3 elements a: "element 1" b: "element 2" c: "element 3" dv> elem = get_struct(struct,"b") "element 2" dv> struct struct, 3 elements a: "element 1" b: "element 2" c: "element 3" |
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Related Functions
Recent Core Changes Modified On: 07-06-2009 |