[UP]


Manual Reference Pages  - stuff (3)

NAME

stuff(3f) - [M_calculator] directly store value into calculator dictionary for efficiency (LICENSE:PD)

CONTENTS

Synopsis
Definition
Options
Example
Author
License

SYNOPSIS

subroutine stuff(varnam,val,ioflag)

   class(*),intent(in)         :: varnam
   character(len=*),intent(in) :: val
   integer,intent(in),optional :: ioflag

DEFINITION

breaking the rule of only accessing the calculator thru calculator(3f):

a direct deposit of a value into the calculator assumed to be used only by friendly calls, for efficiency and to avoid problems with recursion if a routine called by the calculator in substitute_subroutine(3f) wants to store something back into the calculator variable table

Normally values are stored or defined in the calculator module M_calculator(3fm) using the calculator(3f) routine or the convenience routines in the module M_calculator(3fm). For efficiency when large numbers of values require being stored the stuff(3f) procedure can be used to store numeric values by name in the calculator dictionary.

breaking the rule of only accessing the calculator thru calculator(3f):

stuff(3f) is assumed to only be used when needed for efficiency and to avoid problems with recursion if a routine called by the calculator in substitute_subroutine(3f) wants to store something back into the calculator variable table.

OPTIONS

varnam name of calculator variable to define or replace val numeric value to associate with the name VARNAME. May be integer, real, or doubleprecision.
ioflag optional flag to use with journal logging. This string is passed directly to M_journal::journal(3f) as the first parameter. The default is to not log the definitions to the journal(3f) command if this parameter is blank or not present.

EXAMPLE

Sample program:

   program demo_stuff
   use M_calculator, only : stuff, dnum0
   implicit none
   doubleprecision :: value
   call stuff(’A’,10.0)
   call stuff(’PI’,3.141592653589793238462643383279502884197169399375105820974944592307d0)
   value=dnum0(’A*PI’)
   write(*,*)value
   end program demo_stuff

Expected result:

   31.415926535897931

AUTHOR

John S. Urban

LICENSE

Public Domain


stuff (3) October 17, 2020
Generated by manServer 1.08 from 9550dde4-07da-4828-adcc-80c31b15e4ce using man macros.