Mathematica's nesting.
- To: mathgroup@smc.vnet.net
- Subject: [mg12649] Mathematica's nesting.
- From: Luis Fernando Medina <lmedina@leland.Stanford.EDU>
- Date: Sat, 30 May 1998 17:36:40 -0400
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@leland.stanford.edu Thanks a lot! Luis Fernando Medina lmedina@leland.stanford.edu