Page 10 - Demo
P. 10
Interface to FORTRAN%uf09f %uf09f RCP Consult 2023-2025 Page 10The third function shows usage of formal argumentsreal*8 function StoneCircularFA(l,s,d,p1,p2,pi,ier) bind(C,name='StoneCircularFA') implicit none!GCC$ ATTRIBUTES DLLEXPORT::StoneCircularFAdouble precision, intent(in), value :: l, s, d, p1, p2, piinteger, intent(out) :: ier!# Uses function argument values as defined in Symbolic Expressions.!# The sequence is predefined by definition of parameters in DEFFUNC.StoneCircularFA = p1*pi/4*s*d**2 - p2*lier=0end functionIn this case an include file %u2018strurel.hf%u2019 can be omitted because all data will be processed asinput parameters.It is also allowed to use a mixed mode %u2013 global vector, global names and arguments in the same export function. For this kind you always must include %u2018strurel.hf%u2019.Note: Function and argument names are arbitrary.