IMPORT default params

Previous topic - Next topic

bigsofty

A small example will explain this better...

Code (glbasic) Select
IMPORT "C" int __stdcall foo(int mesh, float px, float py, float pz)

could have the syntax

Code (glbasic) Select
IMPORT "C" int __stdcall foo(int mesh, float px=1, float py=1, float pz=1)

allowing

Code (glbasic) Select
foo(10)

which equates to...

Code (glbasic) Select
foo(10,1,1,1)


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)