tcl::mathfunc::max (public)

 tcl::mathfunc::max arg [ args... ]

Defined in packages/acs-tcl/tcl/tcllib-doc-procs.tcl

Return the greatest of one or more numeric arguments. This command implements max() for Tcl expressions.

Parameters:
arg (required)
First numeric argument.

Partial Call Graph (max 5 caller/called nodes):
acs::tcllib::register_documentation acs::tcllib::register_documentation (private) tcl::mathfunc::max tcl::mathfunc::max acs::tcllib::register_documentation->tcl::mathfunc::max packages/xotcl-request-monitor/www/index.tcl packages/xotcl-request-monitor/ www/index.tcl packages/xotcl-request-monitor/www/index.tcl->tcl::mathfunc::max tcl::mathfunc::double tcl::mathfunc::double (public) tcl::mathfunc::max->tcl::mathfunc::double

Testcases:
No testcase defined.
Source code:
        if {![llength $args]} {
        return -code error  "not enough arguments to math function \"max\""
        }
        set val -Inf
        foreach arg $args {
        # This will handle forcing the numeric value without
        # ruining the internal type of a numeric object
        if {[catch {expr {double($arg)}} err]} {
            return -code error $err
        }
        if {$arg > $val} {set val $arg}
        }
        return $val
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: