plot_toggle(3f) - [M_xyplot] special version of toggle(3f) to integrate calculator and language libraries (LICENSE:MIT)
Synopsis
Description
Options
Dependencies
Examples
See Also
References
Author
subroutine plot_toggle(verb,pars)
character, intent=(in) :: verb*(*) character, intent=(in) :: pars*(*)
For users of the Language library TOGGLE() is an example for the common problem of commands that have no parameters but are merely ON or OFF. This routine helps you to easily create a command of the form:
command # toggle from current state to opposite state. command on # explicitly turn this command on command off # explicitly turn this command offplot_toggle() does the same thing as TOGGLE() except that now an additional command syntax is permitted:
command $MODEwhere $MODE is a valid Calculator string variable name or expression.
+ If value is explicitly on or off, set appropriate string. + if no value is specified, toggle on/off value.plot_toggle() is a copy of the TOGGLE() routine that uses xy_retrv2() instead of RETREV() so that the on and off keywords can be specified as Calculator string expressions instead of fixed strings.
After this routine is called the RETREV or FETCH procedures can be used to query the dictionary entry verb_oo. It will either be the string "on" or the string "off".
VERB is the command verb name, from 1 to 20 characters. PARS is the remaining parameter part of the command.
o xy_retrv2 o parse o store o len_trim o jun
See the Programmers example for a simple code with a call to TOGGLE() in it. plot_toggle() is used in much the same way but with the Calculator library loaded.
see PARSE().
o NONE.
o John S. Urban
Nemo Release 3.1 | plot_toggle (3) | February 23, 2025 |