[comp.lang.fortran] EQUIVALENCE or STRUCTURE/RECORD - SOLVED!

Gumley_LE@cc.curtin.edu.au (Liam Gumley) (01/11/91)

In article <6683.278c85d2@cc.curtin.edu.au>, Gumley_LE@cc.curtin.edu.au (Liam Gumley) writes:

The problem turned out to be fairly easy to solve, once someone explained
it to me.

The program should be structured thus

	program thingy

	byte buffer(100)

	.
	.
	.

	subroutine whatsit( buffer )

	structure / something /
	integer*2 dummy
	integer*4 data(0:80)
	end structure

	record / something / buffer

	item = buffer.data( 0 )

	.
	.
	.

You can now access the data in buffer properly as the array 'buffer.data'.
Thanks to those who took the time to respond (even though someone here
explained it to me....).

Cheers,
Liam.

-- 
Gumley_LE@cc.curtin.edu.au
#Liam E. Gumley, Department of Applied Physics, Curtin University of Technology#
#Perth, Western Australia.   >>>All opinions expressed are exclusively mine.<<<#