Get the value associated with a structure field
x = get_struct_field (Struct_Type s, String field_name)
The get_struct_field function gets the value of the field
whose name is specified by field_name of the structure s.
The following example illustrates how this function may be used to
to print the value of a structure.
define print_struct (s)
{
variable name;
foreach (get_struct_field_names (s))
{
name = ();
value = get_struct_field (s, name);
vmessage ("s.%s = %s\n", name, string(value));
}
}
- slangrtl
-
_push_struct_field_values,
_reshape,
_typeof,
array_info,
array_map,
get_struct_field_names,
length,
reshape,
set_struct_field,
set_struct_fields,
transpose,
typeof,
where
|