The code is below. Running separately, the top one does not compile in any way but the bottom segment compiles fine.
proc printbobs {times {textd "cream corn"}} {
for {set r 0} {$r<$times} {incr r}{
puts $textd
}
return $times
}
printbobs 2
proc printText {times2 {textp "hello word"}} {
for {set i 0} {$i<$times2} {incr i} {
puts $textp
}
return $times2
}
printText 2