How to close a subsession and resume the main session?

  • Context: Mathematica 
  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Resume
Click For Summary
SUMMARY

The discussion focuses on closing a subsession and resuming the main session in Wolfram Language during long calculations. Users can interrupt evaluations via the Evaluation menu, which opens a dialog box for subsession management. To exit the dialog and return to the main session, the command Return[] is used. If a specific expression is needed, Return[expr] can be employed to return a value from the dialog, clarifying the relationship between the front-end menu and the Dialog[] function.

PREREQUISITES
  • Familiarity with Wolfram Language syntax
  • Understanding of dialog boxes in user interfaces
  • Knowledge of evaluation control in computational environments
  • Basic experience with the Evaluation menu in Wolfram Mathematica
NEXT STEPS
  • Research the Dialog[] function in Wolfram Language
  • Explore advanced features of the Evaluation menu in Wolfram Mathematica
  • Learn about handling interruptions in long-running computations
  • Investigate best practices for managing subsessions in interactive programming
USEFUL FOR

Wolfram Language users, Mathematica developers, and anyone involved in computational programming who needs to manage long calculations effectively.

Swamp Thing
Insights Author
Messages
1,047
Reaction score
778
TL;DR
Ending a subsession in Mathematica
While running a long calculation in a cell, you can do Evaluation > Interrupt Evaluation. A dialog box appears, offering the option of starting a subsession.

But it's not clear how to close the subsession and resume the original calculation. I couldn't find anything on the net.
 
Physics news on Phys.org
From https://reference.wolfram.com/language/ref/Dialog.html:
  • You can exit a dialog using Return[].
  • If you exit with Return[expr], then expr is the value returned by the Dialog function. Otherwise, the value returned is the expression on the last output line in the dialog.
 
  • Informative
  • Like
Likes   Reactions: Swamp Thing and topsquark
Nice !
I would never have made the connection. It doesn't seem obvious what a front end menu UI dialog box has to do with the Dialog[ ] thing.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K