public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "rolf perau via gcc-help" <gcc-help@gcc.gnu.org>
To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: gcc on Sparc Solaris 8
Date: Mon, 30 Sep 2019 13:32:00 -0000	[thread overview]
Message-ID: <2147124760.1726006.1569850372525@mail.yahoo.com> (raw)
In-Reply-To: <2147124760.1726006.1569850372525.ref@mail.yahoo.com>

Hi Dennis, 
int scan_assign_double(ScanFILE *psf, double *pd, void *userdata, ScanFLAG flags){
        char temp[100];

        if (scan_nonblank(psf) == '=') fgetc(psf->fp);
        if (scan_word(psf, temp, sizeof(temp)-1)) return -1;

fprintf( stderr, "Reading the String : %s\n", temp);

        if (sscanf(temp, " %lf ", pd) != 1) {
                error_out(err_scan_expect_double, temp, psf->filename, psf->linum);
                return -1;
        }

fprintf( stderr, "%s %lf\n\n", "After sscanf %lf :" , *pd);

        if (scan_nonblank(psf) == ';') fgetc(psf->fp);
        return 0;
}

Resulting in :

Reading the String : 0.7
After sscanf %lf : 0,000000

Reading the String : 5257.872067
After sscanf %lf : 5257,000000

Reading the String : 152.498875
After sscanf %lf : 152,000000

Reading the String : 12.0
After sscanf %lf : 12,000000

Reading the String : 0.7
After sscanf %lf : 0,000000



       reply	other threads:[~2019-09-30 13:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2147124760.1726006.1569850372525.ref@mail.yahoo.com>
2019-09-30 13:32 ` rolf perau via gcc-help [this message]
2019-09-30 13:39   ` Jonathan Wakely
2019-09-30 19:34     ` Dennis Clarke
2019-09-30 19:36   ` Dennis Clarke
     [not found] <370931742.2089515.1569886162496.ref@mail.yahoo.com>
2019-09-30 23:29 ` rolf perau via gcc-help
     [not found] <1157198014.1780392.1569854535577.ref@mail.yahoo.com>
2019-09-30 14:42 ` rolf perau via gcc-help
2019-09-30 19:23   ` Dennis Clarke
     [not found] <691082870.1339340.1569819291085.ref@mail.yahoo.com>
2019-09-30  4:55 ` rolf perau via gcc-help
2019-09-30  6:11   ` Dennis Clarke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2147124760.1726006.1569850372525@mail.yahoo.com \
    --to=gcc-help@gcc.gnu.org \
    --cc=rp_istec@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).