[UP]


Manual Reference Pages  - plot_toggle (3)

NAME

plot_toggle(3f) - [M_xyplot] special version of toggle(3f) to integrate calculator and language libraries (LICENSE:MIT)

CONTENTS

Synopsis
Description
Options
Dependencies
Examples
See Also
References
Author

SYNOPSIS

subroutine plot_toggle(verb,pars)

    character, intent=(in) :: verb*(*)
    character, intent=(in) :: pars*(*)

DESCRIPTION

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 off

plot_toggle() does the same thing as TOGGLE() except that now an additional command syntax is permitted:

         command $MODE

where $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".

OPTIONS

VERB is the command verb name, from 1 to 20 characters.
PARS is the remaining parameter part of the command.

DEPENDENCIES

o xy_retrv2
o parse
o store
o len_trim
o jun

EXAMPLES

See the Programmer’s 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 ALSO

see PARSE().

REFERENCES

o NONE.

AUTHOR

o John S. Urban


plot_toggle (3) March 11, 2021
Generated by manServer 1.08 from 8de454e9-c220-4ce7-91ee-3ed68cd4aec0 using man macros.