home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 03 / PSSA411.ZIP / STOCK.DOC < prev    next >
Text File  |  1996-07-10  |  29KB  |  617 lines

  1.  
  2.     ===========================================================================
  3.     ===                                                                     ===
  4.     ===                          STOCK FILE BASICS                          ===
  5.     ===                                                                     ===
  6.     ===========================================================================
  7.  
  8.  
  9.     Stock files are files that contain "stock" (i.e. generic) text -- material
  10.     that is displayed frequently.  For example, the BBS sign-on logo is
  11.     contained in a stock file (named LOGOXX.STD).  The welcoming message is
  12.     also contained in a stock file, and so on.
  13.  
  14.     To modify a stock file, you need a text editor, such as DOS EDLIN or EDIT,
  15.     or a programmer's editor, or a word-processor in non-document (generic DOS
  16.     text) mode.  We recommend that you try out one of the excellent shareware
  17.     editors such as QEdit (address given later).
  18.  
  19.     Each stock file contains text, and sometimes contains comments; any line
  20.     that begins with a semi-colon is not displayed when the stock file is
  21.     shown.  Stock files can also contain color controls and special programming
  22.     commands -- these will be described later on.
  23.  
  24.     In order to browse through the various stock files, enter the following
  25.     command at the DOS prompt:
  26.  
  27.     SEE *.STD
  28.  
  29.     This will let you select and display all files with a STD extension. (Stock
  30.     files also use the GRA and ANS extensions.)
  31.  
  32.     The SEE command can also print the file.  Before you modify the file, it is
  33.     a good idea to either print it out or make a backup copy.  You can make
  34.     backup copies of all STD stock files by entering the following DOS command:
  35.  
  36.     COPY *.STD *.OLD
  37.  
  38.     This creates a second copy of each stock file, named <filename>.OLD.  (For
  39.     example, LOGOXX.STD would be duplicated in LOGOXX.OLD)  Thus, if you make a
  40.     mistake and Sapphire no longer understands the file, you can restore it to
  41.     its original form with the command:
  42.  
  43.     COPY <filename>.OLD <filename>.STD
  44.  
  45.  
  46.                            ------------------------------
  47.                            THE THREE TYPES OF STOCK FILES
  48.                            ------------------------------
  49.  
  50.     Stock files come in three varieties, identified with the STD, GRA and ANS
  51.     file extensions...
  52.  
  53.  
  54.       EXTENSION      MEANING
  55.       ---------      -------
  56.         .STD         Contains standard ASCII (no value greater than 128)
  57.         .GRA         Contains IBM-PC extended ASCII ("graphics")
  58.         .ANS         Contains ANSI controls
  59.  
  60.  
  61.     For example, a standard stock file might be named MAINXX.STD, while its
  62.     graphic equivalent would be named MAINXX.GRA and its ANSI equivalent would
  63.     be named MAINXX.ANS.
  64.  
  65.     A user will normally see only the standard stock files (i.e. those with the
  66.     STD extension).  However, the user can use Sapphire's GRAPHICS command to
  67.     turn on the GRA or ANS stock files.  (Under certain circumstances, the
  68.     user's ability to display ANS stock files is detected automatically by
  69.     Sapphire.  See SYSOP:CONFIG:BASIC:SECURITY:SIGN-ON for details.)
  70.  
  71.     See SYSOP:INFO:FILES for a description of the purpose of each stock file.
  72.  
  73.  
  74.                             ----------------------------
  75.                             STOCK FILE NAMING CONVENTION
  76.                             ----------------------------
  77.  
  78.     Most of the stock files that come with Sapphire follow the naming format of
  79.     four characters and two X's for the root name (e.g. LOGOXX.STD).  These
  80.     files will be displayed to any user who encounters the situation in which
  81.     it is appropriate to display the stock file.
  82.  
  83.     You can exercise a measure of control over which files get displayed,
  84.     depending on how you name the stock files.  The "XX" part of the file name
  85.     holds the key:
  86.  
  87.     FORMAT:     AAAABC.DDD
  88.  
  89.     EXAMPLE#1:  UPFNXX.GRA
  90.     EXAMPLE#2:  MAINX1.STD
  91.  
  92.     In the FORMAT given above, the letters have the following meaning:
  93.  
  94.     AAAA  Four letters identifying the purpose of the stock file.  In the
  95.           examples, UPFN is the file that is displayed when the user has to
  96.           supply an UPload File Name.  MAIN is displayed as the MAIN menu.
  97.     B     User membership level (1 to 8)
  98.     C     User expertise level (1 to 3)
  99.     DDD   File extension (STD, GRA or ANS -- as explained previously)
  100.  
  101.     Whenever Sapphire has to display a stock file, it will first try to find a
  102.     file that matches the user membership and expertise level (expertise level
  103.     is set via the EXPERT command).  Thus, a level 3 user with expertise set at
  104.     level 1 would see a file named MAIN31.STD when it is time to show the main
  105.     menu.  That is to say, he would see the file if it existed.
  106.  
  107.     If it does not exist, Sapphire tries to find a file that matches but has an
  108.     X in one or both positions.  It will then pick the one that matches best.
  109.  
  110.     EXAMPLE:  User is at membership level 4, expertise 3.
  111.  
  112.     FILES:    MAIN43.??? would be shown (??? here means STD, GRA or ANS)
  113.               MAIN4X.??? would be shown if MAIN43.??? didn't exist
  114.               MAINX3.??? would be shown if the previous two didn't exist
  115.               MAINXX.??? would be shown if none of the previous existed
  116.               Nothing    would be shown if none of the previous existed
  117.  
  118.     The final line introduces an important concept in the use of stock files.
  119.     By leaving out XX files for a given stock file application, you will
  120.     prevent certain people from seeing that type of file.
  121.  
  122.     The most obvious application is for the main menu.  In the standard
  123.     Sapphire package, only MAINX1 is defined, which means that any membership
  124.     level can see that file, but only if their expertise level is set to 1.  If
  125.     their expertise level is set to 2 or 3, they will NOT see a menu.
  126.  
  127.     You may wish to define some additional main menus.  This is, in fact, an
  128.     ideal way to get familiar with stock file operations.  In order to provide
  129.     complete coverage of all membership and expertise levels, you could define
  130.     the following 48 files (where ??? means both a STD and GRA file):
  131.  
  132.                         MAIN11.???   MAIN12.???   MAIN13.???
  133.                         MAIN21.???   MAIN22.???   MAIN23.???
  134.                         :            :            :
  135.                         :            :            :
  136.                         MAIN71.???   MAIN72.???   MAIN73.???
  137.                         MAIN81.???   MAIN82.???   MAIN83.???
  138.  
  139.     In actual practice, however, you probably won't define menus for users at
  140.     expertise level 2 or 3, so you'll actually define the following files...
  141.  
  142.                             MAIN11.???   to   MAIN81.???
  143.  
  144.     which is a more manageable task -- only 16 files.
  145.  
  146.  
  147.                           -------------------------------
  148.                           DRAWING WITH GRAPHIC CHARACTERS
  149.                           -------------------------------
  150.  
  151.     In order to put graphic (extended ASCII) characters into a .GRA stock file,
  152.     you can use one of the following methods:
  153.  
  154.     1.  Press and hold the ALT key, followed by three digits on the numeric
  155.         keypad.  This lets you enter any extended ASCII character.  For
  156.         example, to enter a solid block character, hold down ALT then press (on
  157.         the numeric keypad) 2, then 1, then 9.  Release the ALT key.
  158.  
  159.         The problem with this method is that it is more than a little cumber-
  160.         some, and it does not work on all machines.  Also, some pop-up (TSR)
  161.         programs may prevent it from working.
  162.  
  163.    2.   Define the graphics characters via a keyboard macro program, such as
  164.         Cruise Control, NewKey, PRD+, ProKey, SmartKey or SuperKey.  If you
  165.         would like an example of how we set up SuperKey macros to perform this
  166.         task, just drop us a line asking for our SuperKey PC-ASCII macros,
  167.         enclosing $3 to defray the cost of the disk and postage.
  168.  
  169.    3.   Obtain a copy of an ANSI animator program that has the ability to save
  170.         straight ASCII.  One example is the shareware program TheDraw.  For
  171.         more information, write to:
  172.  
  173.                                      Ian Davis
  174.                             TheSoft Programming Services
  175.                                1929 Whitecliff Court
  176.                                   Walnut Creek, CA
  177.                                     U.S.A. 94596
  178.  
  179.     4.  Most text editors have a rudimentary capability for drawing with
  180.         graphic characters.  The QEdit editor is a very fast, reasonably
  181.         powerful editor available in shareware.  For information, contact:
  182.  
  183.                                       SemWare
  184.                              4343 Shallowford Road #C3A
  185.                                     Marietta, GA
  186.                                  U.S.A. 30062-5022
  187.                                Phone: (404) 641-9002
  188.                                Fax:   (404) 640-6213
  189.                                BBS:   (404) 641-8968
  190.  
  191.  
  192.                                      ----------
  193.                                      ANSI FILES
  194.                                      ----------
  195.  
  196.     ANSI files (stock files with an ANS extension) can be prepared with an ANSI
  197.     animator program such as TheDraw (address given earlier).
  198.  
  199.     When preparing ANSI files, you should avoid initializing with a Clear
  200.     Screen command; the user can specify via the GRAPHICS command whether or
  201.     not he wants his screen cleared.  You may also have to edit the file
  202.     afterwards with a text editor to remove trailing linefeeds.
  203.  
  204.     Sapphire transmits all ANSI codes in the file to the remote user.  At the
  205.     console, it implements ANSI x3.64 commands in the following way:
  206.  
  207.     ESC[y,xH     Cursor position y,x (the H is sometimes a lowercase "f")
  208.     ESC[H        Means y=1 x=1
  209.  
  210.     ESC[nA       Cursor  Up  n lines, default 1, no wrap takes place
  211.     ESC[nB       Cursor Down n lines, default 1, no wrap takes place
  212.  
  213.     ESC[nC       Cursor Forward  n characters, default 1, no wrap takes place
  214.     ESC[nD       Cursor Backward n characters, default 1, no wrap takes place
  215.  
  216.     ESC[s        Save cursor position (saved for the current stock file only)
  217.     ESC[u        Restore cursor position (if saved during this stock file)
  218.  
  219.     ESC[2J       Erase display (clear and home)
  220.     ESC[K        Erase to end of line (including clear of cursor position)
  221.  
  222.     ESC[n;...nm  Set colors and attributes, as follows:
  223.  
  224.                  0  All attributes off (sets Dim White [Light Gray] on Black)
  225.                  1  Bold (e.g. turns Light Gray into White)
  226.                  2  Dim (e.g. turns White into Light Gray)
  227.                  3  Not defined
  228.                  4  Underline (ignored)
  229.                  5  Blink
  230.                  6  Not defined
  231.                  7  Reverse video (swaps foreground and background colors)
  232.                  8  Invisible (sets foreground color to background color)
  233.  
  234.                  Foreground Colors     Background Colors
  235.                  -----------------     -----------------
  236.                  30  Black             40  Black
  237.                  31  Red               41  Red
  238.                  32  Green             42  Green
  239.                  33  Yellow            43  Yellow
  240.                  34  Blue              44  Blue
  241.                  35  Magenta           45  Magenta
  242.                  36  Cyan              46  Cyan
  243.                  37  White             47  White
  244.  
  245.  
  246.     ESC[nL       (NANSI code -- ignored) Insert n blank lines at cursor line.
  247.     ESC[nM       (NANSI code -- ignored) Delete n lines including cursor line.
  248.     ESC[n@       (NANSI code -- ignored) Insert n blank chars at cursor.
  249.     ESC[nP       (NANSI code -- ignored) Delete n chars including cursor char.
  250.     ESC[n;ny     (NANSI code -- ignored) Output character translation
  251.  
  252.     ESC["str"p   (Ignored)  Keyboard Key Reassignment.
  253.  
  254.     ESC[y;xR     (Ignored)  Report cursor position
  255.     ESC[6n       Request cursor position.  This is used for automatic ANSI
  256.                  detection (see SYSOP:CONFIG:BASIC:SECURITY:SIGN-ON) but is not
  257.                  used in stock files.
  258.  
  259.     ESC[=nh      (Ignored) Set mode
  260.     ESC[=nl      (Ignored) Reset Mode
  261.  
  262.     If any other codes are encountered that seem to follow the ANSI pattern
  263.     (i.e. Escape followed by an open bracket), the code is ignored.  Some
  264.     characters may be lost if an unknown code is encountered, because Sapphire
  265.     will have no way to know how long the code is supposed to be.
  266.  
  267.     By the way, Sapphire contains its own ANSI processing code -- you do NOT
  268.     have to load a DOS driver (such as ANSI.SYS) in order to support ANSI
  269.     stock files.
  270.  
  271.  
  272.  
  273.     ===========================================================================
  274.     ===                                                                     ===
  275.     ===                        STOCK FILE PROGRAMMING                       ===
  276.     ===                                                                     ===
  277.     ===========================================================================
  278.  
  279.  
  280.     STD and GRA stock files (though not ANS stock files) can contain, apart
  281.     from text, special lines that the user does not see.  These are as follows:
  282.  
  283.  
  284.     CATEGORY  COMMAND     EXAMPLE          MEANING
  285.     --------  ----------- ---------------  --------
  286.  
  287.     Display   ;<number>   ;8               Keeps lines together on screen
  288.               ;FNC color  ;FNC WOE         Sets functional color of the display
  289.               ;EXP number ;EXP 2           Quits for higher expertise levels
  290.               ;LEV number ;LEV 2           Quits for lower membership levels
  291.               ;NSK        ;NSK             Turns off spacebarring
  292.               ;SKI        ;SKI             Turns spacebarring back on (default)
  293.  
  294.     Logging   ;<space>    ; My stock file  A comment
  295.               ;LOG text   ;LOG Pistachio   Places text in system (OBSERVE) log
  296.               ;FIL        ;FIL XYZ.TXT     Opens a logging file
  297.               ;TLN        ;TLN Attention!  Logs text, followed by a new line
  298.               ;TXT        ;TXT ATTENTION:  Logs text but stays on same line
  299.               ;QLN        ;QLN Your name?  Question, followed by new line
  300.               ;QUE        ;QUE Name:       Question, but stays on same line
  301.               ;QNM        ;QNM Your age:   Asks for a number
  302.               ;QPH        ;QNM Phone?      Asks for phone number
  303.               ;QCH        ;QCH YN Okay?    Asks for a single-character answer
  304.               ;QYN        ;QYN Agreed?     Asks a Yes/No question (default Y)
  305.               ;QNY        ;QNY Agreed?     Asks a Yes/No question (default N)
  306.  
  307.  
  308.  
  309.                                   ----------------
  310.                                   THE KEEP COMMAND
  311.                                   ----------------
  312.  
  313.     The "semicolon number" command is known as "The Keep Command".  It is used
  314.     when you want to ensure that certain text in a stock file is kept together
  315.     on one screen, instead of being broken in the middle with a "More, Jot,
  316.     Quit" prompt (which is displayed when the screen is full).
  317.  
  318.     Let's say you had placed, in a stock file, a list of phone numbers that was
  319.     8 lines long.  It would be annoying to the reader if it was broken up in
  320.     the middle.  So you could start the table like this:
  321.  
  322.     ;8
  323.     PHONE NUMBER   CONTACTS
  324.     ------------   --------
  325.     514-345-9578   Pinnacle Voice Support
  326.     514-345-8654   Pinnacle Free Files BBS
  327.     :
  328.     etc.
  329.  
  330.     The  ;8  line will ensure that the next 8 lines are always presented on the
  331.     same screen, even if it means presenting the "More, Jot, Quit" prompt a
  332.     little early.
  333.  
  334.     For examples of the keep command, refer to the stock file HINTXX.STD.
  335.  
  336.  
  337.                                ----------------------
  338.                                FNC (FUNCTIONAL COLOR)
  339.                                ----------------------
  340.  
  341.     The "functional color" command lets you specify the color of the following
  342.     text.  Normally, stock files are displayed in light gray.  You can switch
  343.     colors by using the ;FNC command.  The command works this way:
  344.  
  345.     COMMAND   COLOR USED     THEME OR FUNCTION
  346.     -------   ----------     -----------------
  347.     ;FNC HLP  Yellow         Helpful or explanatory information
  348.     ;FNC INP  Light Cyan     User input
  349.     ;FNC QUE  Light Green    Text preceding user input (a prompt)
  350.     ;FNC WOE  Light Red      Something unusual or troublesome is happening
  351.     ;FNC INF  Green          Regular information and progress messages
  352.     ;FNC FIL  Light Grey     Stock and message file output
  353.     ;FNC HDG  Light Blue     A heading or title
  354.     ;FNC INI  Light Grey     Initializes an alternating-color list
  355.     ;FNC LIS  LtGry/Cyan     Switches to opposite color in list
  356.     ;FNC HEY  Lt Magenta     Emphasized output
  357.  
  358.     The INI and LIS colors are a little different from the others.  When you
  359.     specify INI, it initializes "list color processing".  Thereafter, every
  360.     time Sapphire sees  ;FNC LIS  it will switch between Light Grey and Cyan.
  361.     This technique is very handy for distinguishing lines in a list.
  362.  
  363.  
  364.                          ---------------------------------
  365.                          EXP AND LEV (EXPERTISE AND LEVEL)
  366.                          ---------------------------------
  367.  
  368.     The EXP command skips the rest of the stock file if the user's expertise is
  369.     above the specified level.  This lets you bail out of a file before it gets
  370.     into details that an expert user doesn't need to hear.  For an example of
  371.     EXP, see SETRXX.STD:  although this is an XX stock file (and thus would be
  372.     seen by all expertise levels), it uses EXP 2 to keep people at expertise
  373.     level 3 from having to read the text.  You could do the same thing by
  374.     creating two files (named SETRX1.STD and SETRX2.STD) but in this particular
  375.     case, it is simpler to use one file and the EXP command.
  376.  
  377.     The LEV command skips the rest of the stock file if the user does not have
  378.     a sufficiently high membership level.  See GIMMXX.STD for an example.
  379.  
  380.  
  381.                            ------------------------------
  382.                            NSK AND SKI (NO-SKIP AND SKIP)
  383.                            ------------------------------
  384.  
  385.     Normally, a user can skip a stock file by pressing the spacebar.  If you
  386.     have something particularly important to convey, you can turn this off with
  387.     the ;NSK command.  After you have conveyed the vital part of your message,
  388.     you can make spacebarring possible again with the ;SKI command.
  389.  
  390.  
  391.                                   ----------------
  392.                                   COMMENTS AND LOG
  393.                                   ----------------
  394.  
  395.     The comment and logging commands are self-explanatory.  You can find
  396.     examples of both in the file UPDFXX.STD, which is the stock file that is
  397.     displayed when the user tries to upload and there is not enough free space
  398.     on the disk.  In such case, you want to log this fact to the OBSERVE log so
  399.     that you will find out about it when you read the log later on.
  400.  
  401.     You can use the LOG command to record the "Off" time in the OBSERVE log
  402.     (normally Sapphire only reports when the user connected).  To do this,
  403.     enter the following command in the file GDBYXX.STD:
  404.  
  405.     ;LOG User disconnected
  406.  
  407.     This will pace the line "User disconnected" in the OBSERVE log when the
  408.     user displays the stock file GDBYXX.STD, which is to say, when he logs off.
  409.  
  410.  
  411.                                 --------------------
  412.                                 FIL (OPEN TEXT FILE)
  413.                                 --------------------
  414.  
  415.     The FIL command opens a file for the text and questionnaire commands.  For
  416.     example, if you created a stock file which contained:
  417.  
  418.     ;FIL MYFILE.TXT
  419.     ;TLN Hello world!
  420.  
  421.     The phrase "Hello world!" would be saved at the end of the file MYFILE.TXT
  422.     every time the stock file is displayed.  If you omit the FIL command, the
  423.     text and questionnaire commands will use the file name "ANSWERS.TXT".  Only
  424.     one FIL command is permitted per stock file.
  425.  
  426.     If you do not specify a full path name, the FIL command assumes you mean
  427.     the current directory (i.e. your main Sapphire directory).  You can,
  428.     however, place the file in another directory.  For example:
  429.  
  430.     ;FIL C:\MYFILE.XYZ
  431.     ;TLN This text will be saved in a file called MYFILE.XYZ in the
  432.     ;TLN root directory of the C: drive!
  433.  
  434.     Obviously, any file that grows without limit can fill up your disk, though
  435.     in actual practice it is quite unlikely that your users could fill out that
  436.     many questionnaires if you have a reasonably uncluttered hard disk.  Never-
  437.     theless, to make it impossible for questionnaires to fill up your disk,
  438.     Sapphire permits you to set a level at which answers to questions are not
  439.     saved to disk.  See SYSOP:CONFIG:ADVANCED:GENERAL:STOCK-FILES.  (In the
  440.     unlikely event your disk did fill up, many warnings would be placed in the
  441.     OBSERVE log to attract your attention to the problem.)
  442.    
  443.  
  444.                               ------------------------
  445.                               TLN AND TXT (WRITE TEXT)
  446.                               ------------------------
  447.  
  448.     As shown in the description of the FIL command, you can use TLN to place a
  449.     line of text in a file.  This file can later be viewed with the SEE program
  450.     (included with Sapphire) or loaded into a text editor program.
  451.  
  452.     The TXT command also puts text in the file, but it does not place an "end
  453.     of line" in the file.  For example:
  454.  
  455.     ;FIL MYFILE.TXT
  456.     ;TLN This is a test
  457.     ;TXT This is also
  458.     ;TLN a test
  459.  
  460.     After the stock file is displayed, MYFILE.TXT would contain:
  461.  
  462.     This is a test
  463.     This is also a test
  464.  
  465.     The TXT command is useful for labelling the results of questions, as in
  466.     this example:
  467.  
  468.     ;FIL C:\ANSWERS\ANSWER.TXT
  469.     ;TXT Name:
  470.     ;QLN What is your name?
  471.  
  472.     This would ask the user for his name, which would be written to the file.
  473.     But before that is done, "Name:" is written to the file.  So the file would
  474.     read something like this:
  475.  
  476.     Name:Fred Jones
  477.  
  478.     If you want to place some spaces at the end of the Name: text, you may find
  479.     that your text editor removes them; many text editors have a "strip
  480.     trailing blanks" feature.  You can specify the blanks by enclosing the text
  481.     in double quotes, as follows:
  482.  
  483.     ;FIL TEST.TXT
  484.     ;TXT "Address:  "
  485.     ;QLN What is your address?
  486.  
  487.     This would write the answer to the question to the file TEST.TXT, resulting
  488.     in something like this:
  489.  
  490.     Address:  1024 Disque Drive, Byteville, Oregon
  491.  
  492.    
  493.                              --------------------------
  494.                              QUE AND QLN (ASK FOR TEXT)
  495.                              --------------------------
  496.  
  497.     The QUE command can ask a question, get user input, and save the input in a
  498.     text file.  For example:
  499.  
  500.     ;FIL HELLO.TXT
  501.     ;QUE Where are you calling from?
  502.  
  503.     If you put these commands in the stock file NEWUXX.STD (which is displayed
  504.     when somebody signs up), it would display the question and save the user's
  505.     answer in the file HELLO.TXT.
  506.  
  507.     Sapphire places appropriate spaces after colons (:) and question marks (?)
  508.     when asking a question.  However, if you want to line up your answers on
  509.     the screen, you will want to pad out the question with spaces.  Since some
  510.     text editors remove trailing spaces, Sapphire lets you specify the spaces
  511.     by enclosing the question text in double quotes:
  512.  
  513.     ;FIL ADDR.TXT
  514.     ;QUE "Where are you calling from?         "
  515.     ;QUE "Where did you hear about this BBS?  "
  516.  
  517.     This would line up the answers nicely on the screen.  If you also want to
  518.     line up the answers in the output file, you can use the TXT command:
  519.  
  520.     ;FIL ADDR.TXT
  521.     ;TXT "Calling from:         "
  522.     ;QUE "Where are you calling from?         "
  523.     ;TXT "Heard about us from:  "
  524.     ;QUE "Where did you hear about this BBS?  "
  525.  
  526.     The QLN command does the same thing as QUE but starts on a new line.  This
  527.     is important if you think the user's input might require the full width of
  528.     a line.  For example:
  529.  
  530.     ;FIL ADDR.TXT
  531.     ;QLN What is your street address?
  532.  
  533.     This would give the user a full line to enter his street address.
  534.    
  535.  
  536.                       ----------------------------------------
  537.                       QNM AND QPH (NUMBER AND PHONE QUESTIONS)
  538.                       ----------------------------------------
  539.  
  540.     The QNM command works like the QUE command except that it only accepts
  541.     digits. This lets you prompt for a number, as in this example:
  542.  
  543.     ;FIL C:\ANSWERS\ANSWER.TXT
  544.     ;QNM How old are you?
  545.  
  546.     The user could type a number, then press Enter, but letters and special
  547.     characters would be ignored and would not show up on the screen.
  548.  
  549.     The QPH command asks for a phone number, using the phone number format you
  550.     specified in SYSOP:CONFIG:BASIC:GENERAL:PROMPTS.  If you blanked out the
  551.     phone number format, however, there is no compelling reason to use QPH
  552.     because there will be no phone number format to impose.
  553.  
  554.     Here is an example of the QPH command:
  555.  
  556.     ;FIL PHONENUM.TXT
  557.     ;QPH What is your phone number?
  558.  
  559.     This would ask the user for his phone number, filling in any special
  560.     characters automatically.  This is the same method that is used during
  561.     the standard sign-up procedure.
  562.    
  563.  
  564.                       ---------------------------------------
  565.                       QCH, QYN AND QNY (SINGLE-KEY QUESTIONS)
  566.                       ---------------------------------------
  567.  
  568.     The QCH command allows you to ask for a single character of input,
  569.     accepting only a certain set of characters.  For example, you could display
  570.     a menu of choices, and let the user choose one, as in this example:
  571.  
  572.     ;FIL QUERY.TXT
  573.     A)  Order our catalog
  574.     B)  Order our press kit (includes catalog)
  575.     C)  Have a salesperson call me today!
  576.     D)  None of the above
  577.     ;QCH ABCD Your choice:
  578.  
  579.     This would allow the user to press A, B, C or D -- all other keys will be
  580.     ignored, except the Enter key.  If the user presses that key, it will
  581.     automatically select the first letter in the list of choices.  Thus, in the
  582.     example given above, the user would get choice "A" if he pressed Enter, and
  583.     that letter would be written to the file QUERY.TXT.  If a user hangs up, it
  584.     simulates the pressing of the Enter key. (This applies to nearly all
  585.     Sapphire inputs.)
  586.  
  587.     The QYN and QNY commands are variations of QCH.  They accept Y or N (for
  588.     Yes and No) only.  QYN defaults to Y, while QNY does the opposite, assuming
  589.     that Enter means N.  For example:
  590.  
  591.     ;FIL YESNO.TXT
  592.     ;QYN "Are you enjoying your visit to this BBS?   "
  593.     ;QNY "Do you like any BBS's more than this one?  "
  594.  
  595.     The default answer to the first question is Yes, while the default answer
  596.     to the second question is No.  Note the use of quotes for trailing blanks.
  597.    
  598.  
  599.                          ----------------------------------
  600.                          DESIGNING EFFECTIVE QUESTIONNAIRES
  601.                          ----------------------------------
  602.  
  603.     Experience has shown that a questionnaire is most effective when:
  604.  
  605.     (1)  You warn the user in advance how many questions you will be asking
  606.     (2)  You don't ask too many questions
  607.     (3)  You don't ask questions that the user might consider irrelevant
  608.  
  609.     Many new sysops feel that they should know the address of the people who
  610.     call their board.  Some sysops ask for personal information such as the
  611.     caller's gender and age.  It's your computer, so you have the right to ask
  612.     whatever you want.  However, unless you plan to use the information in some
  613.     way, you should consider settling for their phone number.  A short, snappy
  614.     sign-on procedure is the best way to keep the user happy, which makes it
  615.     much more likely that you will get accurate information.
  616.  
  617.