Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sa_ratescriptlanguage [2023/04/18 10:41] – Scott McMullen | sa_ratescriptlanguage [2023/04/19 14:22] (current) – [Indenting] Scott McMullen | ||
---|---|---|---|
Line 53: | Line 53: | ||
\\ | \\ | ||
==== Indenting ==== | ==== Indenting ==== | ||
+ | |||
+ | Nesting the Commands | ||
+ | |||
+ | We start off with | ||
+ | <sxh> | ||
+ | foreach shift | ||
+ | -foreach dayslice | ||
+ | --foreach timeslice | ||
+ | --foreach timeslicedefault | ||
+ | </ | ||
+ | Within each band we add the required details for days and times. You don’t need to use all, but it needs to be in that order. \\ \\ | ||
+ | |||
+ | |||
The number of leading spaces indenting each command is used to determine which commands are affected by //foreach// and //if// commands. E.g. if the leading space is removed from the final //post// command in the second example above, it will be outside the //foreach// shift loop, and the effect will be to post summary pay band totals for the timesheet as a whole (i.e. not more than one timesheet line per pay band). | The number of leading spaces indenting each command is used to determine which commands are affected by //foreach// and //if// commands. E.g. if the leading space is removed from the final //post// command in the second example above, it will be outside the //foreach// shift loop, and the effect will be to post summary pay band totals for the timesheet as a whole (i.e. not more than one timesheet line per pay band). | ||
\\ \\ | \\ \\ |