Use result instead of parm as variable name

Use “result” as variable name to store the return value when processing
parameter template replacement, instead of using “parm”.