lastStdzdThickness=expr(
(thickness[nrow()]-col mean(thickness)) / col std dev(thickness));
continue=expr(...<script to read in more data>...);
log=expr(print("In control at "||char( long date(today()))));
break=expr(...<script to shut down process>...); limitvalue=1;
if(lastStdzdThickness<limitvalue,log;continue,break);
Storing the expression (the script itself, not its evaluation at the moment) with Expr delays its evaluation until the global is actually called. Any variables, data points, or expressions included in that expression are evaluated on the fly when the expression is evaluated. See Stored expressions, for detailed rules for storing expressions and later evaluating them.