mIRC Home    About    Download    Register    News    Help

Print Thread
Stricter Version & mIRC Script Engine Model #20725 24/04/03 03:39 PM
Joined: Feb 2003
Posts: 309
C
CloCkWeRX Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
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*

Re: Stricter Version & mIRC Script Engine Model #20726 24/04/03 07:39 PM
Joined: Dec 2002
Posts: 20
S
Spola Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 20
if ( $version > 6.03 ) {
echo kewl, now let's get busy
}
else {
echo ERROR: FATAL ERROR
}


you guys are so not L334
Re: Stricter Version & mIRC Script Engine Model #20727 27/04/03 05:27 AM
Joined: Feb 2003
Posts: 309
C
CloCkWeRX Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
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

Re: Stricter Version & mIRC Script Engine Model #20728 01/05/03 01:47 PM
Joined: Jan 2003
Posts: 98
T
twigboy Offline
Babel fish
Offline
Babel fish
T
Joined: Jan 2003
Posts: 98
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
}

Re: Stricter Version & mIRC Script Engine Model #20729 01/05/03 06:44 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Stricter Version & mIRC Script Engine Model #20730 02/05/03 01:43 AM
Joined: Jan 2003
Posts: 98
T
twigboy Offline
Babel fish
Offline
Babel fish
T
Joined: Jan 2003
Posts: 98
that wouldnt be that bad, it might help a clear few simple errors, or add an error checking method
*shrugs*