get struct

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
Return Value: The element extracted from the structure
 
Return Value: The element extracted from the structure
 
|
 
|
Syntax: get_struct(object=STRUCT, name=STRING)
+
[[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.
 
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.
Line 31: Line 31:
 
*[[remove_struct]]
 
*[[remove_struct]]
 
*[[insert_struct]]
 
*[[insert_struct]]
 +
*[[get_struct_key]]
 
|
 
|
 
|
 
|
Line 37: Line 38:
 
[[category:Davinci Core]]
 
[[category:Davinci Core]]
 
[[category:Davinci Variable Information]]
 
[[category:Davinci Variable Information]]
 +
[[category:64-bit]]

Latest revision as of 11:31, 6 July 2009



64-bit SafeYes

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

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Recent Core Changes

Modified On: 07-06-2009

Personal tools