MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Add syntax highlighting to own command

  • To: mathgroup at
  • Subject: [mg101678] Re: Add syntax highlighting to own command
  • From: Simon <simonjtyler at>
  • Date: Tue, 14 Jul 2009 05:35:10 -0400 (EDT)
  • References: <h340tk$guu$> <h390jd$jmo$>

Hi Bastian,

with regards to the SyntaxInformation line
There appears to be no difference between using {{__},_} or {_,_} .
This is because you could pass a symbol that evaluates to a list to
the first position in {_,_}.

---- to quote the documentation center ----
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]}; -- only the last
expression fails the argument pattern.

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]}; -- the first land last expression here
fail the argument pattern, the middle passes.
---- end quote ----


  • Prev by Date: Re: ColorFunction and question about how to use it
  • Next by Date: Remote Kernels
  • Previous by thread: Re: Add syntax highlighting to own command
  • Next by thread: Re: binomial expansion of quantity raised to power of