I've encountered a problem when scanning a string for NUL characters using the SCAN intrinsic function.
pos = scan(mystring, char(0))
always returns 0 when compiled with /64, whereas in 32 bit it returns the correct position. I tested with every character from 0-127 but only char(0) produces a wrong result.
See the following program:
program test
implicit none
character(10) :: myvar = 'hellohello'
integer :: i, pos
do i=0,127
myvar(5:5) = char(i) ! Replace character
pos = scan(myvar, char(i))
if (pos == 0) then
print '(a,i4,3a)', 'Warning: char', i ,'(', char(i), ') not found, this is not possible.'
endif
enddo
end program
Compiled with ftn95.exe /64 .\main.f90 /link, upon execution the output is empty (expected output).
When adding /64, the output is:
Warning: char 0( ) not found, this is not possible.
Regards, André
EDIT: The compiler version is 8.10.0