Re: possible bug in getDoubleValue
"Alexander J. Oss" <[email protected]> Wed, 9 Oct 2002 21:26:05 -0400
| Newsgroups | gmane.comp.gcc.cgicc.bugs |
|---|---|
| Message-ID | <000f01c26ffc$01edd240$0101a8c0@puter> |
Which platform and compiler are your working on? Perhaps there's a patch to one of them that's needed? ...although it is interesting that in FormEntry.h, the default min parameter has no STDNS, while the max does. Hm. ----- Original Message ----- From: "Carsten P. Gehrke" <[email protected]> To: <[email protected]> Sent: Tuesday, October 08, 2002 4:56 AM Subject: [bug-cgicc] possible bug in getDoubleValue Using cgicc for the first time, I came across some behavior which I could not explain. I have distilled the code to a minimum which still exhibits the problem, and have taken the liberty to pack everything in a gzipped tarball attached to this message. I have included the recommended output of support/config.guess and ./configure in the aptly named file out. The problem I have encountered is in the getDoubleValue method of a form parameter. If I invoke this method without MIN and MIX limits (i.e. as getDoubleValue()), and pass a negative value, the result is an extremely small number (something like 2.22507e-308) and not the expected value. If I specify MIN and MAX limits, the result is as expected. If I pass a positive value, the result is as expected (regardless if limits are specified or not). If I invoke the getIntegerValue method, the results are as expected in any case. Instead of using a form, I have used a simple href link like this: <a href="/cgi-bin/getDoubleValue_bug?value=-10.5> I do not see this as a problem, although I could be wrong. The tarball contains these files: out - the output of support/config.guess and ./configure, as suggested getDoubleValue_bug.cpp - a short program invoking the getIntegerValue and getDoubleValue methods with and without MIN and MAX limits, and generating a simple HTML document with the results Makefile - to build the above program getDoubleValue_bug.html - simple Web page to invoke the above program with different values I have taken a glance at the source code for getDoubleValue, but could not find anything that seemed to be the obvious culprit. Perhaps I am just using the cgicc package incorrectly. Any help in this matter would be very much appreciated. Thank you, Carsten Gehrke -- ======================================================================== Carsten P. Gehrke mailto:[email protected] ========================================================================