I put conditional code in a delayed Block
, and added a toggler which defines wither that block is to be run on "Evaluate Notebook" or not:
(the point of first two lines here is to make the notebook yield exactly same results upon multiple runs of "Evaluate Notebook")
If you'd rather use global variables in your conditional blockBlock
use:
testX := Block[{},
x
];