clearall {
var %x = $chan(0)
while (%x) {
clear -c $chan(%x)
dec %x
}
}


What is wrong w/ this?