Basic Pointer

This program demonstrates a basic pointer data type.

'Basic Pointer
'Demonstrates a basic pointer data type.

'Create a pointer - doesn't point to anything.
Dim myPointer As Integer Ptr

'Initialize the pointer to point to 1 integer
myPointer = Callocate(1, Sizeof(Integer))
'Print the address
Print "Pointer address:";myPointer
'Add some meaningful data
*myPointer = 10
'Print the contents-will not be garbage
Print "Memory location contains:";*myPointer
'Deallocate the pointer
Deallocate myPointer