Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!hplabs!hpda!hpisoa2!hpitg!chronon!eric@chronon From: eric@chronon Newsgroups: net.lang.c Subject: Re: varargs Message-ID: <237@chronon> Date: Thu, 1-May-86 23:57:00 EDT Article-I.D.: chronon.237 Posted: Thu May 1 23:57:00 1986 Date-Received: Tue, 13-May-86 01:13:50 EDT References: <293@usc-obero> Lines: 17 Sorry, but I left out an important point from my previous posting about vararg difficulties. My article should in no way be construed as arguing against allowing a variable number of arguments being passed to a called function. Rather, it points out that code that *ASSUMES* that varargs are passed in memory in ascending addresses *IS A HIGHLY MACHINE-DEPENDENT ASSUMPTION* and is *NOT PORTABLE CODE*. Library support to handle variable argument lists in a standardized way is appropriate (see varargs.h on BSD systems for something which comes very close). These library routines are quite simple on a traditional architecture (which is assumed by too many existing pieces of code -- printf is too many already!). -- Eric Black "Garbage In, Gospel Out" UUCP: {sun,pyramid,hplabs,amdcad}!chronon!eric WELL: eblack BIX: eblack