Path: utzoo!attcan!uunet!husc6!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: variable number of strings passed t Message-ID: <14510@mimsy.UUCP> Date: 12 Nov 88 06:19:41 GMT References: <434@tutor.UUCP> <225800083@uxe.cso.uiuc.edu> <17850@shemp.CS.UCLA.EDU> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 19 In article <17850@shemp.CS.UCLA.EDU> kirkaas@oahu.cs.ucla.edu (paul kirkaas) writes: >I had a whole set of vararg.h routines running happily on my AT&T Unix 3B1. >I ported them to a Pyramid where they crashed and burned on compilation. >So even using varargs is no guarantee of portability with variable >arguments. Varargs works fine on Pyramids. You must, of course, constrain yourself to use them in accordance with the manual, including avoiding things like for (va_start(ap); ; ) stmt; va_end(ap); which `look fine' on a casual scan but are not in fact legal. In fact, va_start compiles to one statement on the 3B, but includes a left brace and a declaration on the Pyramid. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris