|
◆ csv_record_getfield_char()
subroutine, private file_utilities::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 |
|
) |
| |
|
private |
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] | this | object to be decoded |
[out] | field | contents 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] | flen | actual length of the field including trailing blanks, it is correctly computed also when field is not provided or too short |
[out] | ier | error code, 0 = OK, 1 = field too short, 2 = end of record |
Definizione alla linea 789 del file file_utilities.F90.
789 READ(cfield, '(F32.0)', iostat=lier) field 792 IF (.NOT. PRESENT(ier)) THEN 793 CALL l4f_log(l4f_error, & 794 'in csv_record_getfield, invalid double precision field: '//trim(cfield)) 804 END SUBROUTINE csv_record_getfield_double 809 FUNCTION csv_record_end(this) 810 TYPE(csv_record), INTENT(IN) :: this 811 LOGICAL :: csv_record_end 813 csv_record_end = this%cursor > SIZE(this%record) 815 END FUNCTION csv_record_end 818 FUNCTION is_space_c(char) RESULT(is_space) 819 CHARACTER(len=1) :: char 822 is_space = (ichar(char) == 32 .OR. ichar(char) == 9) 824 END FUNCTION is_space_c 827 FUNCTION is_space_b(char) RESULT(is_space) 828 INTEGER(kind=int_b) :: char 831 is_space = (char == 32 .OR. char == 9) 833 END FUNCTION is_space_b 837 Utilities for managing files.
|