Tutorial: Subroutines
Subroutines are an important tool for creating well structured programs. A subroutine is a block of program code that once written can be invoked from several places in a program to perform its function. Think of a subroutine as a re-usable building block.
What this tutorial will teach you (Outcomes)
- Basic concepts: how subroutines fit into a program
- The subroutine stack (how SPLatty manages it for you)
- Do's and don't's, common pitfalls
- Argument passing
What you need to do or know first (Prerequisites)
Do the online training course (FastTrack tutorial)
Please note: The interactive/online training course is very old. Everything in there is valid and worth learning, especially the underlying principles. However the course pre-dates significant developments, most notably our MultiTrack multitasking technology which makes SPLat programming even easier. So, if you are relatively new to controller programming, the course will give you a good foundation, but please don't think it represents the full SPLat story.
- An understanding of the register stack. This is covered in the SPLat/PC help file.