; Call test script
script "CallTest"

message("Call test starting.")

call("one")

message("Call test finished.")

terminate()


.one
  message("Called 'one'.")
  call("two")
  message("Returned to 'one'.")
  return()

.two
  message("Called 'one.two'.")
  call("three")
  message("Returned to 'one.two'.")
  return()


.three
  message("Called 'one.two.three'.")
  call("four")
  message("Returned to 'one.two.three'.")
  return()

.four
  message("Called 'one.two.three.four'.")

  userchoice(A, "Would`you`like`to`nest`these`calls?`Click`OK`to`do`so,`or`Cancel`to`finish.")
  if (A = 1) call("one")
  return()
