In many of the inbuilt mathematica function, variables appear aqua like in:
However, when creating your own function, variables no longer have that green coloring and are instead colored like an undefined variable
Is there any way to define functions so that variables used in arguments like in the manner above can get the aqua syntax coloring?
Answer
You can use SyntaxInformation
. In this case,
SyntaxInformation[Lim] = {"ArgumentsPattern" -> {_, _, OptionsPattern[]},
"LocalVariables" -> {"Limit", {2}}}
does what you want.
Comments
Post a Comment