Converts a pointer expression to a specified data type pointer

Cptr( PointerDataType, expression )

Converts expression to PointerDataType.

PointerDataType must be a Pointer type (e.g. a DataType Ptr or an Any Ptr), or a Type (Alias) to one.
expression may have a different pointer type or be an Integer.

Dim intval As Integer
Dim intptr As Integer Ptr
intval = &h0080
intptr = @intval
'' will print -128 and 128, as the first expression will be "seen" as an signed byte
Print *CPtr( Byte Ptr, intptr ), *intptr

Dialect Differences:
Differences from QB:
See also:
Back to Converting Data Types
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki

sf.net phatcode