mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Tue Dec 21, 2021 4:40 am Post subject: FTN95 8.83 issues false warning for substring expression |
|
|
The following function counts the number of decimal digits in a character variable.
Code: | integer function ndigit(s)
! count number of digits in character string
implicit none
character(len=*) :: s
integer i,j
j = 0
do i=1,len_trim(s)
if ( lge(s(i:i),'0') .and. lle(s(i:i),'9') )j=j+1
end do
ndigit = j
return
end function |
FTN95 8.83 says:
Code: | S:\LANG\FTN95>ftn95 ndigit.f90
[FTN95/Win32 Ver. 8.83.0 Copyright (c) Silverfrost Ltd 1993-2021]
WARNING S:\LANG\FTN95\ndigit.F90 8: Procedure expected for argument S.
WARNING S:\LANG\FTN95\ndigit.F90 8: Procedure expected for argument S.
NO ERRORS, 2 WARNINGS [<NDIGIT> FTN95 v8.83.0] |
|
|