mIRC Home    About    Download    Register    News    Help

Print Thread
#164593 14/11/06 01:55 AM
Joined: Feb 2006
Posts: 546
J
jaytea Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
i've only tested basic cases, but it seems like whenever you use evaluation brackets inside an identifier around something that turns out to be $null, it has some strange impact on the specific parameter it's used in:

Code:
//echo -a $+(a [ $1 ] b,c)

echos "c"

Code:
//echo -a $+(a [ $1 ] b ,c)

echos the expected "a bc" (notice the extra space after 'b')

Code:
//echo -a $+(a,b b b b b [ $1 ] c)

echos "a"

including an extra space after 'c' fixes the last one, and all other cases of this nature. note, this seems to be happen with all identifiers, apparently an issue with evaluation brackets. i realize theyre 'quirky' by nature, and understand if this isnt looked at :S


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
#164594 14/11/06 07:29 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
this is a real bug as far as i see , a more real line migth look something like this

//echo -a $+(Final result is $getresult When starting with [ $getresult ] value,$chr(9),$time)

The alias getresult gets called twice first time normally brings back a starting value second returns a ending value.
However assuming the start value is $null

something like
Code:
alias getresult {
  var %return = %return.global
  set -sz %return.global $calc(%return + 7)
  return %return
}

Code:
[color:blue]//echo -a $+(Final result is $getresult When starting with [ $getresult ] value,$chr(9),$time)[/color]
* Set %return.global to 7
	20:21:41
* Set %return.global to 6
* Set %return.global to 5
* Set %return.global to 12
[color:blue]//echo -a $+(Final result is $getresult When starting with [ $getresult ] value,$chr(9),$time)[/color]
* Set %return.global to 19
Final result is 12 When starting with 5 value	20:21:44
* Set %return.global to 18
* Set %return.global to 17
* Set %return.global to 16
* Set %return.global to 15
* Set %return.global to 14
* Set %return.global to 13
* Set %return.global to 12
* Set %return.global to 11
* Set %return.global to 10
* Set %return.global to 9
* Set %return.global to 8
* Set %return.global to 7
* Set %return.global to 6
* Set %return.global to 5
* Set %return.global to 4
* Set %return.global to 3
* Set %return.global to 2
* Set %return.global to 1
* Unset %return.global
[color:blue]//echo -a $+(Final result is $getresult When starting with [ $getresult ] value,$chr(9),$time)[/color]
* Set %return.global to 7
	20:22:05
* Set %return.global to 6
etc etc


I know this is a pretty abstract thing to be doing, but it shows how something legitermitely needed to be coded can fall to the problem.

#164595 22/11/06 01:01 PM
Joined: Dec 2002
Posts: 5,430
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,430
Thanks this has been fixed for the next version.


Link Copied to Clipboard