Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 84fd588d06a14952c48be2f2bda098aaa913d5c4eb355924f635b0ecb0447b4e
Ticket: 62144fdc02ef37b0fcbdbbcd05ffb8375446f536
"scan NaN %f" returns a list with an empty element
User & Date: oehhar on 2026-07-21 11:00:57
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    I tried a bit with doubles, scan and format with NaN and stumbled over the following:
    
    <verbatim>
    % scan NaN %f
    {}
    % scan NaN %f fl
    0
    % set fl
    can't read "fl": no such variable
    </verbatim>
    
    For sure it is a bug:
    
       *   that "scan NaN %f" returns a list with one element with the empty string
    
    As NaN is a valid value for a double, it would be beneficial for me, that "scan NaN %f" really scans a double with a NaN value.
    
    Apparently, TCL does not see "NaN" as a double value. "INF" works for scan, format, expr.
    
    Even if there is no way to generate a NaN within TCL, it may come from an external source like a data base.
    
    Thanks for all,
    Harald
    
  5. foundin changed to: "8.6-9.1"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "18. Commands M-Z"
  15. title changed to: ""scan NaN %f" returns a list with an empty element"
  16. type changed to: "Bug"