indeControl of the precision f_precision
¶
Work in progress: here the automodule documentation of f_precision should appear
Description
This module enhances the portability of various kind of variables and defines other objects that might be used in the host code
Quick access
- Types
- Variables
f_0
,f_1
,f_address
,f_backslash
,f_byte
,f_cr
,f_double
,f_f
,f_integer
,f_loc
,f_long
,f_quadruple
,f_short
,f_simple
,f_t
- Routines
Types
- type f_precisions/f_parameter¶
- Type fields
% val [character(len=num_size)]
Variables
- f_precisions/f_0 [f_parameter,public/parameter/optional/default=f_parameter(c_0)]¶
- f_precisions/f_1 [f_parameter,public/parameter/optional/default=f_parameter(c_1)]¶
- f_precisions/f_address [integer,public/parameter/optional/default=8]¶
- f_precisions/f_backslash [character(len=*),public/parameter/optional/default=char(92)]¶
- f_precisions/f_byte [integer,public/parameter/optional/default=1]¶
precision for 1-byte logical, to be declared as logical(f_byte)
- f_precisions/f_cr [character(len=*),public/parameter/optional/default=char(13)//char(10)]¶
- f_precisions/f_double [integer,public/parameter/optional/default=selected_real_kind(15,307)]¶
- f_precisions/f_f [logical,public/parameter/optional/default=.false._f_byte]¶
- f_precisions/f_integer [integer,public/parameter/optional/default=selected_int_kind(8)]¶
- f_precisions/f_loc [integer,public/external]¶
- f_precisions/f_long [integer,public/parameter/optional/default=selected_int_kind(16)]¶
kind of a pointer address, long integer on most machines. Might be detected at configure time
- f_precisions/f_quadruple [integer,public/parameter/optional/default=selected_real_kind(33,4931)]¶
- f_precisions/f_short [integer,public/parameter/optional/default=selected_int_kind(4)]¶
- f_precisions/f_simple [integer,public/parameter/optional/default=selected_real_kind(6,37)]¶
- f_precisions/f_t [logical,public/parameter/optional/default=.true._f_byte]¶
Subroutines and functions
- interface f_precisions/assignment(=)(val, par)¶
- Parameters
val [real, integer, character(len=*), out]
par [f_parameter, in]
- interface f_precisions/f_sizeof(av)¶
- Parameters
av [real, integer, logical, in]
- interface f_precisions/uninitialized(one)¶
- Parameters
one [real, integer, logical, in]
- function f_precisions/gt_with_tol(a, b[, tol])¶
- Parameters
a [real, in]
b [real, in]
- Options
tol [real, in,]
- Return
yes [logical]
- function f_precisions/eq_with_tol(a, b[, tol])¶
- Parameters
a [real, in]
b [real, in]
- Options
tol [real, in,]
- Return
yes [logical]
- function f_precisions/f_simplify(d)¶
- Parameters
d [real, in]
- Return
r [real]
Now I write some customized information here:
- function f_precisions/f_loc(x)
Inquiry Function which identifies the address of the scalar object associated to a unknown quantity. Portable version of the
loc()
function of GNU fortran standard- Parameters
x [in] :: Variable of any type; it may be a subroutine or a fortran intrinsic or derived type. It cannot be a nullified pointer
- Return
f_loc [integer(f_address)] :: Address of the object
- Example
program test_f_loc use f_precisions, only: f_address,f_loc implicit none integer(f_address) :: i !note that altough this variable is uninitialized it !already has an address in the stack real :: r i = f_loc(r) print *, i end program test_f_loc
Todo
Some text 2