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

SyntaxInformation

SyntaxInformation[f]
gives information used to generate syntax coloring and other advisories when is entered as input.
  • SyntaxInformation[f]={"prop1"->data1, "prop2"->data2, ...} defines syntax properties 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 is of the form , where the can be , , , , OptionsPattern, or .
  • If the setting for specifies that f takes options, then valid option names are determined from Options[f].
  • The setting for is of the form . Possible types include "Table", , , , , . and give the minimum and maximum argument positions at which the variables can appear. can be Infinity.
  • A setting for of specifies that local variables that appear inside Dynamic should not be specially colored.
  • The setting for is of the form .
Specify that should take exactly two arguments:
Set up options for :
Specify that should have two arguments, followed by options:
Inappropriate options are colored red:
Specify that should take exactly two arguments:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
 
Set up options for :
In[1]:=
Click for copyable input
Specify that should have two arguments, followed by options:
In[2]:=
Click for copyable input
Inappropriate options are colored red:
In[3]:=
Click for copyable input
The first argument of should be a list of exactly two elements:
The first argument is allowed to be an expression such as a symbol, which could evaluate to a list:
can have any number of arguments, but each should be a two-element list:
should allow "Table-like" local iterator specifications at positions 2 through infinity:
should have one ordinary argument, followed by iterator-type list arguments:
New in 6