Re: How to transfer a file in an array



Terence <tbwright@xxxxxxxxx> wrote:

Another ways is just
a) read the bytes into a character array, using one or more unformatted
reads,
b) then read the character array internally as formated integers, using
a format of (nI1).
c) then add 128 to all negative values resulting

What I would do however, is overdefine a character CX and an integer*2
variable ICX (possible using equivalence), initalizing the integer ICX
to 0 then:-
a) read the n bytes into a character array c(n), using one or more
unformatted reads,
b) convert the characters to integer array INT(n):-.

ICX=0
do 1 i=1,n
CX=c(i)
INT(i)=ICX
endo

Thank you very much to all.
.