April 28, 2024, 09:52:35 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Function Templates

Started by Zen, January 11, 2006, 09:22:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zen

Paul, how do we create function templates to run manually loaded dll functions?

Is it the same as IBasic or has it changed? Also is it possible to dynamicly create a function template?

Lewis

Ionic Wind Support Team

Haven't decided on the syntax for indirect function calling yet.  C's version is a little esoteric.
Ionic Wind Support Team

Parker

When I look at C's declarations it takes me a few seconds to recognize, and I can't imagine trying to parse them. IBasic's is a little more than I'd like, since it requires the !<> every time. Something that is used in another language is this:
dim f as function(x as string) as integer
f = some_function
print f("Hi")

which is nice, but wouldn't work very well for Aurora, since we're not required to use "dim" and those would be interpreted as a SUB, I would think.

But I'm hoping for something where we can declare it as a subroutine with the required parameters like that, instead of having to specify the 'template' every time.

Parker

And if you need it right now, you can use assembly code. Look at the dictionary class for an example.

Zen

Oh yes i didnt think about doing it in ASM. Maybe its a good time to learn some assembly code. The reason i wanted to do dynamic functions is i had an idea for another common class, loading DLL's for such things as plugins or when you need to load a dll but dont know which one until after the program has run.

Ive built a few plugin systems before so i think im quite good at it now. The Zen Script IDE one is the best i think.

Lewis