home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
modem
/
jbtutor1.zip
/
LESSON5C.TXT
< prev
next >
Wrap
Text File
|
1993-09-19
|
2KB
|
52 lines
CALOok (continued):
Sometimes a conditional prompt is likely to occur several
times in succession before the BBS finally gets to the prompt you're
really looking for. The most common example of this phenomenon is
with "Press Any Key To Continue" type prompts. For example, a BBS
might have several opening screens which contain things like News
Bulletins or Advertisements..whatever. It's not always possible to
account for how many of these prompts *precisely* will come in. This
segment of the flowchart illustrates the processing cycle:
┌───────v──────┐ Yes ┌─────────┐
│"More" Prompt?├─────────────────>Send CR │
└───────┬──────┘<┐ └────┬────┘
No │ └────────────────────┘
Notice how the flow after "Send CR" goes right back to the
"More Prompt?" handler, rather than continuing to the next even in
the chain? Coninuing with the {:LOGIN} segment:
{:LOGIN}
{CALO mprompt,sendesc,Press <ESC> key}
{:MPROMPT} <───┐
{CALO mprompt,send_cr,More?} │ loops back to the
{LOOK First Name?} │ "More Prompt?" handler
. │ since the CALOok
. │ statement points to
. │ this location as the
{:SENDESC} │ "return" point
{SEND ^[} │
{RETU} │
{:SEND_CR} │
{SEND |} │
{RETU} ─────────────────────┘
Here's something for you to ponder: In the above example, I
specified a separate macro ID of "mrprompt" that I use as a place
holder or marker, if you will. Look at the following alternative for
the first 5 lines in the example above:
{:LOGIN}
{CALO login,sendesc,Press <ESC> key}
{CALO login,send_cr,More?}
{LOOK First Name?}
Do you see how I've been able to eliminate a couple bytes (the
"mprompt" macro ID) by "piggy-backing" on an already existing label?
(Continued in Lesson 5d)
Jim