# Multiple templates for a single user-defined function

How do I use the ::usage tag to allow the Mathematica v9 front end to know that there are multiple ways to call an overloaded function (a function that can have different number of arguments?

For example, if I sequentially run the two commands

myfunc::usage = "foo[x,y,z] will combine x, y and z for you.";
myfunc::usage = "foo[x,y,z,w] will be even better.";


The second line has overwritten the first and the front end doesn't know about both cases. A built-in example of what I'm talking about is Table which the front-end recognizes as having many different templates.

myfunc::usage = "foo[x,y,z] will combine x, y and z for you.

• @QuantumDot Yes it works, but only if it was defined that way initially. If you want to add a new definition, it looks like you'll have to Remove the symbol first (ClearAll doesn't suffice, even though the message definitions are cleared). My guess is that since the template completion is handled by the FrontEnd, it loads this when the function is first defined and remembers it forever and is unaware of later changes to the symbol in the kernel. – rm -rf Feb 19 '13 at 4:01