mIRC Homepage

Stricter Version & mIRC Script Engine Model

Posted By: CloCkWeRX

Stricter Version & mIRC Script Engine Model - 24/04/03 03:39 PM

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*
Posted By: Spola

Re: Stricter Version & mIRC Script Engine Model - 24/04/03 07:39 PM

if ( $version > 6.03 ) {
echo kewl, now let's get busy
}
else {
echo ERROR: FATAL ERROR
}
Posted By: CloCkWeRX

Re: Stricter Version & mIRC Script Engine Model - 27/04/03 05:27 AM

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
Posted By: twigboy

Re: Stricter Version & mIRC Script Engine Model - 01/05/03 01:47 PM

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
}
Posted By: starbucks_mafia

Re: Stricter Version & mIRC Script Engine Model - 01/05/03 06:44 PM

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.
Posted By: twigboy

Re: Stricter Version & mIRC Script Engine Model - 02/05/03 01:43 AM

that wouldnt be that bad, it might help a clear few simple errors, or add an error checking method
*shrugs*
© 2021 mIRC Discussion Forums