Skip to content
Tcl Source Code History Of Ticket 1230346
Login

History Of Ticket 1230346

Artifacts Associated With Ticket 1230346

  1. Ticket change [4cf3e1a793] (rid 126981) by matzek on 2005-06-30 13:19:20:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Maybe related to bug [ 718878 ].
      
      On a 32bit Linux system using Tcl 8.4.9:
      
      % set foo 4294967295
      4294967295
      % string is integer $foo
      1
      
      % set foo 4294967296
      4294967296
      % string is integer $foo
      0
      
      % set foo 2147483648
      2147483648
      % string is integer $foo
      1
      
      % set foo 2147483647
      2147483647
      % string is integer $foo
      1
      
      On a 64bit Solaris 5.8 system using a 64bit Tcl 8.4.9:
      
      % set foo 4294967295
      4294967295
      % string is integer $foo
      0
      
      % set foo 4294967296    
      4294967296
      % string is integer $foo
      0
      
      % set foo 2147483648
      2147483648
      % string is integer $foo
      0
      
      % set foo 2147483647
      2147483647
      % string is integer $foo
      1
      
      So there are different results in the range from
      2147483648 (1<<31) up to (and including) 4294967295
      ((1<<32)-1).
      
      -- Matthias Kraft
      
    4. foundin initialized to: "obsolete: 8.4.9"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "matzek"
    9. subsystem initialized to: "18. Commands M-Z"
    10. title initialized to: "Another [string is integer] inconsistency"
    11. type initialized to: "Bug"
  2. Ticket change [439c303484] (rid 116591) by dkf on 2005-06-30 20:35:24:

    1. assignee changed to: "kennykb"
  3. Ticket change [462bfb0b9b] (rid 99478) by dgp on 2005-06-30 21:09:09:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      [string is integer] is meant to tell you
      whether a value can have
      Tcl_GetIntFromObj() called on it.
      
      Since sizeof(int) can be different on
      different systems, so can the results
      of [string is integer].
      
      That said, your 64-bit results look wrong.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [c99fb1a906] (rid 122319) by matzek on 2005-06-30 23:23:02:

    1. icomment:
      Logged In: YES 
      user_id=330806
      
      Well, from my point of view I don't care about
      Tcl_GetIntFromObj(). Script level is what counts, if script
      level commands are used. I want to know if the user or
      system provided a valid integer, not a string, nor a double
      or whatever ...
      
      The big numbers are essential, as I am going to check
      whether or not I have enough place on the filesystem (e. g.
      in this case for creating databases). Currently I use
      [regexp -- {^-?[0-9]+$} $size] to validate the value I got
      from the system. But I do it quite a number of times, so I'd
      like to get rid of regexp, if there is a faster method...
      
      -- Matthias Kraft
      
      
    2. login: "matzek"
    3. mimetype: "text/plain"
    4. username: "matzek"
  5. Ticket change [214dd51f1a] (rid 130559) by dgp on 2005-06-30 23:29:59:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Actually, yes you do care.
      
      Some commands accept only
      those arguments that pass
      Tcl_GetIntFromObj.  
      
      For example,
      
        [lindex $list $index]
      
      Forgetting for a moment the special
      forms "end-", etc. for indices, if $index
      is a string of digits, then you need then
      to be digits that pass [string is integer $index].
      
      % string is integer 9999999999
      0
      % lindex c 9999999999
      bad index "9999999999": must be integer?[+-]integer? or
      end?[+-]integer?
      
      So, you need to choose the
      validation command that matches your
      intended use.  It might be
      [string is wideinteger].  It might be your
      regexp.  All depends on what your
      eventual use will accept/reject.  Choose
      the matching validator.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [bce723356f] (rid 101826) by kennykb on 2005-08-06 02:28:32:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      I think that Matthias needs the 8.5 [string is wide]
      functionality.
      
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  7. Ticket change [ed0bc7de96] (rid 103814) by kennykb on 2005-11-05 02:40:42:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      In 8.5, we have [string is integer], [string is wideinteger] and
      [string is bignum].  In 8.4, we have [string is integer] and
      [string is wideinteger].  The user should choose the
      validator that suits his needs, as dgp said before.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. resolution changed to: "Invalid"
    5. status changed to: "Closed"
    6. username: "kennykb"
  8. Ticket change [fa59c78d53] (rid 91851) by kennykb on 2005-11-05 02:40:43:

    1. closedate changed to: "2005-11-04T19:40:43"
    2. closer changed to: "kennykb"