
Lesson #19g -- Explanation for Lesson 18b (cont)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------  LOG OFF -----------------------------
1:      {LOOK main_p}{SEND g%suffix}
2:      {SSLO anykey_r,%anykey_p}
3:      {LOOK ^jNO CARRIER^m}
-------------------------  GOODBYE/CLEANUP -------------------------
4:  {:GBY}
5:      {SETV bulet_p}{SETV bulet_r}{SETV persmail_p}{SETV persmail_r}
6:      {SETV main_p}{SETV main_r}{SETV supmen1_p}{SETV supmen1_r}
7:      {SETV supmen2_p}{SETV supmen2_r}{SETV mail_p}{SETV mail_r}
8:      {SETV quit_r}{SETV suffix}{SETV success_p}{SETV anykey_p}
9:      {SETV nomail_p}
.
. To be completed later
========================  CALLED SUBROUTINES =======================
10: {:DEL_REP}
11:     {EXEC-N del %repdir%%bbsid.rep}{RETU}

#1:  We've just "quit" from the Mail Door, therefore the Main Menu
     reappear..LOOKs for the prompt and then sends "g" with our
     "suffix" variable.
#2:  Responds to any "Press Key To Continue" prompt that may appear
     before "NO CARRIER".  You may also need to include a SSLO which
     handles any "Proceed with logoff (Y/n)" type prompts that are
     out there.
#3: Looks for the NO CARRIER that should come up
#4: Macro ID for our "goodbye" or "post-logoff" routines.  We can
    point to this ID in our error trapping macros we need to add to
    other sections.  For example, you could put a "{GOLO gby,^jNO
    CARRIER"} in the other sections to handle unexpected dropped
    carriers.
#5-#9:  Resets all the variables that were read in for the BBS we
        just logged off.
#10:  Macro ID for a CALLed routine..this sub-routine will be CALLed
      by the Mail Transfer section whenever the "upload successful"
      report comes in from the BBS.

End of Lesson 19..Next Lesson:  File Structure For BBS Config Files

As a reminder, the example I posted in Lesson 18b, and the
explanation provided in Lesson 19, are not intended to imply that
every continency has been covered, or that this is an actual generic
macro.  There are some holes that still need to be filled in most of
the major sections.  My goal for this tutorial series is to get you
well on your way to writing your own scripts.

Jim
