Core Function PTRWrite

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> PTRWrite( <ptr>, <type>, <offset>, <value> ) </pre> === Description === Write data to a memory pointer optionally starting from a given index. === Parameters=== ==== pt...")
Newer edit →

Revision as of 01:18, 9 December 2011

PTRWrite( <ptr>, <type>, <offset>, <value> )

Contents

Description

Write data to a memory pointer optionally starting from a given index.

Parameters

ptr

The pointer to use.

type

The type of data to read

[TYPE]		[WHAT IT IS]
b		unsigned byte
B		signed byte
s		signed int16
i		signed int32
l		signed int64
S		unsigned int16
I		unsigned int32
L		unsigned int64
f		float
d		double

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

None.

Example

$PTR = Alloc(300);
 
PTRWrite($PTR, "f", 0, 133.77);
PTRWrite($PTR, "l", 4, 777);
PTRWrite($PTR, "i", 12, 1221);
 
Println( PTRRead($PTR, "f", 0) );
Println( PTRRead($PTR, "l", 4) );
Println( PTRRead($PTR, "i", 12) );
 
Free($PTR);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox