MathGroup Archive 2001

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

Search the Archive

Re: V4.1 Carriage Returns w/ ReplaceRepeated in Windows?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27632] Re: V4.1 Carriage Returns w/ ReplaceRepeated in Windows?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 9 Mar 2001 02:35:45 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <9872dr$8u9@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

it is not a small bug, it's perfectly correct. 
The parser must know on a line end,
that the expression continues. If the expression is 
only syntactical complete on a line end you must add
the operator at the end to force the parser to read
the next line.

Thats the reason why Mathematica break sums a+b+c+d+e into
a+b+
c+d+e

and not in the matematical usual continuation notation
a+b
  +c+d+e

Regards
  Jens

"John A. Gunnels" wrote:
> 
> I have run into a rather odd "problem" (easily worked around, but ...)
> in my recent upgrade to Version 4.1.
> 
> Under version 4.0, I could type and evaluate something
> like the following:
> x //. {a -> b}
>   //. {c -> d}
> [where I hit the return between "b}" and the second "//."
> 
> Now, under 4.1, this yields a syntax error:
> Syntax::tsntxi:
> "//. {c->d}" is incomplete; more input is needed
> 
> while
> x //. {a -> b} //. {c -> d}
> works as expected (well, it's a simplified example
> which does nothing, but ... no syntax error and the
> analog in my application works).
> 
> So I tried FullForm[Hold[<expression>]] with and without
> the line return (thinking that, perhaps, some odd character
> was inserted or something), only to see that the two were
> identical.  Further, copying and pasting from inside the
> evaluated FullForm[Hold[]], WITH a carriage return, gives
> me a cell that looks like the one that gives me a syntax
> error (above), yet no error is reported upon evaluation.
> FURTHER, if I copy and paste the "]" (the right brace
> corresponding to the "Hold["), then erase it (otherwise, of
> course, it's not syntactically correct), evaluating the cell
> gives me the same syntax error is above.
> 
> I realize that this is fairly trivial, but I would like to
> know if anyone else has run into this.  It _seems_ like a
> _small_ bug to me, but ...
> 
> Thanks,
> John A. Gunnels
> gunnels at cs.utexas.edu


  • Prev by Date: Re: max/min of functions
  • Next by Date: Re: NSolve problem
  • Previous by thread: Re: Fibonacci
  • Next by thread: Re: V4.1 Carriage Returns w/ ReplaceRepeated in Windows?