Memory.SetStructureData

Memory.SetStructureData ( 

number  Structure,

number  Index,

number  Dimension,

variant  Value,

string  StructureForm )

Description

Fill one field of your structure.

Parameters

Structure

(number) Address of your structure (returned number from Memory.CreateStructure).

Index

(number) Index of field that you want filled with value.

Dimension

(number) Index of your fileds this arg is optional and used it just when your index refrenced to a field that is multi dimension [] for examp (int[50]) else leave it zero or anything (See Example 2).

Value

(variant) Value that you want filled in index of Structure.

StructureForm

(string) Set Structure Form for structure that you created (this arg is optional).

Returns

Nothing.

Example 1

struct = Memory.CreateStructure("long, long, long") Memory.SetStructureData(struct, 1, 0, 50) Memory.SetStructureData(struct, 2, 0, 23) Memory.SetStructureData(struct, 3, 0, 51) Memory.FreeStructure(struct)

Example 2

struct = Memory.CreateStructure("long[3]") Memory.SetStructureData(struct, 1, 1, 50) Memory.SetStructureData(struct, 1, 2, 23) Memory.SetStructureData(struct, 1, 3, 51) Memory.FreeStructure(struct)

See also:  Related Actions

Сайт управляется системой uCoz