Quoting the helpfile: "The /halt command halts a script and prevents any further processing."

Besides the use of return to actually return some data, return will only stop the current event definition/alias.
Halt will stop the current event definition/alias AND the calling script.

Compare the output of /returntest and /halttest:
Code:
alias returntest {
  echo -a returntest start
  returncall
  echo -a returntest end
}

alias returncall { 
  echo -a doing something...
  return
  echo -a doing something else
}


alias halttest {
  echo -a halttest start
  haltcall
  echo -a halttest end
}

alias haltcall {
  echo -a doing something...
  halt
  echo -a doing something else
}


Both the /return and /halt commands stop their returncall and haltcall aliases, thus you never read "doing something else".
The /halt in the haltcall alias stops the calling alias "halttest" as well (you won't read "halttest ended"), while the returntest alias keeps running and you can see "returntest end".

This example is far from comprehensive, I hope it helps none the less: /halt will halt the running script (not in sense of a scriptfile) - Wims' "routine" may be the better word. smile

Last edited by Horstl; 23/02/09 11:05 PM.