<CONVERT= Example Program>
Program convert_example Double Precision :: x(100), y(100) ! File "f1.dat" is in big-endian format. Open (10,File='f1.dat',Convert='Big_Endian',Form='Unformatted',Status='Old') ! File "f2.dat" is in little-endian format. Open (11,File='f2.dat',Convert='Little_Endian',Form='Unformatted',Status='Old') ! We will write the results in big-endian format. Open (12,File='fnew.dat',Convert='Big_Endian',Form='Unformatted',Status='Replace') Read (10) x Read (11) y Write (12) x + y ! Files close automatically at the end of the program. End Program