libsim  Versione6.3.0

◆ csv_record_getfield_char()

subroutine csv_record_getfield_char ( type(csv_record), intent(inout)  this,
character(len=*), intent(out), optional  field,
integer, intent(out), optional  flen,
integer, intent(out), optional  ier 
)

Returns next field from the record this as a CHARACTER variable.

The field pointer is advanced to the next field. If all the fields have already been interpreted it returns an empty string anyway; in order to verify the end-of-record condition the ier parameter must be used.

Parametri
[in,out]thisobject to be decoded
[out]fieldcontents of the field, if not provided, the field pointer is increased only; if the variable is not long enough, a warning is printed and the part that fits is returned; the variable is space-terminated anyway, so the flen parameter has to be used in order to evaluate possible significant trailing spaces
[out]flenactual length of the field including trailing blanks, it is correctly computed also when field is not provided or too short
[out]iererror code, 0 = OK, 1 = field too short, 2 = end of record

Definizione alla linea 804 del file file_utilities.F90.

804 END SUBROUTINE csv_record_getfield_double
805 
806 
809 FUNCTION csv_record_end(this)
810 TYPE(csv_record), INTENT(IN) :: this
811 LOGICAL :: csv_record_end
812 
813 csv_record_end = this%cursor > SIZE(this%record)
814 
815 END FUNCTION csv_record_end
816 
817 
818 FUNCTION is_space_c(char) RESULT(is_space)
819 CHARACTER(len=1) :: char
820 LOGICAL :: is_space
821 
822 is_space = (ichar(char) == 32 .OR. ichar(char) == 9) ! improve
823 
824 END FUNCTION is_space_c
825 
826 
827 FUNCTION is_space_b(char) RESULT(is_space)
828 INTEGER(kind=int_b) :: char
829 LOGICAL :: is_space
830 
831 is_space = (char == 32 .OR. char == 9) ! improve
832 
833 END FUNCTION is_space_b
834 
835 
836 END MODULE file_utilities
837 
Utilities for managing files.

Generated with Doxygen.