Just to expand on the other two answers:

In mIRC scripting, procedures and functions are more commonly referred to as commands and identifiers respectively. Both also come under the term 'alias', and it's the alias statement that is used to define them. When defining an alias you don't specify the arguments as you would in a language like C++, instead each argument is stored in the special identifier set $n, where n is a number. So the first argument is $1, the second $2, and so on.

Here's a simple identifier example to be used in Remotes (Alt+R);
alias add {
return $calc($1 + $2 + $3)
}

You could then use /echo -a $add(1, 2, 3) to echo 6 to the active window.

Here's a simple command example that does the same thing but echoes the result internally instead of returning it:
alias add {
echo -a $calc($1 + $2 + $3)
}

You could then use /add 1 2 3 to echo 6 to the active window.

Check the Aliases section of mIRC's help file for more info (/help aliases).

Note: mIRC can also load alias files, which can contain only alias definitions (you can see/edit alias files from the Aliases tab in the mIRC Script Editor). With alias files you don't need to use the alias keyword to define an alias, since it's implied by the fact that it's in an alias file.


Spelling mistakes, grammatical errors, and stupid comments are intentional.