Xref: utzoo comp.lang.fortran:810 comp.lang.c:10925
Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!philmds!leo
From: leo@philmds.UUCP (Leo de Wit)
Newsgroups: comp.lang.fortran,comp.lang.c
Subject: Re: Variable dimensioning in fortran (now in C)
Summary: Thanks for the light!
Keywords: language conversions, FORTRAN, c
Message-ID: <527@philmds.UUCP>
Date: 25 Jun 88 19:51:07 GMT
References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <517@philmds.UUCP> <749@naucse.UUCP>
Reply-To: leo@philmds.UUCP (L.J.M. de Wit)
Organization: Philips I&E DTS Eindhoven
Lines: 27

In article <749@naucse.UUCP> rrr@naucse.UUCP (Bob Rose ) writes:
>In article <517@philmds.UUCP>, leo@philmds.UUCP (Leo de Wit) writes:
>> [my example using calloc() deleted]
>Close, but ...  I assume you are using calloc to zero the array, but
>the whole world is not a VAX. Try:
>
> [Bob's example using malloc() deleted]

What makes you think calloc() is VAX-specific? I checked with K&R:
section 7.9 Storage Management contains calloc(); with Lattice C:
had also calloc(). Now sure my ST is fast but would you call it a
VAX??  Ultrix has calloc (see man 3 malloc) (and |Ultrix - BSD| < eps);
VAX-VMS has calloc (now there's a VAX); on my work calloc is in the
ansi.h header file we use for portability (so it should be in the ANSI
draft):

    extern void *calloc(size_t nmemb, size_t size);

I think you were mistaken with cfree() which is not as general (VAX-VMS
has it).

>Just fuel for the fire.
>                            -bob

Thanks! So I can light my cigar now 8-).

                   Leo++