libsim Versione 7.1.11
|
◆ word_split()
Split a line into words at a predefined character (default blank). Returns the number of words in input_string. If pointers word_start and word_end are provided, they are allocated with nword elements and set to the indices of initial and final character of every word in input_string. Groups of contiguous separation characters are treated as a single separator character.
Definizione alla linea 922 del file char_utilities.F90. 923!! to execute \c export \c COLUMNS before running the program, in
924!! order for this to work), otherwise it is set to 80. A positive
925!! value is returned in any case
926FUNCTION default_columns() RESULT(cols)
927INTEGER :: cols
928
929INTEGER, PARAMETER :: defaultcols = 80 ! default of the defaults
930INTEGER, PARAMETER :: maxcols = 256 ! maximum value
931CHARACTER(len=10) :: ccols
932
933cols = defaultcols
934CALL getenv('COLUMNS', ccols)
935IF (ccols == '') RETURN
936
937READ(ccols, '(I10)', err=100) cols
938cols = min(cols, maxcols)
939IF (cols <= 0) cols = defaultcols
940RETURN
941
942100 cols = defaultcols ! error in reading the value
943
944END FUNCTION default_columns
945
946
948FUNCTION suffixname ( Input_String ) RESULT ( Output_String )
949! -- Argument and result
950CHARACTER( * ), INTENT( IN ) :: Input_String
951CHARACTER( LEN( Input_String ) ) :: Output_String
952! -- Local variables
953INTEGER :: i
954
955output_string=""
957if (i > 0 .and. i < len(input_string)) output_string= input_string(i+1:)
958
959END FUNCTION suffixname
960
961
968elemental_unlessxlf FUNCTION wash_char(in, goodchar, badchar) RESULT(char)
969CHARACTER(len=*),INTENT(in) :: in
970CHARACTER(len=*),INTENT(in),OPTIONAL :: badchar
971CHARACTER(len=*),INTENT(in),OPTIONAL :: goodchar
972integer,allocatable :: igoodchar(:)
973integer,allocatable :: ibadchar(:)
974
975CHARACTER(len=len(in)) :: char,charr,charrr
976INTEGER :: i,ia,nchar
977
978char=""
979charr=""
980charrr=""
981
982if (present(goodchar)) then
983
|