shorter
This commit is contained in:
parent
aace5d25a8
commit
d9aa638ad7
|
@ -81,12 +81,7 @@ function IO_readlines(fileName) result(fileContent)
|
||||||
|
|
||||||
rawData = IO_read(fileName)
|
rawData = IO_read(fileName)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
N_lines = count([(rawData(l:l) == IO_EOL,l=1,len(rawData))])
|
||||||
! 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
|
|
||||||
allocate(fileContent(N_lines))
|
allocate(fileContent(N_lines))
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue