-----"Thomas Charron" <[EMAIL PROTECTED]> wrote: ----- >To:[EMAIL PROTECTED] >From: "Thomas Charron" <[EMAIL PROTECTED]> >Date: 12/01/2008 04:17PM >cc:[EMAIL PROTECTED] >Subject: Re: [GNHLUG] Silly C/C++ question... > >On Mon, Dec 1, 2008 at 4:13 PM, <[EMAIL PROTECTED]> wrote: >>>On Mon, Dec 1, 2008 at 3:30 PM, <[EMAIL PROTECTED]> wrote: >>>> I am sure I will kick myself when I find out the answer, but... >>>> line 2: four doubles separated by commas >>>> line 3: \n >>>* * * STUFF DELETED >>>> fscanf(fp, "%d%d%d%d", &fstart1, &fend1, &M1, &dt1); // get >>>fstart, >>>> fend, number of doppler slices & dt >>> Where's the commas getting cleared? >> It would appear that is the problem, hmm, I left my K&R at home. > Do you >> have a link to a K&R clone or a reference to the string command >that would >> be useful? It looks like strtok would work, if I can figure it >out... >> Jeesh, I'm liking python more and more... > > :-P Google fscanf example ? :-D "%f,%f,%f,%f" would probrably >work, depends on how 'potentially bad' the data could be, really. > >-- >-- Thomas > > Well, I wrote the data originally. So I only have myself to blame :-P Ahemm, google and I are buddies. I did not find an example with the commas delimiting the %f s. Thanks, I'll try it. Otherwise, I could use strtok (ikk)
-Bruce ****************************** Neither the footer nor anything else in this E-mail is intended to or constitutes an <br>electronic signature and/or legally binding agreement in the absence of an <br>express statement or Autoliv policy and/or procedure to the contrary.<br>This E-mail and any attachments hereto are Autoliv property and may contain legally <br>privileged, confidential and/or proprietary information.<br>The recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way <br>disseminating any material contained within this E-mail without prior written <br>permission from the author. If you receive this E-mail in error, please <br>immediately notify the author and delete this E-mail. Autoliv disclaims all <br>responsibility and liability for the consequences of any person who fails to <br>abide by the terms herein. <br> ****************************** _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/