Silverfrost Forums

Welcome to our forums

Assigning a 4 byte real to a 8 byte real

22 Jan 2014 9:25 #13598

Is it possible to assign a 4 byte real to a 8 byte real.

That is:

subroutine x (my_array_4)

real*4 my_array_4(512)
real*8 my_array_8(512)

do i =1,512

my_array_8(i)=my_array_4(i)

enddo

Is the above correct? Christy

23 Jan 2014 1:07 #13604

Yes, as long as my_array_4 and my_array_8 use different memory addresses. my_array_4 is 2048 bytes long, while my_array_8 id 4096 bytes long.

How do you return my_array_8 ?

John

23 Jan 2014 4:11 #13612

Thanks John

I will pass it as an argument-I missed showing this in the dummy code.

Thanks again..

Please login to reply.