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