|
Pointer | ||||
Pointer in is not a command. It's a keyword used to explicitly declare an item as being that of Pointer data type. FACTS: * Note: PlayBASIC V1.64 supports the following pointer types, Generic, Byte, Word, Integer, Float and UserDefinedTypes (Types) * To Read & Write to pointer, use the '*' symbol as a prefix. This denotes that you want to get the information a pointer is pointing at, and not the pointer address. * Arithmetic between Byte/Word/Integer/Float Pointers (ie Address=Address+1) will automatically scale the value to the Pointers data width. * When mixing pointer types, PlayBASIC expects the programmer to explicitly cast the terms. * When writing to a generic pointer, the data type is derived from the data type of the expression result. * When Reading from a generic pointer, the user has to explicitly cast the read datatype * Important: Attempting to read/write from a pointer that has yet to be initialized (told what it should point at) will most certainly crash your application ! So care is definitively needed when dealing with pointers! Ie.
* Typed Pointers (User defined type pointers) allow you to append the user defined types fields to Read/Write pointer accesses. General Pointer Examples: This example shows how to declare the various Pointer types. See the Byte,Word,Integer,Float for usage examples Pointer Declaration Example
Pointer User Defined Types: This example shows how you can declare a user define type pointer and how to use it feilds. Example
This example would output.
|
Related Info: | Byte | Dim | Explicit | Float | Global | Integer | Local | Static | String | Type | Types | Word : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |