mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#62289 05/12/03 03:57 AM
Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
first off scripting one would completly defeat the entire purpose because hte entire for construct would be parsed making it slower.

Altering the /while command can and will break previous scripts that uses while.

Adding for wont add heaps of size to mIRC no more than any other command/ident.

as for the "saving a few lines" imagine a script using many whiles. Those "few lines" add up. Any script that can be made to be smaller,faster,or more readable im just not seeing a downside here.

How could _anyone_ be against enhancing _any_ language simply because there are workarounds and dirty hacks available?

I do see a bit of your point in that its not one of those "Must have do it right now" items. There are other methods one can use. I would like to see alot of enhancements to the scripting language. Over the last several builds weve seen plenty of enhancements to the UI and functionality such as mserver but little to the language. Except where required to support the new features. for is but one item (switch/case,aggregates,... to name a couple) I would like to see added.

Last edited by Narusegawa_Naru; 05/12/03 04:03 AM.

Have Fun smile
#62290 05/12/03 03:28 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
It's not. It's either an inconsistency, or a bug.

alias blah { $iif(0,halt) ; test }
This gives me "; test" and the "; Unknown command" error.

alias blah { $iif(1,halt) ; test }
This gives me "halt ; test" and *that's* why "; test" is ignored there, because it's treated only as parameters for /halt in the first place.


* cold edits his posts 24/7
#62291 05/12/03 07:46 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
OK let's compare

Your suggestion. while (%inc = 1,%inc <= 10,inc %inc) code
My (and many thousands of others) suggestion. [color:red]for (%inc = 1,%inc <= 10,inc %inc) code[/color]


What's so terrible about it being called /for instead of hacking /while into something it's not? As for a custom command, it would be slow, awkward, and immensely limited.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#62292 27/12/03 01:46 AM
Joined: Apr 2003
Posts: 85
K
Babel fish
Offline
Babel fish
K
Joined: Apr 2003
Posts: 85
Quote:
as for the "saving a few lines" imagine a script using many whiles. Those "few lines" add up. Any script that can be made to be smaller,faster,or more readable im just not seeing a downside here.


It's called reusable code, you simply script something that can be used over and over again by many different events/aliases. It CAN be done in mIRC, I do so daily.
.


--

katsklaw
Rather experienced Admin
Rather experienced mIRC Scripter
Amateur C Coder
#62293 27/12/03 03:00 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
What does adding a for loop have to do with reuseable code? As has been said by myself and several others, a scripted for loop would be limited beyond useability.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Page 2 of 2 1 2

Link Copied to Clipboard