That would be valid in C-derived languages, but torque doesn't support optional parameters. You really don't need them though, because torque doesn't care about how many parameters there are:
function foo(%need, %not)
{
if( %not $= "" )
{
// They didn't give a '%not' paramter
// Or they put an empty string here
echo("Optional parameter wasn't used.");
}
else
{
echo("Optional parameter was used.");
}
}
The amount of parameters you provide doesn't matter:
foo("Hello"); // 'Optional parameter wasn't used'; the second param is set to: ""
foo("This", "is", "rather", "unnecessary"); // 'Optional parameter was used'
Extra parameters are ignored.