igetvalue(3f) - [M_calculator] given numeric variable name return integer value directly from calculator dictionary for efficiency (LICENSE:PD)
Synopsis
Definition
Options
Example
Author
License
integer function igetvalue(varnam)
character(len=*),intent(in) :: varnam
Given numeric variable name return integer value. Note this is breaking the rule of only accessing the calculator thru calculator(3f). It should only be used from optional user-defined substitute_subroutine(3f) routines to avoid recursion
varnam name of calculator variable to look up that is assumed to be a valid defined name of a numeric variable. If it does not exist zero is returned without an error being reported.
Program:
program demo_igetvalue use M_calculator, only : rnum0 use M_calculator, only: igetvalue value1=rnum0(A=100/2) ! store something into calculator write(*,*)value1,igetvalue(A) end program demo_igetvalueResults:
50.0000000 50
John S. Urban
Public Domain
igetvalue (3) | October 17, 2020 |