Bin given limits: Difference between revisions

m
Formatting fixes for Tcl version
(Add Tcl version)
m (Formatting fixes for Tcl version)
Line 1,849:
 
=={{header|Tcl}}==
For Tcl 8.6 (fordue to <code>lsearch -bisect</code>):
<lang tcl>namespace path {::tcl::mathop ::tcl::mathfunc}
 
Line 1,875:
set binlims {23 37 43 53 67 83}
set data {95 21 94 12 99 4 70 75 83 93 52 80 57 5 53 86 65 17 92 83 71 61 54 58 47
16 8 9 32 84 7 87 46 19 30 37 96 6 98 40 79 97 45 64 60 29 49 36 43 55}
print_bins $binlims [distribute_bins $binlims $data]
puts ""
Anonymous user