At 06:59 2017-07-13, "Darren" <foxdev(a)ozemail.com.au> wrote:
>And another tool I have which helps is to add comments to the end of the
>terminating commands - e.g. ENDIF, ENDFOR, ENDDO, EXIT etc. which help to
>identify the branch / loop.
I dislike the clutter intensely, and if the condition changes,
there are then two places to change.
[snip]
>... With terminating comments...
>
> DO WHILE .T.
>
> *- Operate between 1am and 3pm local sydney time
> IF NOT BETWEEN(HOUR(DATETIME()), 1, 15) && 01:00:00 to 14:59:59
>
> =messagebox("This function is designed to run between 1am and 3pm
>local time (Sydney)" + CHR(13) + CHR(13) + ;
> "The program will now terminate", 48, "Outside of times of
>operation", 10000)
>
> EXIT && DO WHILE .T.
>
> ENDIF && NOT BETWEEN(HOUR(DATETIME()), 1, 15) && 01:00:00 to 14:59:59
>
> SELECT w_bnTrack
> SCAN FOR rssAvailable
>
> *- Check if this track has runs today.
> SELECT w_usdRace
> LOCATE FOR track_code = w_bnTrack.livetkcode
> IF NOT FOUND()
> SELECT w_bnTrack
> LOOP
> ENDIF && NOT FOUND()
If you really need this to keep your nesting straight, you have
too much nesting.
[snip]
Sincerely,
Gene Wirchenko