mIRC Homepage
Here's my idea:
if khaled has documented his code, he probably has something like javadoc's comment tags. In other words he probably made a point of writing down what each function does, and what verison of mIRC it was created in.

Now, what if we changed teh scripting engine just a little, so that it supported functions in versions.

What I mean is this:
mIRC 9.09 is released in the year 3000;
you make a script and put in a "header" line whihc says "use mIRC 6.04 engine model"
Then, if everything has been overwritten in later versions of mIRC your old script will still work because the redundant functions are once again implemented

This would walso mean that you could 'package' functions with each version of mIRC and provide smaller downlaods to update a scripting host or somesuch. I know what i mena in my head but the post prolly isn't clear.

Yes: I know you can do workarounds with mIRC script right now. No, I don't care.

This could also pave a way for conditional on the fly compilation. You can do it already but this owuld be like a #group statement. Also if implmented into the language directly rather than with mIRC script this owuldlead to higher performance

ifver(6.03,>) {
;alias actions
}
else ifver(6.03,<) {
;error msgs.
}

*sleepy dan dan*
if ( $version > 6.03 ) {
echo kewl, now let's get busy
}
else {
echo ERROR: FATAL ERROR
}
i was sleepy when i postwesd that but it still stands:

rather than control structures some form of header/etc; and rather than mIRC script accomplishing things have the scripting engie do it.

that way if a command changes its behavior you can use the command from version 5.91 if it does what you need it to do.

you could have an engine that parses the entire script file and picks up syntax errors, commands that are unknown, etc.

go read up of javascript's versioning for a better idea of what i mean
actually i wouldnt mind a stricter method header style
like, you can specify what data you want through each parameter

alias methodName(int x, String y) {
//where x = $1, y = $2
}
Of course since mIRC treats everything as a string that wouldn't be much use. Unless you're saying you want quoted strings etc. aswell.
that wouldnt be that bad, it might help a clear few simple errors, or add an error checking method
*shrugs*
© mIRC Discussion Forums