f77 question/space saver

Boyd Knosp knosp at umaxc.weeg.uiowa.edu
Thu Mar 1 12:00:29 AEST 1990


Why do I get this error using f77 on a 4D120GTX:

	Program x

	Implicit None

	Structure  	/test/
		Character*80	text
	End Structure

	Record		/test/	Myvar
	Integer*4	I

	Myvar.text="(Hello)"
	I=Index(Myvar.text,")")
	
	End

%f77 x.f
Error on line 16 of x.f: bad argument type to intrinsic index

Note: 	The same thing happens with other intrinsic functions when I
	try to pass subrecords to them.  If I assign to a temp var 
	and pass the temp var to the fn instead, it compiles fine...

f77 creates huge exectuables.  I reduce size by linking with shared
libs and 'strip'ing the labels out of them (once they're debugged).
It is nice to note that the old unix dynamic memory allocation trick
for FORTRAN works with the SGI compiler.  Dynamically allocating large
arrays also reduces f77 execuatble size.  (I have the source code if
anyone has need for dynamically allocated FORTRAN arrays)

Randy Frank
University of Iowa Image Analysis Facility
randy at tessa.iaf.uiowa.edu



More information about the Comp.sys.sgi mailing list