Tcl Library Source Code

View Ticket
Login
Ticket UUID: 516468
Title: Allow lists as arguments to statistics
Type: RFE Version: None
Submitter: mic42 Created on: 2002-02-12 16:15:35
Subsystem: math Assigned To: kennykb
Priority: 1 Zero Severity:
Status: Closed Last Modified: 2026-11-21 10:33:57
Resolution: Out of Date Closed By: serhiy.storchaka
    Closed on: 2026-11-21 10:33:57
Description:
The math::min, math::max and others procs in the
misc.tcl file are a bit complex to use if one has lists
of values.

To use you need:
eval math::max [list 1 2 3 4 5 6 7]

The extra complexity of eval is not nice. Perhaps lists
could also be used, or a alternative version
[math::lmax], or so could be done, to provide the
functionality for lists instead of single values.
User Comments: serhiy.storchaka added on 2026-11-21 10:33:57:

math::statistics::max/min/mean take a list, and since Tcl 8.5 math::max {*}$list works without eval.