home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / modem / jbtutor1.zip / LESSON2.TXT < prev    next >
Text File  |  1993-09-19  |  3KB  |  61 lines

  1. Lesson #2:  FLOWCHARTING
  2.  
  3.         After you've organized your thoughts on what it is you want the
  4. script to do, it's time to begin formalizing things by flowcharting your
  5. script.  There are standard symbols for flowcharting, but it's not
  6. really all that important for you to use them.  The standard symbology
  7. is important only if: a) it's the easiest thing for you to use and/or b)
  8. more than one person will be coding subsections of the
  9. script..standardization makes it easier for everyone involved in the
  10. project to understand script requirements.
  11.  
  12.         Let's take a look at what the beginning of a flowchart might
  13. look like for the mailrun script I described in LESSON #1:
  14.  
  15.           |-------------------------------------------|
  16.           |      ┌─────────────────┐                  |
  17.           |      │ Specify Which   │                  |
  18.           |      │ BBS To Call     │                  |
  19.           |      └────────┬────────┘                  |
  20.           |       ┌───────┴───────┐                   |
  21.           |       │ DIAL The BBS  │<───────────┐      |
  22.           |       └───────┬───────┘            │      |
  23.           |         ┌─────┴──────┐   No        │      |
  24.           |         │  CONNECT?  ├─────────────┘      |
  25.           |         └─────┬──────┘                    |
  26.           |-------------- │ Yes ----------------------|
  27.                     ┌─────┴──────┐
  28.                     │   LOGON    │
  29.                     └────────────┘
  30.  
  31.         If the script you're working on is going to be fairly complex,
  32. you can work on sub-elements a piece at a time..for example, the
  33. bounded section above.  Narrowing your focus helps to put boundaries
  34. on the total job.
  35.  
  36.         Once you've narrowed the tasks down into pieces that are easier
  37. to handle and once you've made the initial cut at flowcharting a
  38. sub-element, you can make additional refinements that enhance the
  39. operation of the sub-element.  For example, in the chart above:  after
  40. looking at the program flow, you decide that instead of just going back
  41. to the re-dial function after "no connect" you want to do things like:
  42. keep track of how many times you've dialed the particular BBS and not go
  43. back to re-dial once you get to some predefined # of attempts..you'd
  44. rather have the program Exit to Dos at that point rather than continue
  45. with the re-dialing.
  46.  
  47. END OF LESSON 2a..
  48.  
  49. Homework:  Revise the flowchart segment to include a check for how many
  50. times the script has attempted to dial the bbs, with an "Exit to DOS" if
  51. # of dial attempts = upper limit of attempts.
  52.  
  53. Next LESSON:  We'll code the bounded area..to include the test for # of
  54. dial attempts..
  55.  
  56.  
  57. Jim
  58.  
  59.  
  60. ... OFFLINE 1.52
  61.