({{, (RefLink[SyntaxInformation, paclet:ref/SyntaxInformation])[f] 
gives information used to generate syntax coloring and other advisories when f[…] is entered as input. }})

OpenersNotesSection(Spacer1)Details

(RefLink[SyntaxInformation, paclet:ref/SyntaxInformation])[f]={"(Subscript[prop, 1])"->(Subscript[data, 1]),"(Subscript[prop, 2])"->(Subscript[data, 2]),…} defines syntax properties (Subscript[prop, i]) for f.

Possible properties include:

The setting for "ArgumentsPattern" is of the form {(Subscript[patt, 1]),(Subscript[patt, 2]),…}, where the (Subscript[patt, i]) can be _, __, ___, _., (RefLink[OptionsPattern, paclet:ref/OptionsPattern])[], or {(Subscript[p, 1]),…}.

If the setting for "ArgumentsPattern" specifies that f takes options, then valid option names are determined from (RefLink[Options, paclet:ref/Options])[f].

The setting for "LocalVariables" is of the form {"type",{(Subscript[i, min]),(Subscript[i, max])}}. Possible types include (StringTypeLink["Table", paclet:ref/format/Table]), "Solve", "Integrate", "Limit", "Plot", "Manipulate". (Subscript[i, min]) and (Subscript[i, max]) give the minimum and maximum argument positions at which the variables can appear. (Subscript[i, max]) can be (RefLink[Infinity, paclet:ref/Infinity]).

A setting for "LocalVariables" of {"type",{(Subscript[i, min]),(Subscript[i, max])},"Lexical"} specifies that local variables that appear inside (RefLink[Dynamic, paclet:ref/Dynamic]) should not be specially colored.

The setting for "ColorEqualSigns" is of the form {(Subscript[i, min]),(Subscript[i, max])}.

OpenersPrimaryExamplesSection(Spacer1)Examples  (6)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Specify that f should take exactly two arguments:

SyntaxInformation[f]={"ArgumentsPattern"->{_,_}};

{f[],f[x],f[x,y],f[x,y,z],f[x,y,z,w]};

Set up options for f:

Options[f]={aaa->1,bbb->2};

Specify that f should have two arguments, followed by options:

SyntaxInformation[f]={"ArgumentsPattern"->{_,_,OptionsPattern[]}};

Inappropriate options are colored red:

f[x,y,aab->2,aaa->3,bba->4];

OpenersExampleSection1(Spacer1)Scope  (4)

The first argument of f should be a list of exactly two elements:

SyntaxInformation[f]={"ArgumentsPattern"->{{_,_},_}};

{f[{a},x],f[{a,b},x],f[{a,b,c},x]};

The first argument is allowed to be an expression such as a symbol, which could evaluate to a list:

{f[a],f[a,x],f[a,x,y]};

f can have any number of arguments, but each should be a two-element list:

SyntaxInformation[f]={"ArgumentsPattern"->{{_,_}...}};

{f[{x,y},{a,b}],f[{x},{a,b},{x,y,z}]};

f should allow "Table-like" local iterator specifications at positions 2 through infinity:

SyntaxInformation[f]={"LocalVariables"->{"Table",{2,Infinity}}};

f[x+y,{x,0,1}];

f should have one ordinary argument, followed by iterator-type list arguments:

SyntaxInformation[f]={"LocalVariables"->{"Table",{2,Infinity}},"ArgumentsPattern"->{_,{_,_,_.,_.}..}};

f[x+y+z,{x,0,1},{y,0,1,2,3}];

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Messages, paclet:ref/Messages])  ▪  (RefLink[Attributes, paclet:ref/Attributes])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Package Development, paclet:guide/PackageDevelopment])}})}})