IDE debugging?

You can call a subroutine from anywhere you like.
You can't define it inside another function.
If your next post isn't code, I'm going to lock this thread to prevent further time-wasting