In a larger system (where, presumably, the TryDisk Function would be called in many different places in the code), this allows the calling procedure to control which file is being checked. TryDisk returns a Boolean (that is, True/False) variable so it can be tested directly in an If block. In fact, some programmers would shorten the If statement even more by coding it as:
~~~~~~~~~~~~~~~~~~~~~~~~~
If TryDisk("a:\fileopen.bmp") Then Exit For
~~~~~~~~~~~~~~~~~~~~~~~~~
The Exit For statement is mentioned briefly in Chapter 9, but no example is shown. Here's your example!
Finally, the program uses the loop counter (in this case, the variable i) to determine whether the loop has completed or not. The rest of the code is on the next page.

