mIRC Home    About    Download    Register    News    Help

Print Thread
#146312 02/04/06 11:08 PM
Joined: Feb 2003
Posts: 105
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 105
How do I use the $result identifier?
mirc help gives the following
Quote:
$result
Stores the number value returned to a calling routine by the /return command.


I get the error message
Quote:
* No such identifier: $result (line 3, alias1.ini)

from the following code
Code:
test { 
  echo -s $result($test2($1,$2))
}
test2 {
  return $calc($1 * $2)
}

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Example:

alias foobar return 5

//foobar | echo -a The result was: $result

$result is a way to get the return value, even if you call the alias in the form of a command (/foobar).

Joined: Feb 2003
Posts: 105
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 105
thanks smile


Link Copied to Clipboard