Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DAY 029: _EXIT
#2
I've found _EXIT is one of the few commands that I'll put in an ON TIMER sub or event.  That way, no matter what my program is doing, every .05 second or so, it checks very fast for an _EXIT event.

What's the main purpose of an _EXIT routine??

To make certain you save any data before the program closes!

Say you've created an enhanced clone of notepad.  You spend 8 hours writing the great American novel in it.  You sneeze, accidentally clicking the bright red ❌ in the top right corner.  AHHHHHHHHHH!!  All that work just....  gone...

/cry

I bet you now wished you'd taken time to write a little routine to dump your file to disk before shutting down and closing!

THAT is what _EXIT works perfectly for!!

IF _EXIT THEN
   BackUpMyJunk
   System
END IF
Reply


Messages In This Thread
DAY 029: _EXIT - by Pete - 12-10-2022, 05:41 AM
RE: DAY 029: _EXIT - by SMcNeill - 12-10-2022, 06:08 AM
RE: DAY 029: _EXIT - by vince - 12-10-2022, 07:10 AM
RE: DAY 029: _EXIT - by Pete - 12-10-2022, 07:21 AM
RE: DAY 029: _EXIT - by Pete - 12-10-2022, 07:17 AM
RE: DAY 029: _EXIT - by mnrvovrfc - 12-10-2022, 07:30 AM
RE: DAY 029: _EXIT - by Pete - 12-10-2022, 07:55 AM
RE: DAY 029: _EXIT - by mnrvovrfc - 12-14-2022, 10:12 AM
RE: DAY 029: _EXIT - by Pete - 12-14-2022, 09:42 PM



Users browsing this thread: 1 Guest(s)