You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1423 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Gianluca Moro
Version: Objective Caml version 3.06
OS: Linux version 2.4.7-10
Submission from: host7-75.pool21757.interbusiness.it (217.57.75.7)
string_of_float output inconsistence with Camltk expected value
Dear Sirs,
First of all, thanks for your invaluable work with the
Ocaml language.
I've uptaded my system to Caml 3.06, and I have seen the
new output of string_of_float, as reported in the release
posting:
Module Pervasives:
string_of_float distinguishes its output from a plain integer;
That is the float 1.0 is not returned as "1." and not as "1"
The problem is that the Camltk module functions which are expecting
an integer (such as the Width attribute of a Widget), are given
a value (string_of_float v): if v = 1.0, Tk got a string "1.",
which is not recognized as an int.
I have fixed my sources: source availability is a great thing!!!
My solution was simply to return to the old string_of_float
function (just curious: why that point have been added?).
Thank ofr your work
Best regards
Gianluca Moro - Biomedin
The text was updated successfully, but these errors were encountered:
That is the float 1.0 is now returned as "1." and not as "1"
The problem is that the Camltk module functions which are expecting
an integer (such as the Width attribute of a Widget), are given
a value (string_of_float v): if v = 1.0, Tk got a string "1.",
which is not recognized as an int.
This is clearly a bug in Camltk. If TK is expecting an integer,
we shouldn't be giving it a float.
I have fixed it to use Printf.sprintf instead of string_of_float,
which gives better control of the output format.
function (just curious: why that point have been added?).
Because if we don't do that, the toplevel reports a float as:
val x = 1 : float
and you cannot copy the value and paste it back as a float to the
toplevel.
This bug is now fixed in the working version (3.06+8).
Original bug ID: 1423
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Gianluca Moro
Version: Objective Caml version 3.06
OS: Linux version 2.4.7-10
Submission from: host7-75.pool21757.interbusiness.it (217.57.75.7)
string_of_float output inconsistence with Camltk expected value
Dear Sirs,
First of all, thanks for your invaluable work with the
Ocaml language.
I've uptaded my system to Caml 3.06, and I have seen the
new output of string_of_float, as reported in the release
posting:
string_of_float distinguishes its output from a plain integer;
That is the float 1.0 is not returned as "1." and not as "1"
The problem is that the Camltk module functions which are expecting
an integer (such as the Width attribute of a Widget), are given
a value (string_of_float v): if v = 1.0, Tk got a string "1.",
which is not recognized as an int.
I have fixed my sources: source availability is a great thing!!!
My solution was simply to return to the old string_of_float
function (just curious: why that point have been added?).
Thank ofr your work
Best regards
Gianluca Moro - Biomedin
The text was updated successfully, but these errors were encountered: