Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!cca!ima!inmet!rgh From: rgh@inmet.UUCP Newsgroups: net.lang.c Subject: Re: Re: mixing pointers and arrays (arra - (nf) Message-ID: <270@inmet.UUCP> Date: Sat, 20-Aug-83 05:49:47 EDT Article-I.D.: inmet.270 Posted: Sat Aug 20 05:49:47 1983 Date-Received: Sun, 21-Aug-83 06:20:01 EDT Lines: 22 #R:gatech:-37800:inmet:5000004:000:602 inmet!rgh Aug 19 08:46:00 1983 The basic problem with passing arrays as values in C is that in general you don't know how big the array is. Consider: int a[20]; /* here you know */ extern int b[]; /* no telling */ f(c) int c[]; /* can't tell */ { } Pascal treats the length of an array as part of its type. However, this is everybody's least favorite feature of the language, since it makes general array-handling subroutines impossible to write. The length of a structure is determinable from its declaration, so this problem doesn't arise for structures. Randy Hudson {harpo,ima}!inmet!rgh