[comp.sys.dec] f77 compiler on DS3100 is missing falloc

ajt@mace.cc.purdue.edu (Andy Thomas) (10/11/89)

  I have a DEC Station 3100.  It seems that the f77 libraries are missing
the falloc, malloc, and free routines.  They are in the printed manual,
and the online ("man") documentation, but are not actually in the libraries.
Does anybody know why these routines are missing?  Are they going to be
included in a future release?  Any suggestions on how make my own routines?
The DS3100 is running Ultrix Workstation 2.0 and the compiler says (f77 -V)
that it is MIPS 1.31.  Thanks.

Andy Thomas
ajt@bilbo.bio.purdue.edu
ajt@mace.cc.purdue.edu

lilian@mips.COM (Lilian Leung) (10/12/89)

In article <3318@mace.cc.purdue.edu>, ajt@mace.cc.purdue.edu (Andy Thomas) writes:
> 
>   I have a DEC Station 3100.  It seems that the f77 libraries are missing
> the falloc, malloc, and free routines.  They are in the printed manual,
> and the online ("man") documentation, but are not actually in the libraries.
> Does anybody know why these routines are missing?  Are they going to be
> included in a future release?  Any suggestions on how make my own routines?
> The DS3100 is running Ultrix Workstation 2.0 and the compiler says (f77 -V)
> that it is MIPS 1.31.  Thanks.
> 
> Andy Thomas
> ajt@bilbo.bio.purdue.edu
> ajt@mace.cc.purdue.edu

I am not sure about DEC's FORTRAN manual and its "man" doc., but Mips' 1.31
FORTRAN manual and "man" page have NO references of falloc(), malloc() and
free() at all.  Mips' 1.31 FORTRAN compiler does not support POINTER type, so
there was no need for us to support those routines.  Mips' 2.0 FORTRAN
compiler, on the other hand, supports POINTER type, so it also supports
the routines malloc() and free().  If you really want to use those routines,
I suggest writing the routines in C and have FORTRAN interfaced with them.




-- 
UUCP:	{ames,decwrl,prls,pyramid}!mips!lilian	(or lilian@mips.com)
DDD:	408-991-7848 Lilian Leung		(or 408-720-1700, Ext. 848)
USPS:	MIPS Computer Systems, 930 Arques, Sunnyvale, CA 94086-3650

calvin@dinkum.wpd.sgi.com (Calvin H. Vu) (10/12/89)

> In article <3318@mace.cc.purdue.edu>, ajt@mace.cc.purdue.edu (Andy Thomas) writes:
> > 
> > included in a future release?  Any suggestions on how make my own routines?
> > 
> > Andy Thomas
> > ajt@bilbo.bio.purdue.edu
> > ajt@mace.cc.purdue.edu
> 
	Writing your own routine is easy.  This is about the long and short
	of it (not tested, though):

	#include <malloc.h>
	long malloc_( nbytes )
	    long *nbytes;
	{
		return((long)malloc(*nbytes));
	}

	but using it is a little bit more tricky.   Say, if you want to 
	allocate a character string of 'numbytes':

	myspace = malloc(numbytes)
	call sub( %val(myspace), %val(numbytes) )
	
	........
	subroutine sub( charstr )
	character*(*) charstr
C 	CHARSTR should be a string of numbytes long with the space
C	allocated for it by the malloc call
	return
	end
----------------
Calvin Vu
Silicon Graphics
calvin@wpd.sgi.com