Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

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

Search the Archive

Re: Unacceptable bug in Mathematica

  • To: mathgroup at
  • Subject: [mg93545] Re: [mg93509] Unacceptable bug in Mathematica
  • From: Daniel Lichtblau <danl at>
  • Date: Thu, 13 Nov 2008 21:09:12 -0500 (EST)
  • References: <> <> <>

Savas Nesseris wrote:
> Dear Daniel,
> you say that:
> "Maybe you have in mind that Exp, being a built in "function" (that is, 
> a symbol with DownValues attached to it), should require an "argument". 
> Well and good, but that's progamming language semantics, not syntax."
> OK I accept this, however then you (Wolfram Research) should remove the 
> following comment from the documentation of SyntaxQ, as it is misleading:
> "When SyntaxQ gives True, the string can be converted to an expression:"
> And definately,
> "Exp[]" // ToExpression
> does not give /*a valid expression*/...

But in fact it does give a (syntactically) valid expression. Yes, it 
also gives a warning message. But that is based on semantic considerations.

I should mention that a "syntactically valid expression" is, by 
definition, anything that Mathematica will parse. Here is a related 
example of something that is not syntactically valid.

In[3]:= ToExpression["Exp[)"]

ToExpression::sntx: Invalid syntax in or before "Exp[) ".

Out[3]= $Failed

SyntaxQ tells us, correctly, that we should have expected that one to fail.

In[4]:= SyntaxQ["Exp[)"]
Out[4]= False

> Cheers
> PS Thanks for clarifying this point with SyntaxQ
> [...]

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: Analyzing sequences of fractions in Mathematica
  • Next by Date: Re: Unacceptable bug in Mathematica
  • Previous by thread: Re: Unacceptable bug in Mathematica
  • Next by thread: Re: Unacceptable bug in Mathematica