Memory.Size

number Memory.Size ( 

number  Memory )

Description

Returns the length (in bytes) of the given 'Memory' when 'Memory' be memory address, Returns SizeOf Structure if 'Memory' be structure address and returns size of your array if 'Memory be array address.

Parameters

Memory

(number) Memory address or Structure address or Array address.

Returns

(number) Returns the length (in bytes) of the given 'Memory' when 'Memory' be memory address, Returns SizeOf Structure if 'Memory' be structure address and returns size of your array if 'Memory' be array address.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

Example 1

mem = Memory.Allocate(1024) Dialog.Message("Size of Memory", Memory.Size(mem)) Memory.Free(mem)

Example 2

struct = Memory.CreateStructure("long, short, int, double, float") Dialog.Message("Size of Structure", Memory.Size(struct)) Memory.FreeStructure(struct)

Example 3

array = Memory.CreateArray(ARRAY_INT, 20) Dialog.Message("Size of Array", Memory.Size(array)) Memory.FreeArray(array)

See also:  Related Actions

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