MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: "Skip this Input cell" module?

  • To: mathgroup at
  • Subject: [mg68869] Re: [mg68860] Re: "Skip this Input cell" module?
  • From: "Chris Chiasson" <chris at>
  • Date: Mon, 21 Aug 2006 06:33:27 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

One gotcha is that the front end treats expressions separated by
newlines as different calculations unless the expression is inside a
construct that isn't complete without the information from the next
line. If you wrap the contents of an entire cell with a call to a
function, then you will not see any intermediate results (except for
Print, Message, and Dialog output).

On 8/21/06, AES <siegman at> wrote:
> Suppose at the start of a notebook one defines two functions
>       doCell[expr_] = expr ;  skipCell[expr_] = Null ;
>       (or maybe   skipCell[expr_] = Print["Input skipped"] )
> that are intended to be wrapped around the full contents of certain
> Input cells in order to temporarily allow or suppress execution of those
> particular Input cells.
> Assuming the Input cells always contain a proper sequence of executable
> expressions, will these definitions have any hidden "gotchas"?
> Would they be better defined with = or := ?  (or as Modules?)
> Should the argument be [expr_]  or  [expr_Expression]?  (Is Expression a
> Head?  The Mathematica Book doesn't seem to be totally clear about this.)
> Any other hidden gotchas if one defines instead
>    doCell[test_, expr_] = If[test, expr, Print["input skipped"]];
> Thanks for advice and counsel.


  • Prev by Date: Re: Re: "Skip this Input cell" module?
  • Next by Date: Re: "Freezing" evaluation Output?
  • Previous by thread: Re: Re: "Skip this Input cell" module?
  • Next by thread: Re: "Skip this Input cell" module?