Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4c48b0f0e278debf37e3492f0bd36e34bf8eabd0
Ticket: 219223ffffffffffffffffffffffffffffffffff
64 bit format command behaves differently to the 32bit forma
User & Date: dgp on 2001-03-22 07:32:19
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    
    I confirm that this patch adds the ability to avoid
    this bug.  It does so by adding new features, though,
    so perhaps a short TIP is in order.
    
    I'm troubled by the non-Portability of test format-1.13.
    Neither of these results really makes sense to me:
    
        # 32-bit platform:
        % format %d 4294967290
        -6
    
        # 64-bit platform:
        % format %d 4294967290
        integer value too large to represent as non-long integer
    
    I understand what's going on, but why should the Tcl script
    level claim that -6 == 4294967290 anywhere?  And if it
    claims such nonsense anywhere, why not everywhere?
    
    What I see above is the very platforms which *can* handle
    the integer value 4294967290 are refusing to do so and
    throwing an error instead, and those that *can't* are
    silently converting it into -6 without throwing an error.
    
    I suppose if we open the topic up a bit to a discussion of
    how Tcl ought to be handling integer values at the script
    level, then a TIP is definitely in order.
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"