June 2024
Intermediate to advanced
488 pages
13h 14m
English
In the prior chapter, you learned about variables, how to set them, and how to resolve their values. In this chapter, I’ll focus on the setlocal command, which is central to some significant and disparate features of Batch and alters when, where, and how you can handle variables. First, it defines scope: where and when those variables can be accessed and manipulated. Second, it enables a feature called delayed expansion, which alters how variables are resolved, one upshot of which allows you to store one variable inside another variable.
All languages handle scope in some fashion, but delayed expansion, or something ...
Read now
Unlock full access