Will,

Yeah, debug seems to be a little screwed with select/endselects in UDFs. Seems that kixtart first jumps over any cases prior to the case that is true, then display the next case, then jumps to the bottom. Heres a sample script where you can change $var to step through the scenarios:

break on

$var = 2

$new = Echo($var)

?"newvar=" $new

exit 1

function Echo($var)

 select

  case $var = 1 $Echo = 1
  case $var = 2 $Echo = 2
  case $var = 3 $Echo = 3
  case 1 $Echo = 0

 endselect

endfunction


I think this is a problem eh ?

-Shawn