Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Evaluate code fragment without making new cell for it?
Replies: 5   Last Post: Jul 20, 2012 3:58 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Christoph Lhotka

Posts: 39
Registered: 2/9/12
Re: Evaluate code fragment without making new cell for it?
Posted: Jul 2, 2012 10:23 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

doesn't Ctrl+Shift+Enter (on selected text, where ever it is) do this?

Best,

Christoph

On 07/02/2012 11:25 AM, Nasser M. Abbasi wrote:
> Sometimes I wish the following feature existed in
> Mathematica notebook interface, but I can't seem to
> find a way to do it.
>
> Sometimes, (while trying things) I find that I want to
> evaluate small code fragment which sits in a cell that
> contains more code.
>
> Currently what I do is either copy that code fragment to
> a new cell and evaluate that cell, and when done, delete
> the cell, or split the original cell at places where I want
> to isolate the code fragment, then rejoin the cells when
> done.
>
> It will be nice, if there was a feature, where one can just
> select, using the mouse, the code fragment, and then right-click
> and say evaluate-selected.
>
> The output will go into a new output cell as normal.
>
> btw, the above is something one can do with that other
> system M____B
>
> For example, assume we have this toy cell
>
> ---CELL-----
> x = 16
> Sqrt[x]
> y = 3
> Sqrt[y*x]
> ---------
>
> And I just wanted to evaluate only
>
> x=16
> Sqrt[x]
>
> There is no easy way to do it without splitting the
> cell or making new cell as I mentioned above.
>
> This feature should not be hard to implement by
> the front end I would think. The front end can
> make an 'internal hidden cell' in its own buffer of the
> code selected and evaluate it and send the output back.
>
> Do others think such a feature will be useful?
>
> --Nasser
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.