Joy Online Manual

NAME
objc:poke - Write-dereferene a pointer

SYNOPSIS

objc:poke address value ?type?

DESCRIPTION
Stores the given value at the given address and returns that address. If the optional type parameter is given, the value is interpreted as being of that type, else the type of the address pointer is decisive.

EXAMPLE

tcl> set p [objc:newPtr int]
int@0xaadbc
tcl> objc:poke $p 100 float
int@0xaadbc
tcl> objc:peek $p
1120403456

The last statement returns what the binary representation of the float 100.0 looks like when interpreted as an integer.

SEE ALSO

objc:newPtr
objc:peek
objc:typedef

KEYWORDS
dereferencing, pointer

Index