This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

SyntaxInformation

SyntaxInformation[f]
gives information used to generate syntax coloring and other advisories when f[...] is entered as input.
  • SyntaxInformation[f]={"prop1"->data1, "prop2"->data2, ...} defines syntax properties propi for f.
  • Possible properties include:
"ArgumentsPattern"patterns for the sequence of allowed arguments
"LocalVariables"type and allowed positions of local variables
"ColorEqualSigns"argument positions for which = should be colored
  • The setting for "ArgumentsPattern" is of the form {patt1, patt2, ...}, where the patti can be _, __, ___, _., OptionsPattern[] or {p1, ...}.
  • If the setting for "ArgumentsPattern" specifies that f takes options, then valid option names are determined from Options[f].
  • The setting for "LocalVariables" is of the form {"type", {imin, imax}}. Possible types include "Table", "Solve", "Integrate", "Limit", "Plot", "Manipulate". imin and imax give the minimum and maximum argument positions at which the variables can appear. imax can be Infinity.
  • A setting for "LocalVariables" of {"type", {imin, imax}, "Lexical"} specifies that local variables that appear inside Dynamic should not be specially colored.
  • The setting for "ColorEqualSigns" is of the form {imin, imax}.
Specify that f should take exactly two arguments:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
 
Set up options for f:
In[1]:=
Click for copyable input
Specify that f should have two arguments, followed by options:
In[2]:=
Click for copyable input
Inappropriate options are colored red:
In[3]:=
Click for copyable input
New in 6