mIRC Home    About    Download    Register    News    Help

Topic Options
#93679 - 11/08/04 03:24 PM Evaluation of { and }
Sigh Offline
Fjord artisan

Registered: 28/08/03
Posts: 314
Found on mIRC 6.16, when $({,N) / $(},N) or $eval({,N) / $eval(},N) is evaluated it returns (N-1) (N-1) except when N = 0

//echo -a $({,1) * $(},2) * $eval({,3) * $eval(},4)

Top
#93680 - 11/08/04 08:21 PM Re: Evaluation of { and }
MTec89 Offline
Hoopy frood

Registered: 25/07/03
Posts: 742
Loc: Ohio, U.S.A.
so? if you didnt want { } evaluated dont put them in that code..
_________________________
http://MTec89Net.com
irc.freenode.net #MTec89Net

Top
#93681 - 11/08/04 09:14 PM Re: Evaluation of { and }
Sigh Offline
Fjord artisan

Registered: 28/08/03
Posts: 314
So you can explain why { or } evaluates once to give "0 0" and twice to give "1 1"? Let's wait for someone who can give a productive response

Top
#93682 - 11/08/04 09:39 PM Re: Evaluation of { and }
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
cool

evaluating { and } seem to trigger something deep in mircs parser

perhaps you just stumbled upon one of mircs perprocessor steps?

{ xxxxxxxxxx } turns into
0 0 xxxxxxxxxx 1 1
?

or maybe im crazy
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#93683 - 12/08/04 06:12 AM Re: Evaluation of { and }
zack Offline
Fjord artisan

Registered: 09/12/02
Posts: 266
Loc: Australia
That is quite some funky stuff there.

Confirmed here, 6.16
_________________________
You won't like it when I get angry.

Top
#93684 - 12/08/04 12:00 PM Re: Evaluation of { and }
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
I'd only add that this behaviour is very old, probably since $eval() was added. I always considered it to be one of those little parser quirks that I can live with.
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top