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


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

Re: Evaluate code fragment without making new cell

Started byMurray Eisenberg <murray@math.umass.edu>
First post2012-07-04 07:29 +0000
Last post2012-07-04 07:29 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#10772 — Re: Evaluate code fragment without making new cell

FromMurray Eisenberg <murray@math.umass.edu>
Date2012-07-04 07:29 +0000
SubjectRe: Evaluate code fragment without making new cell
Message-ID<jt0rcp$1a8$1@smc.vnet.net>
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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web