Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Strange Syntax problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64256] Re: [mg64231] Strange Syntax problem
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 8 Feb 2006 03:53:48 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Kees,

If Mathematica says you have a missing bracket you almost certainly do.
However, it might not always be the type of bracket they indicate.

You can sometimes trace this down by placing the cursor in an expression and
then using Ctrl-'.' Keep pressing '.' and Mathematica will select ever
larger subexpressions. This will usually show when an expression is not
being terminated properly because of a missing bracket.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: KvS [mailto:keesvanschaik at gmail.com]
To: mathgroup at smc.vnet.net


Hi all,

I'm new here, have some experience with Mathematica, currently running
version 5.1 under Windows XP Prof. I've written a reasonably large
piece of code (about 50 lines) in a single cell. It contains some
comments troughout and a few loops. If I run this piece of code the way
it was saved it all works fine.

But if I now simply try to add a line somewhere in the code, a simple
Print-statement e.g., I suddenly get the error

Syntax::bktmcp : Expression "(Log[s])^m" has no closing ")".

This expression (Log[s])^m is in the last part of the code and the line
I added is close to the beginning so they're relatively far apart. It
doesn't make any sense because even if I comment out the added line by
adding "(*" and "*)" around them (so that I have effectively only added
comment to the original code) the same error keeps coming up.

If I then reopen the original saved file and add a Print-statement
close to the end of the code it does run...

How could this have happened, is anybode familiar with this behaviour?
I wouldn't mind rewriting the code if the notebook somehow became
corrupt only if I knew for sure it wouldn't happen again...

Thanks in advance!

- Kees



  • Prev by Date: Re: Solve problems
  • Next by Date: Number-Theory :: All-Digit Perfect Squares
  • Previous by thread: Strange Syntax problem
  • Next by thread: Re: Strange Syntax problem