MONC
Data Types | Modules | Functions/Subroutines | Variables
conversions.F90 File Reference

Go to the source code of this file.

Data Types

interface  conversions_mod::conv_to_generic
 Converts a data type into the generic (class *) form. More...
 
interface  conversions_mod::conv_to_string
 Converts data types to strings. More...
 
interface  conversions_mod::conv_to_integer
 Converts data types to integers. More...
 
interface  conversions_mod::conv_to_real
 Converts data types to real. More...
 
interface  conversions_mod::conv_to_logical
 Converts data types to logical. More...
 
interface  conversions_mod::conv_is_integer
 Determines whether a data item can be represented as an integer or not. More...
 
interface  conversions_mod::conv_is_real
 Determines whether a data item can be represented as a real or not. More...
 
interface  conversions_mod::conv_is_logical
 Determines whether a data item can be represented as a logical or not. More...
 

Modules

module  conversions_mod
 Conversion between common inbuilt FORTRAN data types.
 

Functions/Subroutines

real(kind=double_precision) function, public conversions_mod::conv_single_real_to_double (input_real)
 Converts from a single to double precision real. This applies some rounding to a certain number of decimal places to ignore very small fractions. More...
 
logical function conversions_mod::string_is_integer (string)
 Determines whether a string is an integer or not. More...
 
logical function conversions_mod::string_is_real (string)
 Determines whether a string is a real or not. More...
 
logical function conversions_mod::string_is_logical (string)
 Determines whether a string is a logical or not. More...
 
character(len=str_length) function, pointer conversions_mod::generic_to_string (generic, makecopy, str_length)
 Converts a generic to a string. More...
 
character(len=15) function conversions_mod::integer_to_string (input)
 Converts an integer to a string. More...
 
character(len=30) function conversions_mod::real_single_to_string (input, decimal_places, exponent, exponent_small_numbers)
 Converts a single precision real to a string. More...
 
character(len=30) function conversions_mod::real_double_to_string (input, decimal_places, exponent, exponent_small_numbers)
 Converts a double precision real to a string. More...
 
subroutine conversions_mod::limit_to_decimal_places (string_to_parse, decimal_places)
 Helper subroutine which trims the string down to an upper limit of decimal places, with all numbers beyond this point removed. More...
 
subroutine conversions_mod::trim_trailing_zeros (string_to_parse, zeros_to_retain)
 A helper subroutine which trims training zeros from the string after a decimal place this is to make the string more readable when printed out. More...
 
character(len=5) function conversions_mod::logical_to_string (input)
 Converts a logical to a string. More...
 
logical function, pointer conversions_mod::generic_to_logical (generic, makecopy)
 Converts a generic to a logical. More...
 
logical function conversions_mod::string_to_logical (string)
 Converts a string to a logical. More...
 
logical function conversions_mod::integer_to_logical (input)
 Converts an integer to a logical. More...
 
logical function conversions_mod::real_to_logical (input)
 Converts a real to a logical. More...
 
real(kind=default_precision) function, pointer, public conversions_mod::generic_to_double_real (generic, makecopy)
 Converts a generic to a double real. More...
 
real function, pointer conversions_mod::generic_to_real (generic, makecopy)
 Converts a generic to a real. If this is infact an integer then will do a conversion and allocate pointed to this. More...
 
real function conversions_mod::string_to_real (string)
 Converts a string to a real. More...
 
real function conversions_mod::integer_to_real (input)
 Converts an integer to a real. More...
 
real function conversions_mod::logical_to_real (input)
 Converts a logical to a real. More...
 
integer function, pointer conversions_mod::generic_to_integer (generic, makecopy)
 Converts a generic to an integer. More...
 
integer function conversions_mod::string_to_integer (string)
 Converts a string to an integer. More...
 
integer function conversions_mod::real_to_integer (input)
 Converts a real to an integer. More...
 
integer function conversions_mod::logical_to_integer (input)
 Converts a logical to an integer. More...
 
class(*) function, pointer conversions_mod::string_to_generic (string, makecopy)
 Converts a string into its generic data representation. More...
 
class(*) function, pointer conversions_mod::integer_to_generic (input, makecopy)
 Converts an integer into its generic data representation. More...
 
class(*) function, pointer conversions_mod::real_single_to_generic (input, makecopy)
 Converts a single real into its generic data representation. More...
 
class(*) function, pointer conversions_mod::real_double_to_generic (input, makecopy)
 Converts a double real into its generic data representation. More...
 
class(*) function, pointer conversions_mod::logical_to_generic (input, makecopy)
 Converts a logical into its generic data representation. More...
 

Variables

logical conversions_mod::l_original_rounding = .False.
 
integer, parameter conversions_mod::real_rounding_precision =int(1e8)