Slide 60 of 80
Notes:
- Is rec0 being incremented TWICE in the while loop?
- No! Explicit referencing, ![rec0+1] is performed by the CI before the command name is even known to be “WHILE”. Thus, the command actually processed by the WHILE CI code is: setvar(rec0, rec0+1) <= limit and setvar(!rec1, input()) <> chr(1) Note: if rec![rec0+1] was replaced with rec!rec0, as I originally wrote the test script, then the loop counter and array high water mark (rec0) would be overwritten by the first record in the input file.
- This version of the script is twice as fast with just a little thought.
- Shows the input() function.
- Test against chr(1) is arbitrary but needed to have an empty while body.