Memory_Swap

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Memory handling and pointers >

Memory_Swap

 

Description

 

Swaps the content of two memory areas.

 

Syntax

 

lResult = Memory_Swap(pMem1, pMem2, Size)

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

pMem1

Numeric

No

A valid 32-bit memory address

pMem2

Numeric

No

A valid 32-bit memory address

Size

Numeric

Yes

A numeric expression that specifies the number of consecutive bytes to check

 

Remarks

 

Attention:it is programmer responsibility to be sure that at the two addresses there are at least Size bytes already allocated otherwise application will crash with a GPF (General Protection Failure) runtime error will be fired by the operating system

 

Restrictions

 

See also

 

Examples