Skip to content

Commit

Permalink
Added option to toggle wait commands on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
rneder committed Jun 15, 2018
1 parent 7ba4455 commit e593659
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib_f90/do_set_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SUBROUTINE do_set (zeile, lp)
USE debug_mod
USE envir_mod
USE errlist_mod
USE do_wait_mod
USE get_params_mod
USE prompt_mod
!
Expand Down Expand Up @@ -201,6 +202,16 @@ SUBROUTINE do_set (zeile, lp)
ier_num = - 6
ier_typ = ER_COMM
ENDIF
!
!----- ---- set wait
!
ELSEIF (str_comp (cpara (1) , 'wait', 2, lpara (1) , 4) ) THEN
IF (ianz.eq.2) THEN
wait_active = (cpara (2) (1:2) .eq.'on')
ELSE
ier_num = - 6
ier_typ = ER_COMM
ENDIF
!
ELSE
ier_num = - 6
Expand Down
3 changes: 3 additions & 0 deletions lib_f90/do_wait_mod.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MODULE do_wait_mod
!
LOGICAL :: wait_active = .TRUE.
CONTAINS
!
! Process the 'wait' command
Expand Down Expand Up @@ -29,6 +30,7 @@ SUBROUTINE do_input (zeile, lp)
INTEGER len_str
LOGICAL str_comp
!
IF(wait_active) THEN
lp = - lp
CALL get_params (zeile, ianz, cpara, lpara, maxw, lp)
IF (ier_num.ne.0) RETURN
Expand Down Expand Up @@ -77,6 +79,7 @@ SUBROUTINE do_input (zeile, lp)
50 CONTINUE
ier_num = - 9
ier_typ = ER_IO
ENDIF
!
1000 FORMAT (' ------ > Waiting for <RETURN> : ')
1500 FORMAT (' ------ > Waiting for input : ')
Expand Down
22 changes: 22 additions & 0 deletions lib_f90/lib_f90.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
3 News

Here you find a list of recent changes, additions, bug corrections
4 2018_June

Added a ==> 'set wait {"on"|"off"} option
4 2018_May

The variables ==> 'variable' were augmented by 1-D and 2-D arrays.
Expand Down Expand Up @@ -938,6 +941,15 @@
!b set debug, {"on" | "off"}

This command allows the user to enable various DEBUG outputs ...
4 wait
!b set wait, {"on" | "off"}

This command allows the user to tailor the 'wait' comand.
The default is 'set wait, on'.
With 'set wait, on' the 'wait' command in a macro is active.
With 'set wait, off' the 'wait' command in a macro will be
ignored and the programm continues execution as if the
'wait' command were absent.
3 show
!b show {"res" | "variables"}

Expand Down Expand Up @@ -1073,6 +1085,16 @@

This command allows to write interactive macros, demo macros
and tutorials.

With the command
!b set wait, {"on" | "off"}
you can toggle the active state of the wait command on off.

The default is 'set wait, on'.
With 'set wait, on' the 'wait' command in a macro is active.
With 'set wait, off' the 'wait' command in a macro will be
ignored and the programm continues execution as if the
'wait' command were absent.
3 variable
!p variable {"integer"|"real"},<name> [,<initial_value>] [,dim:[d1,d2]]
!p variable {"character"},<name>
Expand Down

0 comments on commit e593659

Please sign in to comment.