June 2024
Intermediate to advanced
488 pages
13h 14m
English
This chapter covers one of my favorite topics: recursion, or code that calls itself. I’ll start with a much more detailed definition, but the only way to truly understand this concept is through examples, so we’ll step through multiple instances of Batch recursion. One will be the calculation of a factorial, a truly classic example, with another being the conversion of a decimal to a hexadecimal. The last example will be something that’s quintessentially Batch: a recursive search through directories and their subdirectories. Then you’ll learn an important limitation to be aware of before you write code that calls itself.
Read now
Unlock full access