Re: Frontend suggestions
- To: mathgroup at smc.vnet.net
- Subject: [mg111800] Re: Frontend suggestions
- From: "J. McKenzie Alexander" <jalex at lse.ac.uk>
- Date: Fri, 13 Aug 2010 06:58:37 -0400 (EDT)
On 12 Aug 2010, at 10:27, S. B. Gray wrote: > > 5. An easy way to have Print work more like it does in C (a language > that I hate). Specifically a way to print pieces of lines while Mathematica is > calculating rather than Print working only in whole lines. One solution to the problem of printing partial lines is to evaluate, below the cell performing the lengthy computation, the following: Dynamic[partialString] and then update the definition of partialString in the course of the lengthy computation, as below: Do[ partialString == ""; Pause[0.25]; partialString == "First part..."; Pause[0.25]; partialString == partialString <> "second part..."; Pause[0.25]; partialString == partialString <> "final part: " <> ToString[i]; Pause[0.25]; Print[partialString], {i, 1, 5} ] Hardly elegant, but it works. Jason -- Dr J. McKenzie Alexander Department of Philosophy, Logic and Scientific Method London School of Economics and Political Science Houghton Street, London WC2A 2AE Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/planningAndCorporatePolicy/legalandComplianceTeam/legal/disclaimer.htm