HYPE
All Classes Namespaces Files Functions Variables Pages
Functions/Subroutines
convert Module Reference

Functions/Subroutines

subroutine, public lower_case (str, n)
 
subroutine, public scalar_lower_case (str)
 
character(len=length) function, public get_lower_case (length, inputstr)
 
subroutine, public scalar_upper_case (str)
 
subroutine, public string_convert_to_datetype (datestr, date)
 
integer function, public logical_convert_to_integer (logvar)
 
logical function, public integer_convert_to_logical (intvar)
 
character(len=length) function, public integer_convert_to_string (intvar, length)
 
subroutine, public write_integer_array_to_string (n, id, outtxt)
 
character(len=20) function, public int_to_str (i)
 
character(len=20) function, public real_to_str (r)
 
subroutine, public convert_string_to_real (strlen, str, output, ierr)
 
subroutine, public convert_string_to_integer (strlen, str, output, ierr)
 
subroutine, public convert_unclean_string_to_integer (str, output, ierr)
 

Detailed Description

Procedures for transforming between different variable types and between upper and lower case.

Function/Subroutine Documentation

◆ convert_string_to_integer()

subroutine, public convert::convert_string_to_integer ( integer, intent(in)  strlen,
character(len=strlen), intent(inout)  str,
integer, intent(out)  output,
integer, intent(out)  ierr 
)

Read integer value from string.

Parameters
[in]strlenlength of string
[in,out]strstring to convert
[out]outputinteger value of string
[out]ierrerror status
+ Here is the caller graph for this function:

◆ convert_string_to_real()

subroutine, public convert::convert_string_to_real ( integer, intent(in)  strlen,
character(len=strlen), intent(inout)  str,
real, intent(out)  output,
integer, intent(out)  ierr 
)

Read real value from string.

Parameters
[in]strlenlength of string
[in,out]strstring to convert
[out]outputreal value of string
[out]ierrerror status
+ Here is the caller graph for this function:

◆ convert_unclean_string_to_integer()

subroutine, public convert::convert_unclean_string_to_integer ( character(len=*), intent(in)  str,
integer, intent(out)  output,
integer, intent(out)  ierr 
)

Read integer value from unclean string.

Parameters
[in]strstring to convert
[out]outputinteger value of string
[out]ierrerror status
+ Here is the caller graph for this function:

◆ get_lower_case()

character(len=length) function, public convert::get_lower_case ( integer, intent(in)  length,
character(len=length), intent(in)  inputstr 
)

Transforms a string to all lowercase letters.

Parameters
[in]lengthcharacter string length
[in]inputstrcharacter string to convert
Returns
lower case string
+ Here is the caller graph for this function:

◆ int_to_str()

character(len=20) function, public convert::int_to_str ( integer, intent(in)  i)
Parameters
[in]iinteger value to be converted
Returns
string value
+ Here is the caller graph for this function:

◆ integer_convert_to_logical()

logical function, public convert::integer_convert_to_logical ( integer, intent(in)  intvar)

Turns integer to logical; 1 is true, other is false.

Parameters
[in]intvarinteger value to be converted
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ integer_convert_to_string()

character(len=length) function, public convert::integer_convert_to_string ( integer, intent(in)  intvar,
integer, intent(in)  length 
)

Turns integer (up to 9999) to string.

Parameters
[in]intvarinteger value to be converted
[in]lengthcharacter string length
Returns
string value
+ Here is the caller graph for this function:

◆ logical_convert_to_integer()

integer function, public convert::logical_convert_to_integer ( logical, intent(in)  logvar)

Turns logical to integer -1 for true and -2 for false.

Parameters
[in]logvarlogical value to be converted
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lower_case()

subroutine, public convert::lower_case ( character(len=*), dimension(n), intent(inout)  str,
integer, intent(in)  n 
)

Transforms a string array of dimension n to all lowercase letters.

Parameters
[in,out]strstring-array to convert
[in]ndimension of str
+ Here is the caller graph for this function:

◆ real_to_str()

character(len=20) function, public convert::real_to_str ( real, intent(in)  r)
Parameters
[in]rreal value to be converted
Returns
string value
+ Here is the caller graph for this function:

◆ scalar_lower_case()

subroutine, public convert::scalar_lower_case ( character(len=*), intent(inout)  str)

Transforms a string to all lowercase letters.

Parameters
[in,out]strstring to convert
+ Here is the caller graph for this function:

◆ scalar_upper_case()

subroutine, public convert::scalar_upper_case ( character(len=*), intent(inout)  str)

Transforms a string to capital letters.

Parameters
[in,out]strstring to convert
+ Here is the caller graph for this function:

◆ string_convert_to_datetype()

subroutine, public convert::string_convert_to_datetype ( character(len=*), intent(in)  datestr,
type(datetype), intent(out)  date 
)

Creates DateType object from date stored as string.

Handle date formats: yyyy, yyyy-mm, yyyymm, yyyy-mm-dd, yyyymmdd, yyyy-mm-dd hh:mm, yyyymmddhhmm. For year and months, the date is set ot the first of the year or month.

Parameters
[in]datestrstring containing a date
[out]datedatetype object corresponding to datestr
+ Here is the caller graph for this function:

◆ write_integer_array_to_string()

subroutine, public convert::write_integer_array_to_string ( integer, intent(in)  n,
integer, dimension(n), intent(in)  id,
character(len=*), intent(out)  outtxt 
)

Print integer ids to string with blanks in between. Continuation marks for too many integers.

Parameters
[in]nnumber of data
[in]idid data
[out]outtxtoutput string
+ Here is the caller graph for this function: