Gscanner: can I get the text of scanned floating point numbers
- From: Laurent Lemaitre <laurent lemaitre mot com>
- To: timj gtk org
- Cc: gnome-list gnome org
- Subject: Gscanner: can I get the text of scanned floating point numbers
- Date: Wed, 02 May 2001 11:37:16 +0200
Tim,
I am currently using the Lexical Scanner from glib
for my application (the appl converts files written
in verilog to xml).
My problem: my scanner scans floating point numbers (for
instance 1.22222e-24). It returns G_TOKEN_FLOAT when a
floating point number is found. I would like to save the
text that has been scanned (and that served to create the
value of scanner->value.v_float). Is-there a way to have
access to the scanned text?
Thanks,
Laurent
PS: with the automatic conversion str->float I can loose
precision (that is bad for my application :-( )
More specifically here is what I am doing to get the text back:
txt = g_strdup_printf ("%e",scanner->value.v_float);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]