[Date Index] [Thread Index] [Author Index]
Re: Cut and paste: General rules ?
Graham wanted to know how to avoid syntax errors when trying to cut and paste between different cells. -------- Without specifics we can only guess at what was the cause. Of course you may have made an error in your attempt to cut-n-paste and this would have cause the syntax error. Also, the content in your Mathematica notebook might look like simple text, but behind the scenes it's represented as complicated expressions. I wouldn't be surprised if the Front End pasted in the new content in a way that looked right, but didn't have an internal representation with the intended effect. You can see the complicated expression by selecting a cell bracket and making the menu selection (Format | Show Expression). This will allow you to compare the underlying expressions for two cells that are supposed to be the same, and you might be able to discover when cut-n-paste doesn't work right. Now I give some tips on how to minimize such problems. (1) Evaluate a long procedure as several short cells. This will make it easier to isolate the source of a syntax error, and make the cell expressions not too complicated if you decide to look at them. (2) Avoid complicated formatting in your input (bold text, multiple fonts, multiple font colors, ...) since that gives the front-end more potential for mistakes. ------------------ Regards, Ted Ersek Get Mathematica tips, tricks from http://www.verbeia.com/mathematica/tips/Tricks.html