Re: Mathematica's nesting.
- To: mathgroup at smc.vnet.net
- Subject: [mg12670] Re: Mathematica's nesting.
- From: "Allan Hayes" <hay at haystack.demon.cc.uk>
- Date: Mon, 1 Jun 1998 23:16:44 -0400
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
Luis Fernando Medina wrote in message <6kpvhd$sjb at smc.vnet.net>... > >This is a small but VERY annoying problem I'm having in an otherwise >extremely simple program in Mathematica for Students. My program >contains two nested Do clauses and ordinarily runs smoothly without >any complain. But, recently I've been trying to write an auxilary >program based on this. Turns out that absolutely innocuous changes >inside the Do clauses in the program are enough for it to stop running. >At the beginning I thought I was being careless with the syntax and so >began trying each time dumber instructions. In my last attempt, I just >typed within one of the Do clauses Print["p"];, that is, just another >instruction more in the already long string of instructions it >ordinarily performs without any complaint. I've been careful enough to >write down the semicolons in their right place (after all, there aren't >many mistakes you can do with such an instruction). Much to my >surprise, this minute change is enough for Mathematica to say that my >program is missing a closing ] in the Do clause. Of course, this is >accompanied by the "oh-so-helpful!" error message where ALL the program >is underlined in red (as if this could hint you of the possible error >in a program several scrolls long). To make things worse, the problem >persists AFTER I erase the new instruction down to the last character. >Once this happens, not even closing the window and opening it again >will work. As far as Mathematica is concerned, the program has been >tainted by the "original sin" and no amount of repentance can redeem >it. Can somebody explain me what on earth is going on here? As usual, >to avoid overload of the Internet, just answer to my email: >lmedina at leland.stanford.edu > >Thanks a lot! > > >Luis Fernando Medina >lmedina at leland.stanford.edu > > Luis, Please post the example. Meanwhile: > the problem persists AFTER I erase the new instruction down to the last > character. Clear["`*"] will clear your own definitions. Menu > Kernel > Quit Kernel > Local will do a more thorough job. ------------------------------------------------------------- Allan Hayes Training and Consulting Leicester UK http://www.haystack.demon.co.uk hay at haystack.demon.co.uk voice: +44 (0)116 271 4198 fax: +44(0)116 271 8642