draw_interpret(3f) - [M_drawplus] call interpreter for testing M_draw(3fm) routines (LICENSE:MIT)
Synopsis
Description
Options
Examples
See Also
Author
License
subroutine draw_interpret(array,delimiters)
character(len=*) :: array(*) character(len=*) :: delimiters
takes an array of strings and treats them as requests for simple calls to the call_draw(3f) routine. This allows for creating simple graphics and for testing the M_draw(3fm) module.The M_calc(3fm) module is used to evaluate number parameters. The "set" directive is added to allow easily declaring variables for the calculator.
ARRAY character array containing strings representing basic M_draw(3fm) procedures. DELIMITERS character(s) used to separate commands in the array.
Sample program
program demo_draw_interpret use M_drawplus, only : draw_interpret character(len=:),allocatable :: draw_cmds(:)! $FILTER variable -varname DRAW_CMDS
draw_cmds=[ character(len=128) :: & set N=11; prefsize 600 200; vinit ;page -15 15 -5 5 ,& textsize .3 .3; linewidth 150/3; color 0; clear ,& color 1; spirograph -10 0 N 1 N 5 1000 0 0 0 ,& polyhatch 1; hatchang 45.0 ; hatchpitch 0.3 # turn on polygon hatching ,& color 2; spirograph 10 0 N 1 N 5 1000 0 0 2 ,& ,& vflush; getkey ; vexit ,& ]
! $FILTER END
call draw_interpret(draw_cmds,delimiters=;) end program demo_draw_interpret
call_draw(3f), M_draw(3fm), M_drawplus(3fm)
John S. Urban
MIT License
Nemo Release 3.1 | draw_interpret (3) | February 23, 2025 |