[Gambas-user] Error message from (at least earlier valid) pointer usage.

Jussi Lahtinen jussi.lahtinen at ...626...
Sat Sep 19 00:54:26 CEST 2009


I forgot to mention that CalculatePoints is external function.

Jussi


On Sat, Sep 19, 2009 at 00:08, Jussi Lahtinen <jussi.lahtinen at ...626...> wrote:
> This code, gives error message "wanted Stream got Long instead":
>
> pPOINTS = Alloc(4, 1522)
> tmp = CalculatePoints(pPOINTS,matrix.Data)
>
> ....
>
>  For ii = 0 To tmp
>  tmpPOINT = New POINT
>  Read #pPOINTS + (ii * 4), tmpPOINT.x    <---- Fails here!
>  Read #pPOINTS + (ii * 4) + 2, tmpPOINT.y
>  ...
>
> POINT class:
>
> Public x As Short = -1
> Public y As Short
>
> There is also rather complicated "_compare" function, but I don't
> think it matters with this problem.
>
>
> This code worked fine with earlier Gambas 3 revisions.
> Does this has anything to do with my error?
>  * NEW: A Pointer can not be used as a stream directly. You must use the new
>    Memory instruction for that.
>
> New feature understandably lacks documentation, so I need help!
>
> Jussi
>




More information about the User mailing list