🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2302

Re: quotes in sscanf() ????????????

#2302
From: J. Kanze
Date: Sat, 16 Mar 1996 15:20
22 lines
1424 bytes
In article <4i8036$46d@solutions.solon.com> duling@niehs.nih.gov (Dave
Duling) writes:


|> Hi.  I need to read in ASCII files of the for:

|> #.##,"string with , commas and spaces ", etc....

|> so the delimiter is a comma, the string is bound by quotes and contains both 
|> commas and spaces (but no other quotes).  So I've played around endlessly with
|> this but have not found the answer.  I could write a special function but it 
|> would be more eloquent with a standard IO call to sscanf()....

	scanf( "%[^,], \"%[^\"]\"..." , s1 , s2 ... ) ;

Not that I think it more elegant to use scanf.  (Error handling is not
going to be easy with scanf.)
-- 
James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils, études et réalisations en logiciel orienté objet --
              -- A la recherche d'une activité dans une region francophone
Technical Details
Message-ID: <4iem8h$9uv@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4i8036$46d@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: kanze@gabi-soft.fr (J. Kanze)
Newsgroups: comp.lang.c.moderated
Subject: Re: quotes in sscanf() ????????????
Followup-To: comp.lang.c.moderated
Date: 16 Mar 1996 09:20:49 -0600
Organization: GABI Software, Sarl.
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4iem8h$9uv@solutions.solon.com>
References: <4i8036$46d@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com