in reply to Re: Tk : Entry widget-Strange behaviour with decimals
in thread Tk : Entry widget-Strange behaviour with decimals

> Tk Changes documentation has left me none the wiser

33_500 version Changes contains a suspicious item:

> No special xOKp handling in Perl_Value (RT #121528)

Searching for the bug shows it's indeed related:

After tying a variable containing a float to an Entry box, NOT destroying the Entry box, and then multiplying the variable by 1.0, the variable is no longer treated as a float correctly.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^3: Tk : Entry widget-Strange behaviour with decimals
by Caerwyn1955 (Novice) on Jan 07, 2018 at 16:25 UTC

    Very interesting indeed.
    Especially since it seems to be happening primarly with certain combinations of Perl and Tk versions.
    Funny to see that my initial suspicion was right, the entry()'d value is somehow converted to an integer.
    Concerning you other remark about versions, i looked it up, and i'll just put it ahead of my code from now on, starting each new program with:

    # Windows 7/64-bit
    # Perl 5.26.1.1 for MSWin32-x64-multithread
    # Tk 804.034

    So i won't forget to mention those anymore, and it's a good reminder for myself too.
    If you have any more remarks or advice on my little program, i'd be glad to hear it.
    J.

      or advice on my little program, i'd be glad to hear it.

      Since you asked, rather than using a lot of similar variable names like $row0, $row1 ,$row2 etc consider using an array. For example

      my @col = (40,$center-35,$center+30,$breed-40); my @row = (20,40,60,80,90,110);

      a few more changes (mainly style) here

      poj

        Wow!
        You really gave me something to study here.
        I started Perl just 8 days ago, and I did my last programming some 20 years ago.
        I see you are using things that i didn't know existed, or what they really do, like \%.
        Since i already know what my program is suppoded to do, i can now trace the use of those things.
        Your comment does indeed help me on my way, and will probably be keeping me busy for a number of days.
        Thanks.