Sorry, couldn't think of a better topic title. Anyway, I'm using pointers in some ways just fine. I have an array of them declared like this:
Global State:Float Ptr[]Which is later initialized with the proper number of elements. This is all working fine. I'll read Floats in functions and return their values like this:
Function P5X:Float(P5Id:Int=0) Return State[P5Id][0] EndFunction Function P5Y:Float(P5Id:Int=0) Return State[P5Id][1] EndFunction Function P5Z:Float(P5Id:Int=0) Return State[P5Id][2] EndFunctionThis works fine. Here's the hard part though - some of the elements are integers, or bytes. For these I am attempting to do this:
Function P5Visible(P5Id:Int=0) Local v:Int Ptr=State[P5Id] Return v[48] EndFunctionHowever, this brings up the error that you cannot convert from Float Ptr to Int Ptr. So, how am I supposed to read a different type of data? I could redefine the function that gets the pointer to the state data to return an Int or a Byte but this should be delt with anyway.