confusing Mathematica?
- To: mathgroup at smc.vnet.net
- Subject: [mg30262] confusing Mathematica?
- From: "Michael" <michael at science.edu>
- Date: Sat, 4 Aug 2001 01:14:29 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I've got a rather length function consisting of a module within a block within a block. Within the module is a while statement containing at a particular point an if within a replace within an if. Upon routine editing I happened to make the following change: ... If[<condition>, (* Here I inserted the rest of this line: *) Map[(X)&,vars]; (* This comment was already here... *) If[<valid stuff here>]; , and suddenly I get a huge syntax error looking something like this... Syntax::sntxf : "If [<<1>>,<<1>>]; cannot be followed by "(code snipped)". The error is nowhere near where I actually insert the line. The problem is, when I delete the line I just added I *still* get an error. The way the front end spuriously moves text around while I am trying to complete brackets and braces is most unhelpful, and I thought perhaps I had made a change somewhere else in the function without realizing it. But after a long time trying to figure out where the error is, I ran diff against the original function and the function Mathematica doesn't like, and there is no difference. Any ideas what is going on here? Am I confusing Mathematica with so many things nested inside each other? Michael