[UP]


Manual Reference Pages  - call_draw (3)

NAME

call_draw(3f) - [M_drawplus] Given a string representing a M_draw procedure and parameters call the routine (LICENSE:MIT)

CONTENTS

Synopsis
Description
Options
Returned
Example
Author
License

SYNOPSIS

subroutine call_draw(verb,parameters,found)

   character(len=*),intent(in)  :: verb
   character(len=*),intent(in)  :: parameters
   logical,intent(out)          :: found

DESCRIPTION

Used to allow input files to directly call arbitrary low-level graphics procedures. This is a simple interpreter for M_graph(3fm) routines.

OPTIONS

verb name of M_draw(3fm) routine to call
parameters
  string representing options to pass to the routine specified by the verb. Numeric values are evaluated using the M_calc(3fm) module to allow expressions.

RETURNED

found returns .TRUE. if the verb was found, otherwise .FALSE.

EXAMPLE

Simple Example

      program demo_call_draw
         use M_drawplus, only : call_draw
         use M_io, only : read_line
         implicit none
         character(len=:),allocatable :: line
         logical                      :: found
         integer                      :: iend
         INFINITE: do while (read_line(line)==0)
            line=adjustl(line)
            iend=scan(line,’ #;’)-1
            if(iend.le.0)iend=len_trim(line)
            if(iend.ne.0)then
               line=line//’ ’
               call call_draw(line(:iend),line(iend+2:),found)
               if(.not.found)then
                  write(*,*)’ERROR: ’,line(:iend),’[’,line(iend+1:),’]’,’ not found’
               endif
            endif
         enddo INFINITE
      end program demo_call_draw

Sample

       demo_call_draw <<eof
       prefsize 400 400
       vinit X11
       circleprecision 100
       color 1
       circle 0 0 A=1.0
       color 2
       circle 0 0 A=A-.1
       color 3
       circle 0 0 A=A-.1
       color 4
       circle 0 0 A=A-.1
       color 5
       circle 0 0 A=A-.1
       color 6
       circle 0 0 A=A-.1
       color 7
       getkey LET
       vexit
       eof

AUTHOR

John S. Urban

LICENSE

MIT License


call_draw (3) March 11, 2021
Generated by manServer 1.08 from 58f42efd-faf5-46d3-a089-1b54855ca70e using man macros.