Afivo  0.3
Data Types | Functions/Subroutines | Variables
m_config Module Reference

Module that allows working with a configuration file. More...

Data Types

type  cfg_var_t
 The type of a configuration variable. More...
 
type  cfg_t
 The configuration that contains all the variables. More...
 
interface  cfg_add
 Interface to add variables to the configuration. More...
 
interface  cfg_get
 Interface to get variables from the configuration. More...
 
interface  cfg_add_get
 Interface to get variables from the configuration. More...
 

Functions/Subroutines

subroutine, public cfg_update_from_arguments (cfg, ignore_unknown)
 Read command line arguments. Both files and variables can be specified, for example as: ./my_program config.cfg -n_runs=3. More...
 
subroutine, public cfg_update_from_line (cfg, line)
 Update the configuration by parsing a line. More...
 
subroutine handle_error (err_string)
 This routine will be called if an error occurs in one of the subroutines of this module. More...
 
subroutine get_var_index (cfg, var_name, ix)
 Return the index of the variable with name 'var_name', or -1 if not found. More...
 
subroutine, public cfg_read_file (cfg, filename)
 Update the variables in the configartion with the values found in 'filename'. More...
 
subroutine parse_line (cfg, set_by, line_arg, valid_syntax, category_arg)
 Update the cfg by parsing one line. More...
 
subroutine read_variable (var)
 
subroutine trim_comment (line, comment_chars)
 
subroutine, public cfg_check (cfg)
 
subroutine, public cfg_write (cfg_in, filename, hide_unused, custom_first)
 This routine writes the current configuration to a file with descriptions. More...
 
subroutine, public cfg_write_markdown (cfg_in, filename, hide_unused)
 This routine writes the current configuration to a markdown file. More...
 
subroutine split_category (variable, category, var_name)
 
subroutine resize_storage (variable)
 Resize the storage size of variable, which can be of type integer, logical, real or character. More...
 
subroutine prepare_store_var (cfg, var_name, var_type, var_size, description, ix, dynamic_size)
 Helper routine to store variables. This is useful because a lot of the same code is executed for the different types of variables. More...
 
subroutine prepare_get_var (cfg, var_name, var_type, var_size, ix)
 Helper routine to get variables. This is useful because a lot of the same code is executed for the different types of variables. More...
 
subroutine add_real (cfg, var_name, real_data, comment)
 Add a configuration variable with a real value. More...
 
subroutine add_real_array (cfg, var_name, real_data, comment, dynamic_size)
 Add a configuration variable with an array of type. More...
 
subroutine add_int (cfg, var_name, int_data, comment)
 Add a configuration variable with an integer value. More...
 
subroutine add_int_array (cfg, var_name, int_data, comment, dynamic_size)
 Add a configuration variable with an array of type integer. More...
 
subroutine add_string (cfg, var_name, char_data, comment)
 Add a configuration variable with an character value. More...
 
subroutine add_string_array (cfg, var_name, char_data, comment, dynamic_size)
 Add a configuration variable with an array of type character. More...
 
subroutine add_logic (cfg, var_name, logic_data, comment)
 Add a configuration variable with an logical value. More...
 
subroutine add_logic_array (cfg, var_name, logic_data, comment, dynamic_size)
 Add a configuration variable with an array of type logical. More...
 
subroutine get_real_array (cfg, var_name, real_data)
 Get a real array of a given name. More...
 
subroutine get_int_array (cfg, var_name, int_data)
 Get a integer array of a given name. More...
 
subroutine get_string_array (cfg, var_name, char_data)
 Get a character array of a given name. More...
 
subroutine get_logic_array (cfg, var_name, logic_data)
 Get a logical array of a given name. More...
 
subroutine get_real (cfg, var_name, res)
 Get a real value of a given name. More...
 
subroutine get_int (cfg, var_name, res)
 Get a integer value of a given name. More...
 
subroutine get_logic (cfg, var_name, res)
 Get a logical value of a given name. More...
 
subroutine get_string (cfg, var_name, res)
 Get a character value of a given name. More...
 
subroutine add_get_real_array (cfg, var_name, real_data, comment, dynamic_size)
 Get or add a real array of a given name. More...
 
subroutine add_get_int_array (cfg, var_name, int_data, comment, dynamic_size)
 Get or add a integer array of a given name. More...
 
subroutine add_get_string_array (cfg, var_name, char_data, comment, dynamic_size)
 Get or add a character array of a given name. More...
 
subroutine add_get_logic_array (cfg, var_name, logic_data, comment, dynamic_size)
 Get or add a logical array of a given name. More...
 
subroutine add_get_real (cfg, var_name, real_data, comment)
 Get or add a real value of a given name. More...
 
subroutine add_get_int (cfg, var_name, int_data, comment)
 Get or add a integer value of a given name. More...
 
subroutine add_get_logic (cfg, var_name, logical_data, comment)
 Get or add a logical value of a given name. More...
 
subroutine add_get_string (cfg, var_name, string_data, comment)
 Get a character value of a given name. More...
 
subroutine, public cfg_get_size (cfg, var_name, res)
 Get the size of a variable. More...
 
subroutine, public cfg_get_type (cfg, var_name, res)
 Get the type of a given variable of a configuration type. More...
 
subroutine ensure_free_storage (cfg)
 Routine to ensure that enough storage is allocated for the configuration type. If not the new size will be twice as much as the current size. If no storage is allocated yet a minumum amount of starage is allocated. More...
 
subroutine get_fields_string (line, delims, n_max, n_found, ixs_start, ixs_end)
 Routine to find the indices of entries in a string. More...
 
subroutine binary_search_variable (cfg, var_name, ix)
 Performa a binary search for the variable 'var_name'. More...
 
subroutine, public cfg_sort (cfg)
 Sort the variables for faster lookup. More...
 
recursive subroutine qsort_config (list)
 Simple implementation of quicksort algorithm to sort the variable list alphabetically. More...
 
subroutine parition_var_list (list, marker)
 Helper routine for quicksort, to perform partitioning. More...
 
subroutine, public cfg_clear (cfg)
 Clear all data from a CFG_t object, so that it can be reused. Note that this also happens automatically when such an object goes out of scope. More...
 

Variables

integer, parameter dp = kind(0.0d0)
 The double precision kind-parameter. More...
 
integer, parameter cfg_num_types = 4
 Number of variable types. More...
 
integer, parameter, public cfg_integer_type = 1
 Integer type. More...
 
integer, parameter, public cfg_real_type = 2
 Real number type. More...
 
integer, parameter, public cfg_string_type = 3
 String type. More...
 
integer, parameter, public cfg_logic_type = 4
 Boolean/logical type. More...
 
integer, parameter cfg_unknown_type = 0
 Used before a variable is created. More...
 
integer, parameter cfg_set_by_default = 1
 Indicates a variable has its default value. More...
 
integer, parameter cfg_set_by_arg = 2
 Indicates a variable was set by a command line argument. More...
 
integer, parameter cfg_set_by_file = 3
 Indicates a variable was set by reading a file. More...
 
character(len=10), dimension(0:cfg_num_types), parameter, public cfg_type_names = [character(len=10) :: "storage", "integer", "real", "string ", "logical"]
 Names of the types. More...
 
integer, parameter, public cfg_name_len = 80
 Maximum length of variable names. More...
 
integer, parameter, public cfg_string_len = 200
 Fixed length of string type. More...
 
integer, parameter, public cfg_max_array_size = 1000
 Maximum number of entries in a variable (if it's an array) More...
 
character, parameter tab_char = char(9)
 
character(len= *), parameter cfg_separators = " ,'"""//tab_char
 The separator(s) for array-like variables (space, comma, ', ", and tab) More...
 
character(len= *), parameter cfg_category_separator = "%"
 The separator for categories (stored in var_name) More...
 
character(len= *), parameter unstored_data_string = "__UNSTORED_DATA_STRING"
 The default string for data that is not yet stored. More...
 

Detailed Description

Module that allows working with a configuration file.

Author: Jannis Teunissen and others Repository: https://github.com/jannisteunissen/config_fortran

Function/Subroutine Documentation

◆ cfg_update_from_arguments()

subroutine, public m_config::cfg_update_from_arguments ( type(cfg_t), intent(inout)  cfg,
logical, intent(in), optional  ignore_unknown 
)

Read command line arguments. Both files and variables can be specified, for example as: ./my_program config.cfg -n_runs=3.

config files should have an extension .cfg or .txt command line arguments should be preceded by a single dash

Parameters
[in]ignore_unknownIgnore unknown arguments (default: false)

Definition at line 142 of file m_config.f90.

◆ cfg_update_from_line()

subroutine, public m_config::cfg_update_from_line ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  line 
)

Update the configuration by parsing a line.

Definition at line 180 of file m_config.f90.

◆ handle_error()

subroutine m_config::handle_error ( character(len=*), intent(in)  err_string)
private

This routine will be called if an error occurs in one of the subroutines of this module.

Definition at line 195 of file m_config.f90.

◆ get_var_index()

subroutine m_config::get_var_index ( type(cfg_t), intent(in)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(out)  ix 
)
private

Return the index of the variable with name 'var_name', or -1 if not found.

Definition at line 207 of file m_config.f90.

◆ cfg_read_file()

subroutine, public m_config::cfg_read_file ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  filename 
)

Update the variables in the configartion with the values found in 'filename'.

Definition at line 229 of file m_config.f90.

◆ parse_line()

subroutine m_config::parse_line ( type(cfg_t), intent(inout)  cfg,
integer, intent(in)  set_by,
character(len=*), intent(in)  line_arg,
logical, intent(out)  valid_syntax,
character(len=cfg_name_len), intent(inout), optional  category_arg 
)
private

Update the cfg by parsing one line.

Parameters
[in]set_byWhere the line came from
[in]line_argLine to parse
[in,out]category_argThe category

Definition at line 273 of file m_config.f90.

◆ read_variable()

subroutine m_config::read_variable ( type(cfg_var_t), intent(inout)  var)
private

Definition at line 368 of file m_config.f90.

◆ trim_comment()

subroutine m_config::trim_comment ( character(len=*), intent(inout)  line,
character(len=*), intent(in)  comment_chars 
)
private

Definition at line 419 of file m_config.f90.

◆ cfg_check()

subroutine, public m_config::cfg_check ( type(cfg_t), intent(in)  cfg)

Definition at line 449 of file m_config.f90.

◆ cfg_write()

subroutine, public m_config::cfg_write ( type(cfg_t), intent(in)  cfg_in,
character(len=*), intent(in)  filename,
logical, intent(in), optional  hide_unused,
logical, intent(in), optional  custom_first 
)

This routine writes the current configuration to a file with descriptions.

Parameters
[in]hide_unusedHide variables whose value was not requested
[in]custom_firstShow user-set variables first (default: false)

Definition at line 464 of file m_config.f90.

◆ cfg_write_markdown()

subroutine, public m_config::cfg_write_markdown ( type(cfg_t), intent(in)  cfg_in,
character(len=*), intent(in)  filename,
logical, intent(in), optional  hide_unused 
)

This routine writes the current configuration to a markdown file.

Definition at line 599 of file m_config.f90.

◆ split_category()

subroutine m_config::split_category ( type(cfg_var_t), intent(in)  variable,
character(cfg_name_len), intent(out)  category,
character(cfg_name_len), intent(out)  var_name 
)

Definition at line 694 of file m_config.f90.

◆ resize_storage()

subroutine m_config::resize_storage ( type(cfg_var_t), intent(inout)  variable)
private

Resize the storage size of variable, which can be of type integer, logical, real or character.

Definition at line 714 of file m_config.f90.

◆ prepare_store_var()

subroutine m_config::prepare_store_var ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(in)  var_type,
integer, intent(in)  var_size,
character(len=*), intent(in)  description,
integer, intent(out)  ix,
logical, intent(in), optional  dynamic_size 
)
private

Helper routine to store variables. This is useful because a lot of the same code is executed for the different types of variables.

Parameters
[out]ixIndex of variable

Definition at line 735 of file m_config.f90.

◆ prepare_get_var()

subroutine m_config::prepare_get_var ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(in)  var_type,
integer, intent(in)  var_size,
integer, intent(out)  ix 
)
private

Helper routine to get variables. This is useful because a lot of the same code is executed for the different types of variables.

Definition at line 787 of file m_config.f90.

◆ add_real()

subroutine m_config::add_real ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
real(dp), intent(in)  real_data,
character(len=*), intent(in)  comment 
)
private

Add a configuration variable with a real value.

Definition at line 815 of file m_config.f90.

◆ add_real_array()

subroutine m_config::add_real_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
real(dp), dimension(:), intent(in)  real_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Add a configuration variable with an array of type.

Definition at line 832 of file m_config.f90.

◆ add_int()

subroutine m_config::add_int ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(in)  int_data,
character(len=*), intent(in)  comment 
)
private

Add a configuration variable with an integer value.

Definition at line 850 of file m_config.f90.

◆ add_int_array()

subroutine m_config::add_int_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, dimension(:), intent(in)  int_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Add a configuration variable with an array of type integer.

Definition at line 866 of file m_config.f90.

◆ add_string()

subroutine m_config::add_string ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
character(len=*), intent(in)  char_data,
character(len=*), intent(in)  comment 
)
private

Add a configuration variable with an character value.

Definition at line 884 of file m_config.f90.

◆ add_string_array()

subroutine m_config::add_string_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
character(len=*), dimension(:), intent(in)  char_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Add a configuration variable with an array of type character.

Definition at line 898 of file m_config.f90.

◆ add_logic()

subroutine m_config::add_logic ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
logical, intent(in)  logic_data,
character(len=*), intent(in)  comment 
)
private

Add a configuration variable with an logical value.

Definition at line 916 of file m_config.f90.

◆ add_logic_array()

subroutine m_config::add_logic_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
logical, dimension(:), intent(in)  logic_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Add a configuration variable with an array of type logical.

Definition at line 932 of file m_config.f90.

◆ get_real_array()

subroutine m_config::get_real_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
real(dp), dimension(:), intent(inout)  real_data 
)
private

Get a real array of a given name.

Definition at line 951 of file m_config.f90.

◆ get_int_array()

subroutine m_config::get_int_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, dimension(:), intent(inout)  int_data 
)
private

Get a integer array of a given name.

Definition at line 963 of file m_config.f90.

◆ get_string_array()

subroutine m_config::get_string_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
character(len=*), dimension(:), intent(inout)  char_data 
)
private

Get a character array of a given name.

Definition at line 975 of file m_config.f90.

◆ get_logic_array()

subroutine m_config::get_logic_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
logical, dimension(:), intent(inout)  logic_data 
)
private

Get a logical array of a given name.

Definition at line 987 of file m_config.f90.

◆ get_real()

subroutine m_config::get_real ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
real(dp), intent(out)  res 
)
private

Get a real value of a given name.

Definition at line 999 of file m_config.f90.

◆ get_int()

subroutine m_config::get_int ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(inout)  res 
)
private

Get a integer value of a given name.

Definition at line 1010 of file m_config.f90.

◆ get_logic()

subroutine m_config::get_logic ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
logical, intent(out)  res 
)
private

Get a logical value of a given name.

Definition at line 1021 of file m_config.f90.

◆ get_string()

subroutine m_config::get_string ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
character(len=*), intent(out)  res 
)
private

Get a character value of a given name.

Definition at line 1032 of file m_config.f90.

◆ add_get_real_array()

subroutine m_config::add_get_real_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
real(dp), dimension(:), intent(inout)  real_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Get or add a real array of a given name.

Definition at line 1043 of file m_config.f90.

◆ add_get_int_array()

subroutine m_config::add_get_int_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, dimension(:), intent(inout)  int_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Get or add a integer array of a given name.

Definition at line 1055 of file m_config.f90.

◆ add_get_string_array()

subroutine m_config::add_get_string_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
character(len=*), dimension(:), intent(inout)  char_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Get or add a character array of a given name.

Definition at line 1067 of file m_config.f90.

◆ add_get_logic_array()

subroutine m_config::add_get_logic_array ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
logical, dimension(:), intent(inout)  logic_data,
character(len=*), intent(in)  comment,
logical, intent(in), optional  dynamic_size 
)
private

Get or add a logical array of a given name.

Definition at line 1079 of file m_config.f90.

◆ add_get_real()

subroutine m_config::add_get_real ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
real(dp), intent(inout)  real_data,
character(len=*), intent(in)  comment 
)
private

Get or add a real value of a given name.

Definition at line 1091 of file m_config.f90.

◆ add_get_int()

subroutine m_config::add_get_int ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(inout)  int_data,
character(len=*), intent(in)  comment 
)
private

Get or add a integer value of a given name.

Definition at line 1101 of file m_config.f90.

◆ add_get_logic()

subroutine m_config::add_get_logic ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
logical, intent(inout)  logical_data,
character(len=*), intent(in)  comment 
)
private

Get or add a logical value of a given name.

Definition at line 1111 of file m_config.f90.

◆ add_get_string()

subroutine m_config::add_get_string ( type(cfg_t), intent(inout)  cfg,
character(len=*), intent(in)  var_name,
character(len=*), intent(inout)  string_data,
character(len=*), intent(in)  comment 
)
private

Get a character value of a given name.

Definition at line 1121 of file m_config.f90.

◆ cfg_get_size()

subroutine, public m_config::cfg_get_size ( type(cfg_t), intent(in)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(out)  res 
)

Get the size of a variable.

Definition at line 1131 of file m_config.f90.

◆ cfg_get_type()

subroutine, public m_config::cfg_get_type ( type(cfg_t), intent(in)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(out)  res 
)

Get the type of a given variable of a configuration type.

Definition at line 1147 of file m_config.f90.

◆ ensure_free_storage()

subroutine m_config::ensure_free_storage ( type(cfg_t), intent(inout)  cfg)
private

Routine to ensure that enough storage is allocated for the configuration type. If not the new size will be twice as much as the current size. If no storage is allocated yet a minumum amount of starage is allocated.

Definition at line 1166 of file m_config.f90.

◆ get_fields_string()

subroutine m_config::get_fields_string ( character(len=*), intent(in)  line,
character(len=*), intent(in)  delims,
integer, intent(in)  n_max,
integer, intent(inout)  n_found,
integer, dimension(n_max), intent(inout)  ixs_start,
integer, dimension(n_max), intent(inout)  ixs_end 
)
private

Routine to find the indices of entries in a string.

Parameters
[in]lineThe line from which we want to read
[in]delimsA string with delimiters. For example delims = " ,'"""//tab_char
[in]n_maxMaximum number of entries to read in
[in,out]n_foundNumber of entries found
[in,out]ixs_startOn return, ix_start(i) holds the starting point of entry i
[in,out]ixs_endOn return, ix_end(i) holds the end point of entry i

Definition at line 1190 of file m_config.f90.

◆ binary_search_variable()

subroutine m_config::binary_search_variable ( type(cfg_t), intent(in)  cfg,
character(len=*), intent(in)  var_name,
integer, intent(out)  ix 
)
private

Performa a binary search for the variable 'var_name'.

Definition at line 1233 of file m_config.f90.

◆ cfg_sort()

subroutine, public m_config::cfg_sort ( type(cfg_t), intent(inout)  cfg)

Sort the variables for faster lookup.

Definition at line 1261 of file m_config.f90.

◆ qsort_config()

recursive subroutine m_config::qsort_config ( type(cfg_var_t), dimension(:), intent(inout)  list)
private

Simple implementation of quicksort algorithm to sort the variable list alphabetically.

Definition at line 1269 of file m_config.f90.

◆ parition_var_list()

subroutine m_config::parition_var_list ( type(cfg_var_t), dimension(:), intent(inout)  list,
integer, intent(out)  marker 
)
private

Helper routine for quicksort, to perform partitioning.

Definition at line 1281 of file m_config.f90.

◆ cfg_clear()

subroutine, public m_config::cfg_clear ( type(cfg_t cfg)

Clear all data from a CFG_t object, so that it can be reused. Note that this also happens automatically when such an object goes out of scope.

Definition at line 1323 of file m_config.f90.

Variable Documentation

◆ dp

integer, parameter m_config::dp = kind(0.0d0)
private

The double precision kind-parameter.

Definition at line 11 of file m_config.f90.

◆ cfg_num_types

integer, parameter m_config::cfg_num_types = 4
private

Number of variable types.

Definition at line 13 of file m_config.f90.

◆ cfg_integer_type

integer, parameter, public m_config::cfg_integer_type = 1

Integer type.

Definition at line 14 of file m_config.f90.

◆ cfg_real_type

integer, parameter, public m_config::cfg_real_type = 2

Real number type.

Definition at line 15 of file m_config.f90.

◆ cfg_string_type

integer, parameter, public m_config::cfg_string_type = 3

String type.

Definition at line 16 of file m_config.f90.

◆ cfg_logic_type

integer, parameter, public m_config::cfg_logic_type = 4

Boolean/logical type.

Definition at line 17 of file m_config.f90.

◆ cfg_unknown_type

integer, parameter m_config::cfg_unknown_type = 0
private

Used before a variable is created.

Definition at line 18 of file m_config.f90.

◆ cfg_set_by_default

integer, parameter m_config::cfg_set_by_default = 1
private

Indicates a variable has its default value.

Definition at line 21 of file m_config.f90.

◆ cfg_set_by_arg

integer, parameter m_config::cfg_set_by_arg = 2
private

Indicates a variable was set by a command line argument.

Definition at line 23 of file m_config.f90.

◆ cfg_set_by_file

integer, parameter m_config::cfg_set_by_file = 3
private

Indicates a variable was set by reading a file.

Definition at line 25 of file m_config.f90.

◆ cfg_type_names

character(len=10), dimension(0:cfg_num_types), parameter, public m_config::cfg_type_names = [character(len=10) :: "storage", "integer", "real", "string ", "logical"]

Names of the types.

Definition at line 28 of file m_config.f90.

◆ cfg_name_len

integer, parameter, public m_config::cfg_name_len = 80

Maximum length of variable names.

Definition at line 31 of file m_config.f90.

◆ cfg_string_len

integer, parameter, public m_config::cfg_string_len = 200

Fixed length of string type.

Definition at line 32 of file m_config.f90.

◆ cfg_max_array_size

integer, parameter, public m_config::cfg_max_array_size = 1000

Maximum number of entries in a variable (if it's an array)

Definition at line 35 of file m_config.f90.

◆ tab_char

character, parameter m_config::tab_char = char(9)
private

Definition at line 37 of file m_config.f90.

◆ cfg_separators

character(len=*), parameter m_config::cfg_separators = " ,'"""//tab_char
private

The separator(s) for array-like variables (space, comma, ', ", and tab)

Definition at line 40 of file m_config.f90.

◆ cfg_category_separator

character(len=*), parameter m_config::cfg_category_separator = "%"
private

The separator for categories (stored in var_name)

Definition at line 43 of file m_config.f90.

◆ unstored_data_string

character(len=*), parameter m_config::unstored_data_string = "__UNSTORED_DATA_STRING"
private

The default string for data that is not yet stored.

Definition at line 46 of file m_config.f90.