Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68873] Re: [mg68860] Re: "Skip this Input cell" module?
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Mon, 21 Aug 2006 06:33:35 -0400 (EDT)
  • References: <200608210728.DAA27564@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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 stanford.edu> 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.
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: programming books / tutorials
  • Next by Date: Re: Re: "Skip this Input cell" module?
  • Previous by thread: Re: "Skip this Input cell" module?
  • Next by thread: Re: Re: "Skip this Input cell" module?