reading files

From: rand (joleg_at_noMAIL.it)
Date: 07/28/04


Date: Wed, 28 Jul 2004 11:53:32 +0200

I want to read a matrix in binary form like this:
122334
122333
233233
334455

My purpose is to read the matrix 3 character per times (also 8 or other) and
I do this:
character(3), allocatable :: matrix(:)
....
numbytes=3
irec=0
open(11,file=filename,status='unknown',form='unformatted',access='direct',re
cl=numbytes)
do i=1,numlines
irec=irec+1
read(11,rec=irec) matrix(i)
enddo

For the first line there are not problems. From the second...
matrix(1)=122
matrix(2)=334
matrix(3)=1 <----- because it reads also null characters and return
What can I do?
The problem could be solved reading the file so this:
122334122333233233334455
but this is not a solution.