Author: Gene Wirchenko
Posted: 2017-07-13 at 23:41:49
At 06:59 2017-07-13, "Darren" <foxdev@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
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/99cb763296cd638f2f48d19aad910c81@mtlp000086
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.