mIRC Home    About    Download    Register    News    Help

Print Thread
#146312 02/04/06 11:08 PM
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
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)
}


-
Just because it never happened doesn't mean it isn't true.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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).


Gone.
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
thanks smile


-
Just because it never happened doesn't mean it isn't true.

Link Copied to Clipboard