Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!enea!kth!sics!uplog!thomas From: thomas@uplog.se (Thomas Hameenaho) Newsgroups: comp.lang.c Subject: Re: Can ANYONE tell me why this code snippet doesn't work?? Keywords: varargs Message-ID: <316@uplog.se> Date: 18 Oct 88 21:02:59 GMT References: <7778@gryphon.CTS.COM> <315@uplog.se> <982@mina.liu.se> Reply-To: thomas@uplog.UUCP (Thomas Hameenaho) Organization: TeleLOGIC Uppsala AB Lines: 17 In article <982@mina.liu.se> mikpe@mina.liu.se (Mikael Pettersson) writes: >Noooo! >The great advantage in using varargs(3) is PORTABILITY. It's guaranteed >to work in any conforming ANSI C implementation (where it's called ) >and it will work in virtually all existing UNIX C compilers as well. >Assumptions about stack layout, parameter passing and order of evaluation >will only lead to bugprone and non-portable code. I agree fully with you. However not THAT many systems have v{sf}printf() (BSD systems doesn't, at least not 4.3) and my response was an attempt to explain what was wrong with the code. I would definately NOT try to manipulate the sp. -- Real life: Thomas Hameenaho Email: thomas@uplog.{se,uucp} Snail mail: TeleLOGIC Uppsala AB Phone: +46 18 189406 Box 1218 Fax: +46 18 132039 S - 751 42 Uppsala, Sweden