IMPORT extended a little

Previous topic - Next topic

bigsofty

Hi,

I love using IMPORT as opposed to INLINE, its very clean looking and its shortened my code no end. One thing I have trouble with is importing arrays though.

This for example does not work...

Code (glbasic) Select
IMPORT "C" int CreatePolygon2DShape(float* points, int count, float mass)

It would be great if array pointers could be added to the supported IMPORT types?

Cheers,


Ian
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

not possible. I have no idea how to wrap them and you must have some memory allocated and stuff.
A float* is not represent, anyway. On win32 it's "double". You'll need an inline wrapper here.

bigsofty

OK, that sounds pretty conclusive, I'll go for the INLINE option.

Cheers,


Ian
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)