Chapter 4: Variables, Lists, and Functions
This chapter builds on multiple concepts that were introduced in Chapter 2, Knots, Diverts, and Looping Patterns. In the first topic, we will examine how the keyword VAR
works with a single value in ink, and how it can be combined with alternatives. Once values have been saved, they can be changed as part of larger looping structures. In the second topic, we will work with multiple variables together using the LIST
keyword.
In ink, we can group variables into a concept called a list. We will also examine how to create and change the values that are part of a list. We will then review when they are best used in a project and situations where multiple, single variables might work better. This discussion will move us on to the next topic, where we will look at working with functions.
Values that are part of a list can be changed by other concepts called functions. In the third topic, we will call some of the built-in functions to work with...