![]() |
D.1 Understanding Clusters |
cluster meals: protein$, liquid$, carb$ meals->protein$ = "Eggs" meals->liquid$ = "Tea" meals->carb$ = "Toast"Notice that the syntax for referencing cluster variables is:
clustername->variablenameIf you have multiple clusters all based on the same "root" cluster, such as MEALS, you can define the root cluster once and then reference it when defining related clusters. In this example, we first define a MEALS cluster and then use it to further define breakfast, lunch, and dinner clusters.
cluster meals: protein$, liquid$, carb$ cluster breakfast using meals breakfast->protein$ = "Eggs" breakfast->liquid$ = "Tea" breakfast->carb$ = "Toast" cluster lunch using meals lunch->protein$ = "Chicken" lunch->liquid$ = "Coffee" lunch->carb$ = "Rice" cluster dinner using meals dinner->protein$ = "Steak" dinner->liquid$ = "Wine" dinner->carb$ = "Potatoes"If you have a routine that requires a lot of data passed into it, using a cluster is a great way to pass in the data.
Hide Description
|
|
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |