Pointers
Twim
Posts: 10
Help
I would like to create a pointer that references the first element in a byte array (byte[noparse][[/noparse]0])
however I can’t quite figure out how it’s done in Spin.
The array and pointer are declared in the Var block of the spin program. The program works as expected
whenever the routine is called using method 1 but does not when called using method 2.
I have tried Several variations of method 2 without success.
any help on this matter is greatly appreciated.
Var
·byte TextBoxBuffer[noparse][[/noparse]6]
·long pointer_to_TextBoxBuffer
··
(Method 1)·· getKeyboardInput( @TextBoxBuffer[noparse][[/noparse]0] , TextBoxFieldsize )
·····
(Method 2)·· pointer_to_TextBoxBuffer:= @TextBoxBuffer[noparse][[/noparse]0]···················
············ getKeyboardInput( pointer_to_TextBoxBuffer , TextBoxFieldsize
I would like to create a pointer that references the first element in a byte array (byte[noparse][[/noparse]0])
however I can’t quite figure out how it’s done in Spin.
The array and pointer are declared in the Var block of the spin program. The program works as expected
whenever the routine is called using method 1 but does not when called using method 2.
I have tried Several variations of method 2 without success.
any help on this matter is greatly appreciated.
Var
·byte TextBoxBuffer[noparse][[/noparse]6]
·long pointer_to_TextBoxBuffer
··
(Method 1)·· getKeyboardInput( @TextBoxBuffer[noparse][[/noparse]0] , TextBoxFieldsize )
·····
(Method 2)·· pointer_to_TextBoxBuffer:= @TextBoxBuffer[noparse][[/noparse]0]···················
············ getKeyboardInput( pointer_to_TextBoxBuffer , TextBoxFieldsize
Comments
Ill take another look.