From d9aa638ad7643feb76916afc12f22c0a385ae093 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 22 Jul 2021 15:11:38 +0200 Subject: [PATCH] shorter --- src/IO.f90 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index 3fbeb4300..399e2e6df 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -81,12 +81,7 @@ function IO_readlines(fileName) result(fileContent) rawData = IO_read(fileName) -!-------------------------------------------------------------------------------------------------- -! count lines to allocate string array - N_lines = 0 - do l=1, len(rawData) - if (rawData(l:l) == IO_EOL) N_lines = N_lines+1 - enddo + N_lines = count([(rawData(l:l) == IO_EOL,l=1,len(rawData))]) allocate(fileContent(N_lines)) !-------------------------------------------------------------------------------------------------- @@ -261,7 +256,7 @@ pure function IO_lc(string) do i=1,len(string) n = index(UPPER,string(i:i)) - if(n/=0) then + if (n/=0) then IO_lc(i:i) = LOWER(n:n) else IO_lc(i:i) = string(i:i)