mIRC Home    About    Download    Register    News    Help

Print Thread
#74371 07/03/04 07:58 PM
Joined: Aug 2003
Posts: 44
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2003
Posts: 44
For example:
//echo -a $replace(lol},},<)
turns out to be: lol} <

But:
//echo -a $replace(lol},$chr(125),<)
works: lol<

Tested with 6.14

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
its not a bug, take a close look at the output. the 2nd } is having the effect of closing the $replace becuase its on its own its been seen as a closer of a command not a argument.

check this out

//echo -a $replace(lolx},x},<)
lol<

becuause x} becomes an arguement. Its just life i guess.

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Well I can't see why wouldn't it be a bug, but it certainly is an inconsistency that should be corrected at least. Just because an identifier parses arguments differently compared to a command, it doesn't mean that it should interpret the meta-'}' just because it's alone as a parameter. It's next to two colons, so it should be the literal '}' char..


* cold edits his posts 24/7
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Well i might fall back on the old failtfull the pharser is getting confused line. LOL

check this out for it getting confused...
//echo $replace(lol},o,}) x
lxl}

now theres something really wrong there!

Joined: Aug 2003
Posts: 44
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2003
Posts: 44
I even played a little bit with $regsub....didn't work either.
I also found out that { and } will screw your hole output, if you use it in most of the text-identifiers.

Joined: Oct 2003
Posts: 101
Vogon poet
Offline
Vogon poet
Joined: Oct 2003
Posts: 101
You should be using $chr for odd characters. If you are like me and just hate having to find the ascii value all the time, use something like this.

alias ascof { echo 4 -ae $1 = $asc($1) }

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
That's only needed for chr 44 (','). You can use $eval({,0), $eval(},0) and $eval(|) (that's right, '|' can miss the 2nd parameter, '{' and '}' must be bugged), or their most compact forms: $({,), $(},), $(|).


* cold edits his posts 24/7

Link Copied to Clipboard