Re: Conversion functions.




when I start the test I am in the same state
and I use the same text-file evey time.
The converted values can be different
or the same between different test-runs so 
the wrong values seem to occur randomly.
Magnus

On Tue, 4 Sep 2007 00:26:28 +0200
David NeÄas (Yeti) <yeti physics muni cz> wrote: 
On Mon, Sep 03, 2007 at 08:46:51PM +0200, Magnus Myrefors wrote:
  I am currently trying to use the glib-functions
g_ascii_strtod(x,y) and g_ascii_strtoll(x,y) to convert values from
a text-file. It works fine most of the time but occasionally the
converted values are absolutely wrong or just a bit wrong. I am
using the glib libraries (libglib2.0-dev v.2.12.4-2) and
(libglib2.0-0 v.2.12.4-2). Has anyone had similar problems with
these functions ?

No; can you extract the problem into a simple test case?  If
the wrong values occur randomly and/or depend on the state
of the rest of the program in a complex way, memory
corruption elsewhere in your program is the likely cause
(try valgrind).  If wrong values are rare but reproducible,
it should be easy to prepare a simple test case.

Yeti

--
http://gwyddion.net/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]