MathGroup Archive 2012

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

Search the Archive

Re: Evaluate code fragment without making new cell


The simple, and obvious, way  -- to evaluate some but not all lines in 
an Input cell, as I understand what you want, but without first dividing 
the single cell into several -- is not to combine the separate pieces 
into a single Input cell at the start.

That is, develop code in smaller chunks, each chunk in a separate Input 
cell. Then, once you're confident it works, combine the separate cells 
into a single cell.

On 7/2/12 10:21 PM, Nasser M. Abbasi wrote:
> On 7/2/2012 5:54 AM, Christoph Lhotka wrote:
>> Hi,
>>
>>     doesn't  Ctrl+Shift+Enter (on selected text, where ever it is) do this?
>>
>> Best,
>>
>>       Christoph
>
> No it does not.
>
> The above, on my Mathematica 8.04, does Evaluation-in-place. It
> replaced the actual code
>
> x=4;
> Sqrt[x]
>
> by
>
> 2
>
> which is NOT what I wanted. I want to evaluate the above 2 lines
> of code WITHOUT making them in one cell.


-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: Re: Evaluate code fragment without making new cell for it?
  • Next by Date: Creating a Scatter Plot with Labeled Points
  • Previous by thread: Re: Evaluate code fragment without making new cell for
  • Next by thread: Re: Evaluate code fragment without making new cell for it?