Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix.readin.stringlength] Hotfix read-in long strings from parameter-file #52

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/readin/readintools.f90
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ SUBROUTINE FillStrings(IniFile)
!-----------------------------------------------------------------------------------------------------------------------------------
! LOCAL VARIABLES
TYPE(tString),POINTER :: Str1=>NULL(),Str2=>NULL() ! ?
CHARACTER(LEN=255) :: HelpStr,Str ! ?
CHARACTER(LEN=:),ALLOCATABLE :: HelpStr
CHARACTER(LEN=300) :: File ! ?
TYPE(Varying_String) :: aStr,bStr,Separator ! ?
INTEGER :: EOF ! ?
Expand Down Expand Up @@ -533,8 +533,6 @@ SUBROUTINE FillStrings(IniFile)
IF(.NOT.ASSOCIATED(Str1)) CALL GetNewString(Str1)
! Read line from file
CALL Get(103,aStr,iostat=EOF)
Str=aStr
!IPWRITE(*,*)'Reading: ',Str,EOF
IF (EOF.NE.IOSTAT_END) THEN
! Remove comments with "!"
CALL Split(aStr,Str1%Str,"!")
Expand All @@ -555,7 +553,8 @@ SUBROUTINE FillStrings(IniFile)
! Replace commas
Str1%Str=Replace(Str1%Str,","," ",Every=.true.)
! Lower case
CALL LowCase(CHAR(Str1%Str),HelpStr)
HelpStr = CHAR(Str1%Str) ! define HelpStr to set size of deferred-shape array
CALL LowCase(CHAR(Str1%Str),HelpStr) ! overwrite HelpStr without modifying size
! If we have a remainder (no comment only)
IF(LEN_TRIM(HelpStr).GT.2) THEN
Str1%Str=Var_Str(HelpStr)
Expand Down
Loading