Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 214dd51f1a6c57f075998574c443651679694bc0
Ticket: 1230346fffffffffffffffffffffffffffffffff
Another [string is integer] inconsistency
User & Date: dgp on 2005-06-30 23:29:59
Changes

  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"