IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Zen on January 11, 2006, 09:22:02 AM

Title: Function Templates
Post by: Zen on January 11, 2006, 09:22:02 AM
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
Title: Re: Function Templates
Post by: Ionic Wind Support Team on January 11, 2006, 11:57:24 AM
Haven't decided on the syntax for indirect function calling yet.  C's version is a little esoteric.
Title: Re: Function Templates
Post by: Parker on January 11, 2006, 02:48:39 PM
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.
Title: Re: Function Templates
Post by: Parker on January 13, 2006, 04:35:12 PM
And if you need it right now, you can use assembly code. Look at the dictionary class for an example.
Title: Re: Function Templates
Post by: Zen on January 13, 2006, 04:44:20 PM
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