At 08:23 30-11-2004 +0100, J-B Faure wrote:
>Hello,
>
>I guess there is a bug in len_trim() implementation in g95
>try these program :
>
> program test
> implicit none
> character*35 :: client
> open(unit=1,file='test.dat',form='formatted',status='old')
> read(1,'(a)') client
> write(*,*) len_trim(client)
> client = 'a character string'
> write(*,*) len_trim(client)
> stop
> end
>where test.dat contains the string :
>a character string
>
>When I compile test with g95 under w2k the results are 19 and 18.
>If you add blanks at the and of the line in the file, test counts these
>blank characters.
>With CVF 6.1a and ftn95 I get 18 and 18.
I compile and run this program under Win XP.
No problem, correct results. :-))
\---
Best regards,
Jan van Oosterwijk | "They that can give up essential liberty
Netherlands | to obtain a little temporary safety deserve
| neither liberty nor safety."
| -- Benjamin Franklin (1759)
write(*,*)transfer((/778985834,1869504886,1702130543,1785296754 &
&,1635205227,1868849518,1819160175 /),(/'x'/)) ; end
mailto:Jan <dot> vanOosterwijk <at> wanadoo <dot> NL
http://huizen <dot> dto <dot> tudelft <dot> nl/vanOosterwijk/
|