User Tools

Site Tools


howtos:toolcoding:common_history_and_background_checks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
howtos:toolcoding:common_history_and_background_checks [2010/09/14 18:09]
shona.weldon
howtos:toolcoding:common_history_and_background_checks [2010/09/20 02:37]
marcus.williams
Line 20: Line 20:
 FIXME - do we have a best practice on the quit() return code? FIXME - do we have a best practice on the quit() return code?
  
 +===== Simulator - history required, background optional =====
 +<​code>​
 +if $history == false
 + say ("this view must be run with a history"​)
 + quit (1)
 +endif
 +
 +integer $index
 +if $background == false
 + $index = 2
 +else
 + $index = 3
 +endif
 +</​code>​
 +
 +Note the use of $index for indexing the appropriate view.
  
  
  
howtos/toolcoding/common_history_and_background_checks.txt ยท Last modified: 2010/09/29 17:59 by marcus.williams