Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10772

Re: Evaluate code fragment without making new cell

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Evaluate code fragment without making new cell
Date 2012-07-04 07:29 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jt0rcp$1a8$1@smc.vnet.net> (permalink)
References <201207020925.FAA13343@smc.vnet.net> <4FF17DE6.50400@fundp.ac.be> <201207030221.WAA20729@smc.vnet.net>

Show all headers | View raw


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@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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Evaluate code fragment without making new cell Murray Eisenberg <murray@math.umass.edu> - 2012-07-04 07:29 +0000

csiph-web