Feb-05-2022, 05:55 PM
(This post was last modified: Feb-05-2022, 05:55 PM by deanhystad.)
both of my examples handle every iteration, not just the first. Run the examples and you will see. The examples differ in how they handle the first iteration.
You can't iterate over all the rows and have the previous row for each iteration. There is no "previous row" for the first iteration. In my first example I handle there not being a previous row by not printing the previous row. In the second example I skip the first row and iterate over the remaining rows. The first row becomes the first "previous row".
You can't iterate over all the rows and have the previous row for each iteration. There is no "previous row" for the first iteration. In my first example I handle there not being a previous row by not printing the previous row. In the second example I skip the first row and iterate over the remaining rows. The first row becomes the first "previous row".