Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ns-mx!umaxc.weeg.uiowa.edu!knosp From: knosp@umaxc.weeg.uiowa.edu (Boyd Knosp) Newsgroups: comp.sys.sgi Subject: f77 question/space saver Message-ID: <765@ns-mx.uiowa.edu> Date: 1 Mar 90 01:00:29 GMT Sender: news@ns-mx.uiowa.edu Reply-To: randy@tessa.iaf.uiowa.edu (Randy Frank) Distribution: na Organization: U of Iowa, Iowa City, IA Lines: 36 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@tessa.iaf.uiowa.edu