GetDataPointer returns the position of the data pointer. The data pointer is incremented by one each time you call ReadData, ReadData# or ReadData$, or completely repositioned with Restore.
Mini Tutorial:
; create array to hold the names of the data types Dim DataTypes$(2) DataTypes$(0) = "Integer" DataTypes$(1) = "Float" DataTypes$(2) = "String" ; Restore to position of the value "B" Restore FindData("B",1,0) ; Print Data info Print "Current Data Pointer: " + Str$(GetDataPointer()) Print "Current Data Type : " + DataTypes$(GetDataType()) Print "Data value : " + ReadData$() ; Restore to position 2 Restore 2 Print "Current Data Pointer: " + Str$(GetDataPointer()) Print "Current Data Type : " + DataTypes$(GetDataType()) Print "Data value : " + Str$(ReadData()) ; embedded data Data 9,8,7,6,5,4,3,2,1 Data "A", "B", "C", "D", "E", "F" ; Display the Screen and wait for the user to press a key Sync WaitKey |
This example would output. Current Data Pointer: 10 Current Data Type : String Data value : B Current Data Pointer: 2 Current Data Type : Integer Data value : 7 |
|