Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v
diff -u -r1.189.2.38 -r1.189.2.39
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 29 Nov 2019 11:12:34 -0000 1.189.2.38
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 29 Nov 2019 13:50:46 -0000 1.189.2.39
@@ -2792,12 +2792,45 @@
}
}
-ad_proc -public min { args } {
+ad_proc -deprecated min { args } {
Returns the minimum of a list of numbers. Example: min 2 3 1.5
returns 1.5.
+ DEPRECATED: this proc does not respect OpenACS naming convention.
+ @see util::min
+
@author Ken Mayer (kmayer@bitwrangler.com)
@creation-date 26 September 2002
} {
+ return [util::min $args]
+}
+
+
+ad_proc -deprecated max { args } {
+ Returns the maximum of a list of numbers. Example: max 2 3 1.5
returns 3.
+
+ DEPRECATED: this proc does not respect OpenACS naming convention.
+ @see util::max
+
+ @author Lars Pind (lars@pinds.com)
+ @creation-date 31 August 2000
+} {
+ return [util::max $args]
+}
+
+ad_proc -public util::min { args } {
+ Returns the minimum of a list of numbers. Example: min 2 3 1.5
returns 1.5.
+
+ Since Tcl8.5, numerical min and max are among the math functions
+ supported by expr. The reason why this proc is still around is
+ that it supports also non-numerical values in the list, in a way
+ that is not so easily replaceable by a lsort idiom (but could).
+
+ @see expr
+ @see lsort
+
+ @author Ken Mayer (kmayer@bitwrangler.com)
+ @creation-date 26 September 2002
+} {
set min [lindex $args 0]
foreach arg $args {
if { $arg < $min } {
@@ -2808,9 +2841,17 @@
}
-ad_proc -public max { args } {
+ad_proc -public util::max { args } {
Returns the maximum of a list of numbers. Example: max 2 3 1.5
returns 3.
+ Since Tcl8.5, numerical min and max are among the math functions
+ supported by expr. The reason why this proc is still around is
+ that it supports also non-numerical values in the list, in a way
+ that is not so easily replaceable by a lsort idiom (but could).
+
+ @see expr
+ @see lsort
+
@author Lars Pind (lars@pinds.com)
@creation-date 31 August 2000
} {