Memory.CompareString

number Memory.CompareString ( 

number  Memory1,

number  Memory2,

boolean  String NoCase,

number  Length )

Description

Compares two string at the specified memory address.

Parameters

Memory1

(number) Address of Memory1.

Memory2

(number) Address of Memory2.

String NoCase

(boolean) String comparison is case insensitive (a ~= A). By default the comparison is case sensitive.

Length

(number) Number of Char that want compared if you want all char in both memory block compared set it -1.

Returns

(number) Returns 0 if Memory1 equals to Memory2, returns 1 if Memory1 greater than Memory2 , returns -1 if Memory1 is lower than Memory2.

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

mem = Memory.Allocate(1024) mem2 = Memory.Allocate(1024) Memory.PutString(mem, "AMSWaves", -1, "Ascii") Memory.PutString(mem2, "AMSWAVES", -1, "Ascii") result = Memory.CompareString(mem, mem2, false, -1); if result == 1 then Dialog.Message("Compare Memory String Result", "Mem1 greater than Mem2") elseif result == 0 then Dialog.Message("Compare Memory String Result", "Mem1 equals to Mem2") else Dialog.Message("Compare Memory String Result", "Mem1 is lower than Mem2") end Memory.Free(mem) Memory.Free(mem2)

See also:  Related Actions

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