Ethiopian multiplication: Difference between revisions
Content added Content deleted
(→Tcl: Added implementation) |
m (→{{header|Tcl}}: closer match with varnames from other examples) |
||
Line 186: | Line 186: | ||
# Wrapper to set up the logging |
# Wrapper to set up the logging |
||
proc ethiopianMultiply {a b { |
proc ethiopianMultiply {a b {tutor false}} { |
||
if {$ |
if {$tutor} { |
||
set wa [expr {[string length $a]+1}] |
set wa [expr {[string length $a]+1}] |
||
set wb [expr {$wa+[string length $b]-1}] |
set wb [expr {$wa+[string length $b]-1}] |