TABLE OF CONTENTS
::pwtk::restart
SYNOPSIS
proc ::pwtk::restart {{restart {}}} {
PURPOSE
Set or query the PWTK restart mode. The restart mode can be either ON or OFF. If restart mode is ON then the calculation will not be performed if it is already done (default = OFF).
ARGUMENTS
- restart -- (optional) either ON or OFF (or any other boolen value such as true, false, yes, no, 1, 0)
RETURN VALUE
The value of the restart mode.
SOURCE
variable state if { $restart != {} } { # e.g., .true. --> true set restart [string trim $restart .] if { ! [string is boolean $restart] } { ::pwtk::error "wrong value of restart \"$restart\", must be boolean" 1 } set state(restart) [::pwtk::is_true $restart] if { $state(restart) } { ::pwtk::print "Restart mode is ON\n" } else { ::pwtk::print "Restart mode is OFF\n" } } return $state(restart) }