of course!

Brian Matthews blm at 6sceng.UUCP
Sun Dec 10 16:41:08 AEST 1989


In article <14738 at boulder.Colorado.EDU> bri at boulder.Colorado.EDU (Brian Ellis) writes:
|In article <563 at balthmus.tessi.UUCP> joey at tessi.UUCP (Joe Pruett) writes:
|>isadir(path)
|>char *path;
|>{
|>	char tpath[strlen(path) + 3];
|[deleted]
|	this declaration is not legal, though. You must give the size at
|	*compile* time. You'll get the error "constant expected"

Go back and read <563 at balthmus.tessi.UUCP> again.  The declaration is
one of gcc's extensions to C (all of which can be turned off, of course).
It's equivalent to

	char *tpath = alloca (strlen (path) + 3);
-- 
Brian L. Matthews	blm at 6sceng.UUCP



More information about the Comp.unix.wizards mailing list