Variable dimensioning in fortran (now in C)

Leo de Wit leo at philmds.UUCP
Sun Jun 26 05:51:07 AEST 1988


In article <749 at naucse.UUCP> rrr at naucse.UUCP (Bob Rose ) writes:
>In article <517 at philmds.UUCP>, leo at 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++



More information about the Comp.lang.c mailing list