Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Why are there no v*scanf like v*printf functions? Message-ID: <7023@brl-smoke.ARPA> Date: 11 Jan 88 07:36:56 GMT References: <1112@ucsfcca.ucsf.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 21 In article <1112@ucsfcca.ucsf.edu> roland@lbl-rtsg.arpa (Roland McGrath) writes: >Is there some reason that the ANSI standard doesn't include >functions vfscanf, vscanf and vsscanf? Basically, many of us feel that the *scanf() functions are a lossage, and we don't want to introduce any more of them. The main problem is that their operation varies too much, depending on external (input) conditions beyond programmer control, and the interface is not as easy to use for input field validation as it should be. Also, the white-space skipping is problematic; usually, I end up fgets()ing an input line, then sscanf()ing the result. We had to provide specs for the three common *scanf() functions simply because they're widely used and therefore needed standard specifications, not because we think they're great functions. >I don't know actually how useful they would be, but >they'd be at least as useful as v*printf. Not so -- I regularly use v*printf(), for example in error logging functions, but still haven't felt the need for v*scanf().