Newbie to gfortran needs a little help

Mark Hounschell markh@compro.net
Wed Jan 16 17:36:00 GMT 2013


On 01/15/2013 04:27 PM, jimmie.davis@l-3com.com wrote:
>           integer*4 val
>
>           character*4 cval
>
>           equivalence (val,cval)
>
>           cval = 'ABCD'
>
> 20    format('val = 0x',Z8)
>
>            write(6,20) val
>
>           end
>
>
>
>
>
> Not sure of what you were trying to accomplish.    Does the equivalence
> do anything for you ?
>

What I'm trying to accomplish is to port this old code to Linux. For 
this particular example, Equivalence does the same thing. That was my 
first thing to try. I can only assume this is an Endian issue and I will 
have to deal with it some other way and would have seen it sooner or 
later even if gfortran did allow me to do it with "val = 'ABCD'. Some of 
these variables are seen on other machines that are big endian, some are 
not.

Thanks
Mark



More information about the Gcc-help mailing list