GETSUBADDRESS

Previous topic - Next topic

MrTAToad

I notice there is a GETSUBADDRESS function in the header file - but at the moment it isn't recognised by the compiler.  Any chance of making it available, especially if it can be used for assigning PROTOTYPE variables as that way I can simplify getting function addresses...

Would be good if it works with FUNCTIONS and SUBS...

Kitty Hello

That returns a pointer. It's not really designed for BASIC use. A function "doessubexist" might be useful. For calling subs callbyname can be used. Functions by string is a totally different beast in compiled languages.

MrTAToad

Thats a shame as it could have saved a lot of code...

bigsofty

Quote from: MrTAToad on 2012-Aug-03
I notice there is a GETSUBADDRESS function in the header file - but at the moment it isn't recognised by the compiler.  Any chance of making it available, especially if it can be used for assigning PROTOTYPE variables as that way I can simplify getting function addresses...

Would be good if it works with FUNCTIONS and SUBS...

Might have been handy for external C-GLB callbacks too, maybe?
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)

MrTAToad

Quite possible!

Kitty Hello

With inline you can use it. Its in the glb.h header.