home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / BBSKIT.ZIP / BBSKIT.DOC < prev    next >
Encoding:
Text File  |  1991-04-12  |  115.1 KB  |  5,404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                                        BBSkit
  34.  
  35.  
  36.                        A Turbo Pascal unit for the BBS author
  37.  
  38.  
  39.                                Written by Steve Madsen
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                  This manual and the BBSkit units are copyright (c) 1991
  47.  
  48.             by Steven Madsen.  All rights reserved.
  49.  
  50.  
  51.                  Throughout this manual, references are made    to other
  52.  
  53.             products:
  54.  
  55.  
  56.             IBM is a registered trademark, and PC-DOS is a trademark of,
  57.  
  58.             International Business Machines Corporation.
  59.  
  60.             MS-DOS is a trademark of Microsoft Corporation.
  61.  
  62.             Macintosh is a trademark of Apple Computer, Inc.
  63.  
  64.             Borland and Turbo Pascal are registered trademarks        of
  65.  
  66.             Borland International, Inc.
  67.  
  68.             Touch-Tone is a registered trademark of American Telephone &
  69.  
  70.             Telegraph.
  71.  
  72.  
  73.                  This program is being provided to you on a trial basis.
  74.  
  75.             It is being marketed under the ShareWare idea.  If  you find
  76.  
  77.             this product useful, you are expected to register it    with
  78.  
  79.             the author for $40 in United States funds.              This
  80.  
  81.             registration fee includes a registered version of        the
  82.  
  83.             software, a printed user's manual, free support from     the
  84.  
  85.             author, and update notices.
  86.  
  87.                  Send registration fees to:
  88.  
  89.  
  90.                       Steven Madsen
  91.  
  92.                       1888 Edith Marie Drive
  93.  
  94.                       Beavercreek, OH   45431
  95.  
  96.  
  97.                  Please specify 5.25" or 3.5" disk sizes.            All
  98.  
  99.             registrations must be in the form of a check or money order,
  100.  
  101.             made out to Steven Madsen.  Please allow 4 to 6 weeks    for
  102.  
  103.             delivery of your order.
  104.  
  105.                  Registered versions of     BBSkit include Xmodem/CRC,
  106.  
  107.             Xmodem/1K and Zmodem batch protocol support              for
  108.  
  109.             send/receive, lots of sample code for things such as    chat
  110.  
  111.             mode, time limits, and color, and  a utility to create your
  112.  
  113.             own terminal emulation templates.  The    registered version
  114.  
  115.             will also clear the two second product plug at the beginning
  116.  
  117.             of all products written with BBSkit.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.                               BBSkit Manual      Page 2
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.             Table of Contents
  143.  
  144.  
  145.             Chapter 1: Getting Started
  146.             Chapter 1: Getting Started
  147.             Chapter 1: Getting Started.............................4
  148.  
  149.                BBSkit Overview........................................4
  150.  
  151.                The Modem..............................................4
  152.  
  153.                The Serial Connection..................................5
  154.  
  155.                The Computer (and Software)............................5
  156.  
  157.             Chapter 2: Programming with BBSkit
  158.             Chapter 2: Programming with BBSkit
  159.             Chapter 2: Programming with BBSkit....................7
  160.  
  161.                Inheriting TBBS........................................7
  162.  
  163.                Expanding TBBS.........................................7
  164.  
  165.                Overriding Critical Methods............................7
  166.  
  167.             Chapter 3: BBSkit Methods & Types
  168.             Chapter 3: BBSkit Methods & Types
  169.             Chapter 3: BBSkit Methods & Types.....................11
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.                               BBSkit Manual      Page 3
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.             Getting Started                                    Chapter 1
  222.  
  223.  
  224.             BBSkit Overview
  225.  
  226.  
  227.                  BBSkit was developed because    there was a lack of
  228.  
  229.             software packages available for the sysop who didn't want to
  230.  
  231.             run someone else's software.  It  was created with the idea
  232.  
  233.             that writing a  BBS shouldn't be mostly low-level work with
  234.  
  235.             the modem  and serial port, that it should be honing your
  236.  
  237.             user interface to perfection.  BBSkit does its  best to take
  238.  
  239.             out all the hard work, and    leave the path open for your
  240.  
  241.             ideas to take form.
  242.  
  243.                  BBSkit is   more than a BBS toolkit.  It has the
  244.  
  245.             capability of writing complete door programs, accessible to
  246.  
  247.             other, pre-written software.  The only requirement is   that
  248.  
  249.             your host BBS software  also uses a FOSSIL driver.  BBSkit
  250.  
  251.             can still take care of all the low-level work.
  252.  
  253.                  The program was created with Turbo Pascal 6.0, and will
  254.  
  255.             run on any version from 5.5 or later.  The reason?    BBSkit
  256.  
  257.             makes use of the later version's implementation of  objects.
  258.  
  259.             An object is like a Pascal  record
  260.                                         record
  261.                                         record, but it also includes the
  262.  
  263.             code that makes use of the data, binding both code  and data
  264.  
  265.             into one variable type.   By making use of objects, BBSkit
  266.  
  267.             can be provided as a unit,     yet it is still completely
  268.  
  269.             expandable because the whole  program is one giant object:
  270.  
  271.             TBBS
  272.             TBBS
  273.             TBBS.
  274.  
  275.                  (At this point, if  you are unsure what an object is,
  276.  
  277.             you should consult your  manuals.  Pascal 5.5 came with an
  278.  
  279.             "OOP Guide," which is exactly what you want to read to learn
  280.  
  281.             all about objects.  Pascal 6.0 has included  the "OOP Guide"
  282.  
  283.             in the "User's Guide," chapter four.)
  284.  
  285.                  BBSkit provides a host of features:
  286.  
  287.  
  288.                  *  Redirection of I/O in any of up to 16 combinations.
  289.  
  290.                  *  Complete support for FOSSIL driven serial I/O.
  291.  
  292.                  *  Optional inactivity timeout from keyboard or serial
  293.  
  294.                     port.
  295.  
  296.                  *  Optional automatic carrier checking.
  297.  
  298.                  *  Control of line feeds after carriage return for
  299.  
  300.                     remote users.
  301.  
  302.                  *  Optional pause after each screen of text.
  303.  
  304.                  *  Built-in Xmodem for file send & receive.
  305.  
  306.                  *  Completely expandable TBBS object.
  307.  
  308.                  *  User overrideable methods during a ComReadKey or
  309.  
  310.                     ComReadKeyE.
  311.  
  312.                  *  ANSI and non-ANSI terminal emulation, with 14
  313.  
  314.                     templates provided.
  315.  
  316.                  *  and more!
  317.  
  318.  
  319.             The Modem
  320.  
  321.  
  322.                  Required equipment for any computer bulletin      board
  323.  
  324.             system is a modem connected to your computer.  BBSkit  is no
  325.  
  326.             different.  Modems   are either internal or external.  An
  327.  
  328.  
  329.                               BBSkit Manual      Page 4
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.             internal modem is   one that is plugged directly into the
  337.  
  338.             computer through one of your computer's slots; it         is
  339.  
  340.             completely hidden from view and takes up no desk space.   An
  341.  
  342.             external modem is one that sits on your   desk.  It usually
  343.  
  344.             has lights that let you know what the modem is doing at  any
  345.  
  346.             given time.  One type of modem is not superior in any way to
  347.  
  348.             another.  Both get the job    done.  Refer to your modem's
  349.  
  350.             manual for instructions    on how to connect it to your
  351.  
  352.             computer if it has not been done already.
  353.  
  354.                  Unfortunately, there was a  time when modems were not
  355.  
  356.             standardized.  BBSkit requires the use of a Hayes-compatible
  357.  
  358.             modem for dialing, answering the phone, or any         other
  359.  
  360.             activity that is modem related and directly supported     by
  361.  
  362.             BBSkit.
  363.  
  364.                  The modem must be capable of reporting the       actual
  365.  
  366.             carrier signal to the computer through the DCD (data carrier
  367.  
  368.             detect) line.  Some modems have  DIP switches that tell the
  369.  
  370.             modem to report  DCD as high all the time.  If this is the
  371.  
  372.             case, the  modem must be configured to report DCD as high
  373.  
  374.             only when the modem is actually connected to         another
  375.  
  376.             computer.  Refer to your manual for properly     configuring
  377.  
  378.             your modem.
  379.  
  380.  
  381.             The Serial Connection
  382.  
  383.  
  384.                  BBSkit also requires that  your modem be connected to
  385.  
  386.             your computer through a RS-232C serial port connected to any
  387.  
  388.             communications port from COM1: through COM4:.   (If you have
  389.  
  390.             an internal modem, refer to your manuals for   installation.
  391.  
  392.             Internal modems also have the side benefit of providing    a
  393.  
  394.             serial port for you, so you may skip this section.)
  395.  
  396.                  An RS232C is what your computer uses to     communicate
  397.  
  398.             with serial devices,   such as your modem and sometimes a
  399.  
  400.             mouse.  Connecting the modem through a cable  to your serial
  401.  
  402.             port allows BBSkit to drive the modem.  Generally,       any
  403.  
  404.             serial port driver by an 8250 chip or a 16550 chip will   be
  405.  
  406.             compatible with BBSkit.     (BBSkit does not support the
  407.  
  408.             extended features of a 16550.)  As   a rule, if your modem
  409.  
  410.             works with your computer, then BBSkit will work with    your
  411.  
  412.             modem.
  413.  
  414.                  External modems must use serial cables which        are
  415.  
  416.             capable of detecting signals that the modem can report, such
  417.  
  418.             as the carrier detect line.  Most serial  cables are capable
  419.  
  420.             of reporting the correct signal, so this should not prove to
  421.  
  422.             be a problem.
  423.  
  424.  
  425.             The Computer (and Software)
  426.  
  427.  
  428.                  Any IBM-compatible computer        running an 80x86
  429.  
  430.             microprocessor will support BBSkit.     You also must be
  431.  
  432.             running either PC-DOS or MS-DOS version  2.10 or higher, and
  433.  
  434.             have Turbo Pascal version 5.5 or higher.  BBSkit is provided
  435.  
  436.             as a unit for both versions 5.5   and 6.0 of Turbo Pascal.
  437.  
  438.             Version 5.5 units are not compatible    with version 6.0 of
  439.  
  440.  
  441.                               BBSkit Manual      Page 5
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.             Pascal, and vice versa, so be sure you use the  correct unit
  449.  
  450.             or Pascal will give you an error when you attempt to compile
  451.  
  452.             a program.  Memory requirements vary from version to version
  453.  
  454.             of Pascal, and depend on the environment you  choose to work
  455.  
  456.             in (integrated or  command-line).  BBSkit does not make use
  457.  
  458.             of any expanded  or extended memory, and will not interfere
  459.  
  460.             with any RAM disks or disk  caches installed.  Overlays are
  461.  
  462.             supported by Pascal while BBSkit is in use.
  463.  
  464.                  In addition to that, you will need a copy   of a FOSSIL
  465.  
  466.             driver, such as Ray Gwinn's X00 or David   Nugent's BNU.  A
  467.  
  468.             FOSSIL driver is what BBSkit uses to interface to       your
  469.  
  470.             modem.  The FOSSIL driver takes    care of low-level serial
  471.  
  472.             I/O, and provides features that a built-in interface   would
  473.  
  474.             have difficulty handling.
  475.  
  476.                  BBSkit is compatible with any type  of DOS disk device,
  477.  
  478.             such as hard drives, 5.25" and 3.5" drives  (normal and high
  479.  
  480.             density).  BBSkit also supports the      use of a printer,
  481.  
  482.             connected to any port recognizable by Pascal and         the
  483.  
  484.             Write(Lst, ...) command (usually LPT1:).  BBSkit        also
  485.  
  486.             supports the extended  text displays of the EGA (80x43) and
  487.  
  488.             the VGA (80x50), but it does not support graphics       mode
  489.  
  490.             directly.  (But what's  to stop you from expanding TBBS if
  491.  
  492.             you really want to write a BBS in graphics mode?)
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                               BBSkit Manual      Page 6
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.             Programming with BBSkit                            Chapter 2
  534.  
  535.  
  536.             Inheriting TBBS
  537.  
  538.  
  539.                  The very first    thing you will want to do before
  540.  
  541.             anything else in your  BBSkit enhanced programs is   inherit
  542.  
  543.             the TBBS object, which is the platform for the entire BBSkit
  544.  
  545.             unit.  Inheriting is  simply the process of defining a new
  546.  
  547.             type
  548.             type
  549.             type, which will have all the properties of the parent type,
  550.  
  551.             as well as any new qualities you may          want to add.
  552.  
  553.             Inheritance is   unique to objects and object oriented
  554.  
  555.             programming.  Inheriting TBBS is simple:
  556.  
  557.  
  558.                  TMyBBS = object(TBBS)
  559.  
  560.                  end;
  561.  
  562.  
  563.                  These two lines would go under your   Type
  564.                                                        Type
  565.                                                        Type declarations
  566.  
  567.             at the top of your program.  Essentially, all you  have done
  568.  
  569.             here is created a new object called TMyBBS that is identical
  570.  
  571.             with the  TBBS object that is provided.  Still, to expand
  572.  
  573.             TBBS and write a BBS or anything else      using the BBSkit
  574.  
  575.             enhancements, it is a requirement.
  576.  
  577.  
  578.             Expanding TBBS
  579.  
  580.  
  581.                  Left alone, TBBS can't run a BBS for you,   or become a
  582.  
  583.             full featured terminal program.   TBBS simply provides the
  584.  
  585.             tools to create such programs.  To make use of      BBSkit's
  586.  
  587.             abilities, you have to write some code to drive   them.  The
  588.  
  589.             only way to do that is to add your procedures  and functions
  590.  
  591.             to the original TBBS definition by expanding the   inherited
  592.  
  593.             object.  Let's say you wanted to   jump right in and start
  594.  
  595.             adding to the object:
  596.  
  597.  
  598.                  TMyBBS = object(TBBS)
  599.  
  600.                    PROCEDURE MyProcedure;
  601.  
  602.                  end;
  603.  
  604.  
  605.                  This would tell Pascal that you want to add a procedure
  606.  
  607.             definition (called a method) to your  object definition.  To
  608.  
  609.             complete the process, you would then write a       procedure
  610.  
  611.             somewhere in your code called    TMyBBS.MyProcedure
  612.                                              TMyBBS.MyProcedure
  613.                                              TMyBBS.MyProcedure.  It  is
  614.  
  615.             very important that the TMyBBS header is in front of each of
  616.  
  617.             your procedures or  functions so that Pascal knows where to
  618.  
  619.             find the code at compile time.  This is the point where  you
  620.  
  621.             really need to know the basics of objects      if you don't
  622.  
  623.             already.
  624.  
  625.  
  626.             Overriding Critical Methods
  627.  
  628.  
  629.                  TBBS alone provides three methods that are designed to
  630.  
  631.             provide a base from  which to drive BBSkit programs.  They
  632.  
  633.             are:
  634.  
  635.  
  636.  
  637.                               BBSkit Manual      Page 7
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.                  CONSTRUCTOR Init;
  645.  
  646.                  PROCEDURE Run; VIRTUAL;
  647.  
  648.                  DESTRUCTOR Done; VIRTUAL;
  649.  
  650.  
  651.                  These three methods are described in more detail here.
  652.  
  653.             Run
  654.             Run
  655.             Run is empty as provided, so it does absolutely nothing when
  656.  
  657.             called directly without modification.   Init
  658.                                                     Init
  659.                                                     Init initializes the
  660.  
  661.             internal emulation table for TTY emulation and opens       a
  662.  
  663.             "file" to send text through DOS  instead of directly to the
  664.  
  665.             screen.  It is important that you call TBBS.Init
  666.                                                    TBBS.Init
  667.                                                    TBBS.Init within your
  668.  
  669.             Init
  670.             Init
  671.             Init code.  The  keyword virtual is important, however.  A
  672.  
  673.             virtual method is one      that is overrideable by the
  674.  
  675.             programmer.  Overrideable   means that the programmer can
  676.  
  677.             actually rewrite the method without     destroying the old
  678.  
  679.             version.  Instead, the new version  replaces the old one in
  680.  
  681.             your newly created object.   In essence, it means that you
  682.  
  683.             can call both versions, and they can do completely different
  684.  
  685.             actions, but they can have the same method name.    The only
  686.  
  687.             difference would be the object they reside in.     Remember,
  688.  
  689.             though, that virtual methods  that have been overridden by
  690.  
  691.             the programmer also must have the virtual keyword following
  692.  
  693.             the method definition,  but not where the method is defined
  694.  
  695.             in the code.
  696.  
  697.                  Init
  698.                  Init
  699.                  Init is   a method provided for initializing your
  700.  
  701.             system's variables and serial port.     Code in Init should
  702.  
  703.             only be run once,    and then when the program is first
  704.  
  705.             executed.  Though this method does      not have a virtual
  706.  
  707.             keyword, it is overrideable by the programmer.  (It does not
  708.  
  709.             need the virtual keyword    because it is a     constructor
  710.                                                             constructor
  711.                                                             constructor.
  712.  
  713.             Constructors are usually used for dynamically      allocated
  714.  
  715.             objects, but it is  used here for simplicity's sake and to
  716.  
  717.             keep things consistent.)  A runtime  error will be generated
  718.  
  719.             if you do not call TBBS.Init before   making an call to an
  720.  
  721.             output routine that is part of BBSkit.
  722.  
  723.                  Run
  724.                  Run
  725.                  Run is a method    that does all the work for your
  726.  
  727.             program.  Here is where your BBS would      wait for calls,
  728.  
  729.             accept a user login, let the user roam your system,      and
  730.  
  731.             finally disconnect and recycle  for another called.  Never
  732.  
  733.             should a user still be online when this method       returns
  734.  
  735.             control back to the main block, unless you  really know what
  736.  
  737.             you are doing.
  738.  
  739.                  Done
  740.                  Done
  741.                  Done is the method that cleans up after   the BBS.  It
  742.  
  743.             should close any files that were opened along  the way, shut
  744.  
  745.             down the serial port, make sure there is no called online to
  746.  
  747.             access DOS when the program quits, and any             other
  748.  
  749.             housecleaning tasks you  set down for it.  TBBS.Done should
  750.  
  751.             be the last line in your own Done method, as this will close
  752.  
  753.             the "file" set up by TBBS.Init.
  754.  
  755.                  Programmed like this, BBSkit is set    up to have most
  756.  
  757.             main blocks of any program look something like this:
  758.  
  759.  
  760.                  Var
  761.  
  762.                    BBS : TMyBBS;   { create an instance of your object }
  763.  
  764.  
  765.  
  766.                               BBSkit Manual      Page 8
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.                  BEGIN
  774.  
  775.                    BBS.Init;
  776.  
  777.                    BBS.Run;
  778.  
  779.                    BBS.Done;
  780.  
  781.                  END.
  782.  
  783.  
  784.                  Remember that the whole idea behind objects is       to
  785.  
  786.             encapsulate your code and data into one data type.       Any
  787.  
  788.             variables you use also  should be declared as part of your
  789.  
  790.             object, and most of your BBS should be  included inside your
  791.  
  792.             object, except some  minor routines that might be used from
  793.  
  794.             other units you may have.
  795.  
  796.                  However, also keep in mind that BBSkit is designed as a
  797.  
  798.             programmer's toolkit, not as   a framework for an already
  799.  
  800.             existing BBS.  You are free to design your interface      to
  801.  
  802.             something that  you
  803.                             you
  804.                             you like.  Feel free to experiment!      The
  805.  
  806.             possibilities are endless!
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.                               BBSkit Manual      Page 9
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.             BBSkit Methods & Types                             Chapter 3
  854.  
  855.  
  856.                  What follows is a complete, alphabetical listing of the
  857.  
  858.             methods, types, procedures, and functions provided    in the
  859.  
  860.             untouched TBBS  object and in the BBSkit unit.  Each will
  861.  
  862.             follow a general pattern:
  863.  
  864.  
  865.             FUNCTION ChWaiting : Boolean;
  866.             FUNCTION ChWaiting : Boolean;
  867.             FUNCTION ChWaiting : Boolean;1
  868.                                          1
  869.                                          1
  870.  
  871.  
  872.                  ChWaiting returns a boolean value reflecting the state
  873.  
  874.             of the input buffer of the current   COM port.  It returns
  875.  
  876.             true if at least one character  is waiting to be processed,
  877.  
  878.                                                    2
  879.                                                    2
  880.                                                    2
  881.  
  882.             and False if no characters are waiting.
  883.  
  884.  
  885.             Sample Program
  886.             Sample Program
  887.             Sample Program3
  888.                           3
  889.                           3
  890.  
  891.  
  892.                  if (ChWaiting) then
  893.  
  894.                    WriteLn('Character(s) waiting to process.')
  895.  
  896.                  else
  897.  
  898.                    WriteLn('No characters waiting.');
  899.  
  900.  
  901.             See Also:
  902.             See Also:
  903.             See Also: Incoming.4
  904.                                4
  905.                                4
  906.  
  907.  
  908.             1:
  909.             1:
  910.             1: An example of the method header, what variables       are
  911.  
  912.             passed to it, and the type of the return value (if any).
  913.  
  914.  
  915.             2:
  916.             2:
  917.             2:  A short description of the method.
  918.  
  919.  
  920.             3:
  921.             3:
  922.             3:  A short example block of   code showing how the method
  923.  
  924.             might be used in a real situation.
  925.  
  926.  
  927.             4:
  928.             4:
  929.             4:  A reference to other methods that have a relation to the
  930.  
  931.             current method.
  932.  
  933.  
  934.                  Please note that procedures and functions that do   not
  935.  
  936.             include the "TBBS." header before their name are    not
  937.                                                                 not
  938.                                                                 not TBBS
  939.  
  940.             methods.  Rather, they are simply procedures and   functions
  941.  
  942.             that were needed while developing BBSkit, but didn't really
  943.  
  944.             belong inside the TBBS object.  They are still freely usable
  945.  
  946.             throughout the TBBS object and any of its descendents.
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.                               BBSkit Manual      Page 10
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.                                                                Backspace
  970.  
  971.  
  972.             FUNCTION Backspace(Num : Byte) : String;
  973.             FUNCTION Backspace(Num : Byte) : String;
  974.             FUNCTION Backspace(Num : Byte) : String;
  975.  
  976.  
  977.                  Backspace is useful for erasing text        immediately
  978.  
  979.             preceeding the cursor in a BBS-style setting, where       it
  980.  
  981.             sometimes isn't possible to easily erase text with     quick
  982.  
  983.             commands.  It will      return a string containing Num
  984.  
  985.             combinations of #8#32#8 (backspace, space, backspace), which
  986.  
  987.             is capable of erasing Num characters before the cursor.  The
  988.  
  989.             cursor will also be moved back Num characters on-screen.
  990.  
  991.                  Some terminals, such as IBM and compatibles, generally
  992.  
  993.             allow the cursor to act  non-destructively, which means  the
  994.  
  995.             cursor can backspace onto existing characters        without
  996.  
  997.             overwriting them.  Other terminals, such as the   Macintosh,
  998.  
  999.             make the cursor act   destructively, erasing  each character
  1000.  
  1001.             they backspace over.  Using the backspace function   ensures
  1002.  
  1003.             that all terminals show the same thing, regardless of    how
  1004.  
  1005.             their system treats a backspace character.
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.                               BBSkit Manual      Page 11
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.                                                              CarrierLost
  1051.  
  1052.  
  1053.             FUNCTION TBBS.CarrierLost : Boolean;
  1054.             FUNCTION TBBS.CarrierLost : Boolean;
  1055.             FUNCTION TBBS.CarrierLost : Boolean;
  1056.  
  1057.  
  1058.                  CarrierLost keeps track of the remote    carrier status
  1059.  
  1060.             during any wait-for-key loops.  It returns a value reporting
  1061.  
  1062.             whether carrier was lost while your  code was waiting for a
  1063.  
  1064.             keypress.  After returning a TRUE value, your code    should
  1065.  
  1066.             handle  the situation accordingly.  Note that CarrierLost
  1067.  
  1068.             only returns  TRUE if there was a remote carrier to begin
  1069.  
  1070.             with.  CarrierLost can also be called in your   code to find
  1071.  
  1072.             out if the remote carrier was  dropped since the last check
  1073.  
  1074.             was made.
  1075.  
  1076.                  CarrierLost does not   reset its internal flag until
  1077.  
  1078.             after a Hangup call is issued.  Therefore, you   are safe to
  1079.  
  1080.             make multiple   calls to CarrierLost after carrier was
  1081.  
  1082.             dropped, and still get the same result.
  1083.  
  1084.  
  1085.             Sample Program
  1086.             Sample Program
  1087.             Sample Program
  1088.  
  1089.  
  1090.                  if (CarrierLost) then LogoutUser
  1091.  
  1092.                  else DisplayMainMenu;
  1093.  
  1094.  
  1095.             See Also: 
  1096.             See Also: 
  1097.             See Also: SetCarrierChk, Hangup.
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.                               BBSkit Manual      Page 12
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.                                                                   Center
  1138.  
  1139.  
  1140.             FUNCTION Center(Strn : String) : String;
  1141.             FUNCTION Center(Strn : String) : String;
  1142.             FUNCTION Center(Strn : String) : String;
  1143.  
  1144.  
  1145.                  Center formats Strn to be center  justified on a normal
  1146.  
  1147.             80 column screen, and returns the new string as the function
  1148.  
  1149.             result.  Spaces are padded at the beginning of the string to
  1150.  
  1151.             center it out.
  1152.  
  1153.  
  1154.             See Also:
  1155.             See Also:
  1156.             See Also: Left, Right, Space.
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.                               BBSkit Manual      Page 13
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.                                                                ChWaiting
  1211.  
  1212.  
  1213.             FUNCTION TBBS.ChWaiting : Boolean;
  1214.             FUNCTION TBBS.ChWaiting : Boolean;
  1215.             FUNCTION TBBS.ChWaiting : Boolean;
  1216.  
  1217.  
  1218.                  ChWaiting returns a boolean value reflecting the state
  1219.  
  1220.             of the input buffer of the current   COM port.  It returns
  1221.  
  1222.             true if at least one character  is waiting to be processed,
  1223.  
  1224.             and False if no characters are waiting.
  1225.  
  1226.  
  1227.             Sample Program
  1228.             Sample Program
  1229.             Sample Program
  1230.  
  1231.  
  1232.                  if (ChWaiting) then
  1233.  
  1234.                    WriteLn('Character(s) waiting to process.')
  1235.  
  1236.                  else
  1237.  
  1238.                    WriteLn('No characters waiting.');
  1239.  
  1240.  
  1241.             See Also:
  1242.             See Also:
  1243.             See Also: Incoming.
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.                               BBSkit Manual      Page 14
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.                                                             ClearReceive
  1291.  
  1292.  
  1293.             PROCEDURE TBBS.ClearReceive;
  1294.             PROCEDURE TBBS.ClearReceive;
  1295.             PROCEDURE TBBS.ClearReceive;
  1296.  
  1297.  
  1298.                  ClearReceive removes any waiting characters from    the
  1299.  
  1300.             current COM port immediately, without processing them.
  1301.  
  1302.  
  1303.             Sample Program
  1304.             Sample Program
  1305.             Sample Program
  1306.  
  1307.  
  1308.                  if (CarrierLost) then
  1309.  
  1310.                   begin
  1311.  
  1312.                     ClearTransmit;
  1313.  
  1314.                     ClearReceive;
  1315.  
  1316.                     LogoutUser;
  1317.  
  1318.                   end
  1319.  
  1320.                  else DisplayMainMenu;
  1321.  
  1322.  
  1323.             See Also:
  1324.             See Also:
  1325.             See Also: ClearTransmit.
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.                               BBSkit Manual      Page 15
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.                                                            ClearTransmit
  1372.  
  1373.  
  1374.             PROCEDURE TBBS.ClearTransmit;
  1375.             PROCEDURE TBBS.ClearTransmit;
  1376.             PROCEDURE TBBS.ClearTransmit;
  1377.  
  1378.  
  1379.                  ClearTransmit removes any characters waiting to      be
  1380.  
  1381.             transmitted out the COM port immediately, without waiting to
  1382.  
  1383.             send them.
  1384.  
  1385.  
  1386.             Sample Program
  1387.             Sample Program
  1388.             Sample Program
  1389.  
  1390.  
  1391.                  if (CarrierLost) then
  1392.  
  1393.                   begin
  1394.  
  1395.                     ClearTransmit;
  1396.  
  1397.                     ClearReceive;
  1398.  
  1399.                     LogoutUser;
  1400.  
  1401.                   end
  1402.  
  1403.                  else DisplayMainMenu;
  1404.  
  1405.  
  1406.             See Also:
  1407.             See Also:
  1408.             See Also: ClearReceive.
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.                               BBSkit Manual      Page 16
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.                                                                ClosePort
  1454.  
  1455.  
  1456.             PROCEDURE TBBS.ClosePort(LowerDTR : Boolean);
  1457.             PROCEDURE TBBS.ClosePort(LowerDTR : Boolean);
  1458.             PROCEDURE TBBS.ClosePort(LowerDTR : Boolean);
  1459.  
  1460.  
  1461.                  Closes the current COM port down.  If LowerDTR is TRUE,
  1462.  
  1463.             then the DTR line to the modem will also   be lowered before
  1464.  
  1465.             the port is closed.  On program exit, DTR should be lowered.
  1466.  
  1467.             For any shells to  external programs that need to send and
  1468.  
  1469.             receive data from the user, LowerDTR should be FALSE.  (Some
  1470.  
  1471.             modems place the phone on-hook when DTR is         lowered.)
  1472.  
  1473.             Generally called from TBBS.Done before quitting the program.
  1474.  
  1475.             Note: no data can be sent out the port once it has      been
  1476.  
  1477.             closed.  It must first be re-opened.
  1478.  
  1479.  
  1480.             Sample Program
  1481.             Sample Program
  1482.             Sample Program
  1483.  
  1484.  
  1485.                  if (Quit = True) then ClosePort
  1486.  
  1487.                  else WaitForNextCall;
  1488.  
  1489.  
  1490.             See Also:
  1491.             See Also:
  1492.             See Also: OpenPort.
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.                               BBSkit Manual      Page 17
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.                                                                      Cls
  1537.  
  1538.  
  1539.             PROCEDURE TBBS.Cls;
  1540.             PROCEDURE TBBS.Cls;
  1541.             PROCEDURE TBBS.Cls;
  1542.  
  1543.  
  1544.                  Clears the screen at the local and/or remote terminals,
  1545.  
  1546.             depending on the settings of SetOutput.  Screen clears    on
  1547.  
  1548.             the remote terminal are always accomplished    with terminal
  1549.  
  1550.             emulation.  If no terminal emulation is specified, TTY    is
  1551.  
  1552.             used as default and a character code   of 12 (^L) is sent.
  1553.  
  1554.             Most terminals interpret this as a screen clear code.
  1555.  
  1556.  
  1557.             See Also:
  1558.             See Also:
  1559.             See Also: Emu_ClearScreen, SetOutput.
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.                               BBSkit Manual      Page 18
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.                                                               ComReadKey
  1612.  
  1613.  
  1614.             FUNCTION TBBS.ComReadKey : Char;
  1615.             FUNCTION TBBS.ComReadKey : Char;
  1616.             FUNCTION TBBS.ComReadKey : Char;
  1617.  
  1618.  
  1619.                  This is the basic function used when waiting  for a key
  1620.  
  1621.             from the remote user or local    keyboard.  Optionally, the
  1622.  
  1623.             carrier is   watched, timeouts are observed, and local
  1624.  
  1625.             function keypresses are handled.   If no key is waiting at
  1626.  
  1627.             either the modem or keyboard, ComReadKey  will wait for one.
  1628.  
  1629.             Where the key comes from depends  on settings made with the
  1630.  
  1631.             SetInput procedure.
  1632.  
  1633.  
  1634.             Sample Program
  1635.             Sample Program
  1636.             Sample Program
  1637.  
  1638.  
  1639.                  Ch := UpCase(ComReadKey);
  1640.  
  1641.                  case Ch of
  1642.  
  1643.                    'M' : MessageSection;
  1644.  
  1645.                    'F' : FilesSection;
  1646.  
  1647.                    'G' : Goodbye;
  1648.  
  1649.                  else
  1650.  
  1651.                    ComWriteLn('Illegal command.');
  1652.  
  1653.                  end;
  1654.  
  1655.  
  1656.             See Also:
  1657.             See Also:
  1658.             See Also:    ComReadKeyE, ComReadLn,          ComReadLnWrap,
  1659.  
  1660.             SetCarrierChk, SetInput, SetTimer, SetTimerDelay.
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.                               BBSkit Manual      Page 19
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.                                                              ComReadKeyE
  1700.  
  1701.  
  1702.             FUNCTION TBBS.ComReadKeyE;
  1703.             FUNCTION TBBS.ComReadKeyE;
  1704.             FUNCTION TBBS.ComReadKeyE;
  1705.  
  1706.  
  1707.                  ComReadKeyE functions exactly like its      counterpart
  1708.  
  1709.             ComReadKey, except ComReadKeyE will also echo    the pressed
  1710.  
  1711.             key to either the screen, the  modem, or both, depending on
  1712.  
  1713.             the settings from SetOutput.
  1714.  
  1715.                  If SetEcho has been  used to set the echo to anything
  1716.  
  1717.             except #0 (null), then that character will be echoed back to
  1718.  
  1719.             the user instead of the character typed.
  1720.  
  1721.  
  1722.             See Also:
  1723.             See Also:
  1724.             See Also: ComReadKey, SetEcho, SetOutput.
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.                               BBSkit Manual      Page 20
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.                                                                ComReadLn
  1776.  
  1777.  
  1778.             PROCEDURE TBBS.ComReadLn(var Inp : String; Max : Byte);
  1779.             PROCEDURE TBBS.ComReadLn(var Inp : String; Max : Byte);
  1780.             PROCEDURE TBBS.ComReadLn(var Inp : String; Max : Byte);
  1781.  
  1782.  
  1783.                  ComReadLn is the main procedure for accepting a line of
  1784.  
  1785.             input from the user.  It  rejects all controls codes except
  1786.  
  1787.             the following:
  1788.  
  1789.  
  1790.                       ^H (#8)   Backspace with rubout
  1791.  
  1792.                       ^I (#9)        Tab to next tabstop
  1793.  
  1794.                       ^M (#13)  Enter
  1795.  
  1796.                       ^X (#24)  Line erase, start at beginning
  1797.  
  1798.  
  1799.                  Max is the maximum number of  characters it will accept
  1800.  
  1801.             on one line.  If Max     is reached, no other non-editing
  1802.  
  1803.             characters (those above)   will be accepted.  The line as
  1804.  
  1805.             entered by the user  or local terminal will be returned in
  1806.  
  1807.             Inp.
  1808.  
  1809.                  ComReadLn is affected by  all standard BBSkit watches,
  1810.  
  1811.             such as carrier  checking and timeout, as well as accepting
  1812.  
  1813.             input based on the SetInput procedure.
  1814.  
  1815.                  If Max is equal  to zero, then no characters except a
  1816.  
  1817.             carriage return (enter) will be accepted.  This may       be
  1818.  
  1819.             useful for any "Press enter to  continue..." prompts you may
  1820.  
  1821.             have.
  1822.  
  1823.  
  1824.             Sample Program
  1825.             Sample Program
  1826.             Sample Program
  1827.  
  1828.  
  1829.                  ComWrite('Enter your first name: ');
  1830.  
  1831.                  ComReadLn(Username, 30);
  1832.  
  1833.  
  1834.             See Also:
  1835.             See Also:
  1836.             See Also: ComReadLnWrap, SetEcho.
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.                               BBSkit Manual      Page 21
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.                                                            ComReadLnWrap
  1869.  
  1870.  
  1871.             PROCEDURE TBBS.ComReadLnWrap(var Inp : String; Max : Byte;
  1872.             PROCEDURE TBBS.ComReadLnWrap(var Inp : String; Max : Byte;
  1873.             PROCEDURE TBBS.ComReadLnWrap(var Inp : String; Max : Byte;
  1874.  
  1875.             var Wrap : String);
  1876.             var Wrap : String);
  1877.             var Wrap : String);
  1878.  
  1879.  
  1880.                  This  procedure is identical to ComReadLn, except it
  1881.  
  1882.             adds the Wrap parameter.  It  is primarily intended for the
  1883.  
  1884.             creation of line editors.   When the user attempts to type
  1885.  
  1886.             past the end of the line (as defined   by Max), the partial
  1887.  
  1888.             word being entered is stripped from the end      of Inp and
  1889.  
  1890.             stuffed into  Wrap.  This also applies to data already in
  1891.  
  1892.             Wrap before calling ComReadLnWrap.  Any data in  Wrap at the
  1893.  
  1894.             start of  the procedure is stuffed into the first part of
  1895.  
  1896.             Inp.  Thus,  multiple calls to ComReadLnWrap will allow the
  1897.  
  1898.             user to enter everything he wants to, without  having to hit
  1899.  
  1900.             return at the end of a line.
  1901.  
  1902.  
  1903.             Sample Program
  1904.             Sample Program
  1905.             Sample Program
  1906.  
  1907.  
  1908.                  Wrap := ''; { empty it before calling ComReadLnWrap }
  1909.  
  1910.                  CurLine := 0;
  1911.  
  1912.                  Repeat
  1913.  
  1914.                    Inc(CurLine); { increment CurLine by 1 }
  1915.  
  1916.                    ComReadLn(Buffer[CurLine], 78, Wrap); { read line }
  1917.  
  1918.                  Until (Buffer[CurLine] = '/s'); { until /s is typed }
  1919.  
  1920.  
  1921.             See Also:
  1922.             See Also:
  1923.             See Also: ComReadLn.
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.                               BBSkit Manual      Page 22
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.                                                                 ComWrite
  1961.  
  1962.  
  1963.             PROCEDURE TBBS.ComWrite(Strn : String);
  1964.             PROCEDURE TBBS.ComWrite(Strn : String);
  1965.             PROCEDURE TBBS.ComWrite(Strn : String);
  1966.  
  1967.  
  1968.                  ComWrite sends Strn  out the modem and/or to the local
  1969.  
  1970.             screen without issuing a newline at the   end of Strn.  In
  1971.  
  1972.             other words, the cursor is left "dangling."  If page pausing
  1973.  
  1974.             is active, you should not imbed carriage returns       (#13)
  1975.  
  1976.             within Strn, or page pausing will not be able to  keep track
  1977.  
  1978.             of the lines that have been sent out.
  1979.  
  1980.  
  1981.             See Also:
  1982.             See Also:
  1983.             See Also: ComWriteLn,  SetOutput, SetPaging, SetPagingLines,
  1984.  
  1985.             SetPagingMsg.
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.                               BBSkit Manual      Page 23
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.                                                               ComWriteLn
  2037.  
  2038.  
  2039.             PROCEDURE TBBS.ComWriteLn(Strn : String);
  2040.             PROCEDURE TBBS.ComWriteLn(Strn : String);
  2041.             PROCEDURE TBBS.ComWriteLn(Strn : String);
  2042.  
  2043.  
  2044.                  ComWriteLn sends Strn out the modem and/or to the local
  2045.  
  2046.             screen, depending on the settings of    SetOutput.  If page
  2047.  
  2048.             pausing is   set with the SetPaging and SetPagingLines
  2049.  
  2050.             procedures, this function  will keep track of the number of
  2051.  
  2052.             carriage returns sent out  the modem and pause when a full
  2053.  
  2054.             screen has been reached.
  2055.  
  2056.                  However, you should not
  2057.                                      not
  2058.                                      not send imbedded carriage returns
  2059.  
  2060.             in your strings, as ComWriteLn does  not currently check for
  2061.  
  2062.             those characters.  For example, don't do this:
  2063.  
  2064.  
  2065.                  ComWriteLn(#13#13);
  2066.  
  2067.  
  2068.                  if you wanted to skip three lines.   Instead, just call
  2069.  
  2070.             ComWriteLn('') three times and keep the line counter in sync
  2071.  
  2072.             with the actual number of lines sent out.
  2073.  
  2074.  
  2075.             See Also:
  2076.             See Also:
  2077.             See Also:  ComWrite, SetOutput,  SetPaging, SetPagingLines,
  2078.  
  2079.             SetPagingMsg.
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.                               BBSkit Manual      Page 24
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.                                                                 CopyFile
  2122.  
  2123.  
  2124.             FUNCTION CopyFile(Source, Dest : String) : Boolean;
  2125.             FUNCTION CopyFile(Source, Dest : String) : Boolean;
  2126.             FUNCTION CopyFile(Source, Dest : String) : Boolean;
  2127.  
  2128.  
  2129.                  CopyFile copies the source file contained in Source to
  2130.  
  2131.             the destination path or file contained in Dest.     CopyFile
  2132.  
  2133.             can intelligently determine   whether Dest is a path to a
  2134.  
  2135.             directory, or a path to a file, and act accordingly.
  2136.  
  2137.                  If Dest is a path to a directory, CopyFile       simply
  2138.  
  2139.             copies the file Source  to the destination directory Dest.
  2140.  
  2141.             If Source is invalid, or if    CopyFile encounters an error
  2142.  
  2143.             (such as a disk full, or a problem inside the file such as a
  2144.  
  2145.             bad sector), the function will return  FALSE.  If no errors
  2146.  
  2147.             are encountered, TRUE is returned.
  2148.  
  2149.                  If Dest is a path to a   file, CopyFile will copy the
  2150.  
  2151.             file Source over the file Dest.  Any data contained  by Dest
  2152.  
  2153.             is forever lost, because  CopyFile will also overwrite the
  2154.  
  2155.             directory entry (which what a file    undeleter uses).  The
  2156.  
  2157.             return value is FALSE if any    errors are encountered, and
  2158.  
  2159.             TRUE if no errors were encountered.
  2160.  
  2161.                  In either case, if Source is invalid, or if   Dest is a
  2162.  
  2163.             path to directory which does not exist (example: C:\TEMP\ if
  2164.  
  2165.             TEMP does not exist off of      C:'s root directory), then
  2166.  
  2167.             CopyFile will return FALSE.
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.                               BBSkit Manual      Page 25
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.                                                                     Date
  2208.  
  2209.  
  2210.             FUNCTION Date : String;
  2211.             FUNCTION Date : String;
  2212.             FUNCTION Date : String;
  2213.  
  2214.  
  2215.                  Date returns the current date from the internal   clock
  2216.  
  2217.             (if any) or from DOS (if there is no clock) in the      form
  2218.  
  2219.             MM/DD/YY.   For months, days, and years that have no tens
  2220.  
  2221.             digit (such  as January 1, 2001), the empty space will be
  2222.  
  2223.             filled with a zero.  Therefore, January 1, 2001 would format
  2224.  
  2225.             to 01/01/01.  The string returned by Date will   always
  2226.                                                              always
  2227.                                                              always be 8
  2228.  
  2229.             characters in length.
  2230.  
  2231.  
  2232.             See Also:
  2233.             See Also:
  2234.             See Also: Time.
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.                               BBSkit Manual      Page 26
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.                                                                     Dial
  2286.  
  2287.  
  2288.             PROCEDURE TBBS.Dial(Number : String);
  2289.             PROCEDURE TBBS.Dial(Number : String);
  2290.             PROCEDURE TBBS.Dial(Number : String);
  2291.  
  2292.  
  2293.                  Dial attempts to  send an "ATD..." command out to your
  2294.  
  2295.             Hayes-compatible modem to   dial a number.  If your phone
  2296.  
  2297.             lines do not support  Touch-Tone dialing, make sure Number
  2298.  
  2299.             has a P as its first character, which      will force pulse
  2300.  
  2301.             dialing.
  2302.  
  2303.                  The programmer is expected   to check for success or
  2304.  
  2305.             failure of the call, and whether     or not a carrier was
  2306.  
  2307.             detected.
  2308.  
  2309.  
  2310.             Sample Program
  2311.             Sample Program
  2312.             Sample Program
  2313.  
  2314.  
  2315.                  Dial('555-1234');
  2316.  
  2317.                  WaitFor('C', 30);  {wait 30 seconds for a 'C'.  A 'NO}
  2318.  
  2319.                                  {CARRIER' will return success, as }
  2320.  
  2321.                                  {will a 'CONNECT'            }
  2322.  
  2323.                  if (Online) then
  2324.  
  2325.                   begin
  2326.  
  2327.                     ComReadLn(Result, 40);
  2328.  
  2329.                     Bps := StrToInt(Copy(Result, 8, 5));
  2330.  
  2331.                     if (Bps = 0) then Bps := 300;
  2332.  
  2333.                     SetBps(Bps);
  2334.  
  2335.                     TerminalMode(Full);
  2336.  
  2337.                   end;
  2338.  
  2339.  
  2340.             See Also:
  2341.             See Also:
  2342.             See Also: TerminalMode.
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.                               BBSkit Manual      Page 27
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.                                                                  Emu_...
  2378.  
  2379.  
  2380.             PROCEDURE TBBS.Emu_...(...);
  2381.             PROCEDURE TBBS.Emu_...(...);
  2382.             PROCEDURE TBBS.Emu_...(...);
  2383.  
  2384.  
  2385.                  These methods are provided for BBSkit to interface with
  2386.  
  2387.             a number of ANSI and non-ANSI terminals with as       little
  2388.  
  2389.             trouble as possible.  Templates are loaded in with       the
  2390.  
  2391.             LoadEmulation method, and the codes are accessed with these
  2392.  
  2393.             calls.  Additional templates    must be created with the
  2394.  
  2395.             EmuMaker program, provided on the distribution disk.
  2396.  
  2397.                  The methods currently available are:
  2398.  
  2399.  
  2400.                  GotoXY(X, Y : Byte)     Goes to the screen location at
  2401.  
  2402.                                      X, Y.
  2403.  
  2404.                  CursorUp            Moves the cursor up one line.
  2405.  
  2406.                  CursorDown          Moves the cursor down one line.
  2407.  
  2408.                  CursorLeft          Moves the cursor left one column.
  2409.  
  2410.                  CursorRight         Moves the cursor right one column.
  2411.  
  2412.                  ClearScreen         Clears the screen, places cursor at
  2413.  
  2414.                                      1,1.
  2415.  
  2416.                  ClearToTop          Clears from cursor line to top of
  2417.  
  2418.                                      screen, cursor position is
  2419.  
  2420.                                      unchanged.
  2421.  
  2422.                  ClearToEndOfScreen  Clears from cursor line to bottom
  2423.  
  2424.                                      of screen, cursor position is
  2425.  
  2426.                                      unchanged.
  2427.  
  2428.                  ClearToEndOfLine    Clears from cursor column to the
  2429.  
  2430.                                      end of the line the cursor is on.
  2431.  
  2432.                                      Cursor position is unchanged.
  2433.  
  2434.                  ReverseVideo        Swaps the foreground and background
  2435.  
  2436.                                      color attributes.  Sometimes called
  2437.  
  2438.                                      "inverse video."
  2439.  
  2440.                  NormalVideo         Swaps the foreground and background
  2441.  
  2442.                                      color attributes.  Cancels the
  2443.  
  2444.                                      effects of ReverseVideo.
  2445.  
  2446.                  ScrollUp            Moves the entire screen up one
  2447.  
  2448.                                      line.  Top line is lost.
  2449.  
  2450.                  ScrollDown          Moves the entire screen down one
  2451.  
  2452.                                      line.  Bottom line is lost.
  2453.  
  2454.                  InsertLine          Inserts a blank line before the
  2455.  
  2456.                                      line the cursor is on.  All other
  2457.  
  2458.                                      lines below the cursor line are
  2459.  
  2460.                                      moved down one line, and the bottom
  2461.  
  2462.                                      line is lost.
  2463.  
  2464.                  DeleteLine          Deletes the cursor line, and moves
  2465.  
  2466.                                      all lines below it up one line.  A
  2467.  
  2468.                                      blank line is inserted at the
  2469.  
  2470.                                      bottom of the screen.
  2471.  
  2472.                  InsertChar          Inserts a space at the cursor
  2473.  
  2474.                                      position.  All other characters
  2475.  
  2476.                                      following the cursor on the current
  2477.  
  2478.                                      line are moved to the left one
  2479.  
  2480.                                      character.  Any character in the
  2481.  
  2482.  
  2483.  
  2484.                               BBSkit Manual      Page 28
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.                                                                  Emu_...
  2492.  
  2493.  
  2494.                                      80th column is lost.
  2495.  
  2496.                  DeleteChar          Deletes the character under the
  2497.  
  2498.                                      cursor.  All other characters
  2499.  
  2500.                                      following the cursor on the current
  2501.  
  2502.                                      line are moved to the left one
  2503.  
  2504.                                      character.  A space is inserted at
  2505.  
  2506.                                      column 80.
  2507.  
  2508.                  Color(Fore, Back:Byte)  Changes the foreground color to
  2509.  
  2510.                                      Fore, and the background color to
  2511.  
  2512.                                      Back.
  2513.  
  2514.  
  2515.                  For ANSI.EMU,  ReverseVideo
  2516.                                 ReverseVideo
  2517.                                 ReverseVideo and  NormalVideo
  2518.                                                   NormalVideo
  2519.                                                   NormalVideo have  some
  2520.  
  2521.             special properties.  ReverseVideo and NormalVideo     simply
  2522.  
  2523.             swap the foreground and background colors;  there is no real
  2524.  
  2525.             inverse video or normal video in ANSI.EMU.  So, two calls to
  2526.  
  2527.             ReverseVideo would be the same as one to ReverseVideo    and
  2528.  
  2529.             one to NormalVideo.    These methods must be handled with
  2530.  
  2531.             care, or the other emulations will get funny results    from
  2532.  
  2533.             your code.  For blinking colors,    Color
  2534.                                                 Color
  2535.                                                 Color must be passed   a
  2536.  
  2537.             background color of greater than 7.  This will result in the
  2538.  
  2539.             background color being  (Back - 7) and the foreground color
  2540.  
  2541.             will blink.
  2542.  
  2543.                  Remember that all calls must be  prefixed with Emu_, so
  2544.  
  2545.             a call to CursorUp, for example, would look like this:
  2546.  
  2547.  
  2548.                  Emu_CursorUp;
  2549.  
  2550.  
  2551.             See Also:
  2552.             See Also:
  2553.             See Also: LoadEmulation.
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.                               BBSkit Manual      Page 29
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.                                                                    Exist
  2588.  
  2589.  
  2590.             FUNCTION Exist(Filename : String) : Boolean;
  2591.             FUNCTION Exist(Filename : String) : Boolean;
  2592.             FUNCTION Exist(Filename : String) : Boolean;
  2593.  
  2594.  
  2595.                  Exist returns TRUE if Filename exists.  Wildcards   can
  2596.  
  2597.             be passed as a filename, and if any files are found in   the
  2598.  
  2599.             path specified by the   beginning of Filename, Exist will
  2600.  
  2601.             still return TRUE.  Exist cannot find files which are hidden
  2602.  
  2603.             from a normal DIR command from DOS.
  2604.  
  2605.                  For example, to    find out if there are any files
  2606.  
  2607.             matching the mask *.COM  in the C:\DOS\ directory, execute
  2608.  
  2609.             Exist like this:
  2610.  
  2611.  
  2612.                  if (Exist('C:\DOS\*.COM')) then
  2613.  
  2614.                     WriteLn('Found!');
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.                               BBSkit Manual      Page 30
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.                                                          F... & ...Arrow
  2664.  
  2665.  
  2666.             FUNCTION TBBS.F... : Boolean; VIRTUAL;
  2667.             FUNCTION TBBS.F... : Boolean; VIRTUAL;
  2668.             FUNCTION TBBS.F... : Boolean; VIRTUAL;
  2669.  
  2670.             FUNCTION TBBS....Arrow : Boolean; VIRTUAL;
  2671.             FUNCTION TBBS....Arrow : Boolean; VIRTUAL;
  2672.             FUNCTION TBBS....Arrow : Boolean; VIRTUAL;
  2673.  
  2674.  
  2675.                  These methods are those called by           ComReadKey,
  2676.  
  2677.             ComReadKeyE, ComReadLn, and ComReadLnWrap       whenever a
  2678.  
  2679.             function key or arrow key is pressed on  the local keyboard.
  2680.  
  2681.             When such an event occurs, control is briefly  passed to the
  2682.  
  2683.             appropriate routine, and a user-defined action can then take
  2684.  
  2685.             place.  For example,  if F1 were pressed,  TBBS.F1
  2686.                                                        TBBS.F1
  2687.                                                        TBBS.F1 would be
  2688.  
  2689.             called.
  2690.  
  2691.                  These methods are provided empty.   It is their purpose
  2692.  
  2693.             to provide the programmer  with several empty methods that
  2694.  
  2695.             can be filled with local mode actions.  A BBS might use  the
  2696.  
  2697.             function keys for various sysop actions, such as initiating
  2698.  
  2699.             a chat session with ther user, editing his         security,
  2700.  
  2701.             toggling the printer,   toggling the "sysop is available"
  2702.  
  2703.             flag, and virtually   anything else the programmer wants.
  2704.  
  2705.             Keep in mind, though, that the purpose of the methods  is to
  2706.  
  2707.             allow the sysop to do things while a user is  online without
  2708.  
  2709.             that user being able to notice any time lagging.  Therefore,
  2710.  
  2711.             the routines should be kept simple, except in cases    where
  2712.  
  2713.             you want
  2714.                 want
  2715.                 want the user to know something is happened,   such as a
  2716.  
  2717.             chat session.
  2718.  
  2719.                  Function keys F1  throught F12 are provided.  (F11 and
  2720.  
  2721.             F12 are only available on AT-style  machines, however.)  All
  2722.  
  2723.             four arrow keys are    provided as well, and all of the
  2724.  
  2725.             routines are virtual
  2726.                          virtual
  2727.                          virtual.
  2728.  
  2729.                  The return values for these routines    are all of the
  2730.  
  2731.             Boolean type.  In    almost all circumstances, the value
  2732.  
  2733.             returned should be FALSE.  However, there are times when the
  2734.  
  2735.             key pressed could eject the    user from a BBS.  In these
  2736.  
  2737.             circumstances, when you do  not
  2738.                                         not
  2739.                                         not want the user to finish the
  2740.  
  2741.             input that was interrupted, the return value should be TRUE.
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.                               BBSkit Manual      Page 31
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.                                                            GetAnswerMode
  2771.  
  2772.  
  2773.             FUNCTION TBBS.GetAnswerMode : Byte;
  2774.             FUNCTION TBBS.GetAnswerMode : Byte;
  2775.             FUNCTION TBBS.GetAnswerMode : Byte;
  2776.  
  2777.  
  2778.                  GetAnswerMode returns a byte value corresponding to one
  2779.  
  2780.             of two constants defined for the way your  modem will answer
  2781.  
  2782.             the phone.  In   Originate
  2783.                              Originate
  2784.                              Originate mode, BBSkit will send the    ATD
  2785.  
  2786.             string, which simulates originating a call, and proceed   to
  2787.  
  2788.             wait for a carrier.  In  Answer
  2789.                                      Answer
  2790.                                      Answer  mode, BBSkit will send ATA
  2791.  
  2792.             and wait for the remote modem to connect to the      carrier
  2793.  
  2794.             being sent.
  2795.  
  2796.                  This method does not   do anything for your program.
  2797.  
  2798.             Rather, it  is provided for your program to keep track of
  2799.  
  2800.             what mode it might be in at any given time.  There are other
  2801.  
  2802.             methods which do the "work" of picking up the phone      and
  2803.  
  2804.             connecting.
  2805.  
  2806.  
  2807.             Sample Program
  2808.             Sample Program
  2809.             Sample Program
  2810.  
  2811.  
  2812.                  A := GetAnswerMode;
  2813.  
  2814.                  case A of
  2815.  
  2816.                    Originate : WriteLn('In originate mode.');
  2817.  
  2818.                    Answer  : WriteLn('In answer mode.');
  2819.  
  2820.                  end;
  2821.  
  2822.  
  2823.             See Also:
  2824.             See Also:
  2825.             See Also: PickupPhone, SetAnswerMode.
  2826.                                                 .
  2827.                                                 .
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.                               BBSkit Manual      Page 32
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.                                                                   GetBps
  2866.  
  2867.  
  2868.             FUNCTION TBBS.GetBps : LongInt;
  2869.             FUNCTION TBBS.GetBps : LongInt;
  2870.             FUNCTION TBBS.GetBps : LongInt;
  2871.  
  2872.  
  2873.                  GetBps returns the current operating speed in bits per
  2874.  
  2875.             second on the current COM port.  If you have not set the bit
  2876.  
  2877.             rate previously, GetBps will return a -1.
  2878.  
  2879.  
  2880.             Sample Program
  2881.             Sample Program
  2882.             Sample Program
  2883.  
  2884.  
  2885.                  WriteLn('Operating at ', GetBps, 'bps.');
  2886.  
  2887.  
  2888.             See Also:
  2889.             See Also:
  2890.             See Also: SetBps.
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.                               BBSkit Manual      Page 33
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.                                                                 GetInput
  2942.  
  2943.  
  2944.             PROCEDURE TBBS.GetInput(var Con, Rem : Boolean);
  2945.             PROCEDURE TBBS.GetInput(var Con, Rem : Boolean);
  2946.             PROCEDURE TBBS.GetInput(var Con, Rem : Boolean);
  2947.  
  2948.  
  2949.                  GetInput returns the conditions of input redirection in
  2950.  
  2951.             Con and Rem which were previously set by a call to SetInput.
  2952.  
  2953.             If input is being accepted from the local keyboard, Con will
  2954.  
  2955.             return TRUE.  If input is being accepted from the modem, Rem
  2956.  
  2957.             will return TRUE.  In either case,   if input is not being
  2958.  
  2959.             accepted, a FALSE value will be returned.
  2960.  
  2961.                  This method is mainly  used for "remembering" the old
  2962.  
  2963.             settings of input redirection when your  program goes off to
  2964.  
  2965.             do something that only the local    operator is supposed to
  2966.  
  2967.             know about (such as verifying a new user on a BBS).
  2968.  
  2969.  
  2970.             See Also:
  2971.             See Also:
  2972.             See Also: GetOutput, SetInput, SetOutput.
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.                               BBSkit Manual      Page 34
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.                                                                GetOutput
  3021.  
  3022.  
  3023.             PROCEDURE TBBS.GetOutput(var Con, Rem : Boolean);
  3024.             PROCEDURE TBBS.GetOutput(var Con, Rem : Boolean);
  3025.             PROCEDURE TBBS.GetOutput(var Con, Rem : Boolean);
  3026.  
  3027.  
  3028.                  GetOutput returns the conditions of output  redirection
  3029.  
  3030.             in Con and Rem   which were previously set by a call to
  3031.  
  3032.             SetOutput.  If output is being sent to the local screen, Con
  3033.  
  3034.             will return TRUE.  If output is being   sent out the serial
  3035.  
  3036.             port to the modem, Rem will return TRUE.  In either case, if
  3037.  
  3038.             output is not being sent, a FALSE value will be returned.
  3039.  
  3040.                  This method, like GetInput,      is mainly used for
  3041.  
  3042.             "remembering" the old values of output redirection, and   is
  3043.  
  3044.             usually used in conjunction with GetInput.
  3045.  
  3046.  
  3047.             See Also:
  3048.             See Also:
  3049.             See Also: GetInput, SetInput, SetOutput.
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.                               BBSkit Manual      Page 35
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.                                                             GetScreenStr
  3099.  
  3100.  
  3101.             PROCEDURE GetScreenStr(X1, X2, Y : Byte; var St : String);
  3102.             PROCEDURE GetScreenStr(X1, X2, Y : Byte; var St : String);
  3103.             PROCEDURE GetScreenStr(X1, X2, Y : Byte; var St : String);
  3104.  
  3105.  
  3106.                  GetScreenStr copies characters from the local    screen
  3107.  
  3108.             into the string St.  All characters on line Y, from X1    to
  3109.  
  3110.             X2, inclusive, are copied into the string.  The    resulting
  3111.  
  3112.             string is then of exact length of the  characters you wanted
  3113.  
  3114.             to copy.
  3115.  
  3116.                  Note that this procedure acts completely independent of
  3117.  
  3118.             any Window(...) calls that have been  made, so you may need
  3119.  
  3120.             to use the WindMin CRT variable to obtain the desired text.
  3121.  
  3122.                  Applications for this procedure are saving    the local
  3123.  
  3124.             screen for a DOS    shell, so that the entire screen is
  3125.  
  3126.             restored when the DOS shell is exited from, and    reminding
  3127.  
  3128.             the user of where he was before a chat session           was
  3129.  
  3130.             initiated.  (You can copy the entire line that the cursor is
  3131.  
  3132.             on when chat is entered, and when it is   exited, rewrite it
  3133.  
  3134.             back to the screen.  Usually, that   line you copied was a
  3135.  
  3136.             prompt of some sort.)
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.                               BBSkit Manual      Page 36
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.                                                            GetScreenWord
  3181.  
  3182.  
  3183.             PROCEDURE GetScreenWord(X, Y : Byte; var Attr : Byte; var Ch
  3184.             PROCEDURE GetScreenWord(X, Y : Byte; var Attr : Byte; var Ch
  3185.             PROCEDURE GetScreenWord(X, Y : Byte; var Attr : Byte; var Ch
  3186.  
  3187.             : Char);
  3188.             : Char);
  3189.             : Char);
  3190.  
  3191.  
  3192.                  GetScreenWord finds the character and attribute  values
  3193.  
  3194.             for the screen location X,Y and returns them in Attr and Ch.
  3195.  
  3196.             X,Y are absolute screen coordinates, not relative to     the
  3197.  
  3198.             current window.
  3199.  
  3200.                  GetScreenWord goes directly to video memory.
  3201.  
  3202.  
  3203.             See Also:
  3204.             See Also:
  3205.             See Also: PutScreenWord.
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.                               BBSkit Manual      Page 37
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.                                                                  GetText
  3258.  
  3259.  
  3260.             PROCEDURE GetText(X1, Y1, X2, Y2 : Byte; var Dest);
  3261.             PROCEDURE GetText(X1, Y1, X2, Y2 : Byte; var Dest);
  3262.             PROCEDURE GetText(X1, Y1, X2, Y2 : Byte; var Dest);
  3263.  
  3264.  
  3265.                  GetText is the text-mode equivalent of GetImage.    X1,
  3266.  
  3267.             Y1 are the coordinates of the upper left corner of the block
  3268.  
  3269.             of text you wish to copy.  X2, Y2 are the coordinates of teh
  3270.  
  3271.             lower right corner.  All coordinates are absolute,       not
  3272.  
  3273.             relative to the current window.
  3274.  
  3275.                  Dest is an untyped variable parameter.  It should    be
  3276.  
  3277.             passed the pointer to a location in memory that you  wish to
  3278.  
  3279.             place the text captured.
  3280.  
  3281.                  Text captured will retain its attribute byte as well as
  3282.  
  3283.             the character seen.  The memory required for a GetText image
  3284.  
  3285.             is calculated through the TextMemSize function.
  3286.  
  3287.  
  3288.             Sample Program
  3289.             Sample Program
  3290.             Sample Program
  3291.  
  3292.  
  3293.                  Var
  3294.  
  3295.                    Dest : Pointer;
  3296.  
  3297.  
  3298.                  BEGIN
  3299.  
  3300.                    GetMem(Dest, TextMemSize(1, 1, 10, 10)); {get memory}
  3301.  
  3302.                    GetText(1, 1, 10, 10, Dest^);  {get the text}
  3303.  
  3304.                    ClrScr;  {clear the screen}
  3305.  
  3306.                    ReadLn;  {wait for user}
  3307.  
  3308.                    PutText(1, 1, Dest^);  {put text back}
  3309.  
  3310.                  END.
  3311.  
  3312.  
  3313.             See Also:
  3314.             See Also:
  3315.             See Also: PutText, TextMemSize.
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.                               BBSkit Manual      Page 38
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.                                                                   Hangup
  3350.  
  3351.  
  3352.             FUNCTION TBBS.Hangup : Boolean;
  3353.             FUNCTION TBBS.Hangup : Boolean;
  3354.             FUNCTION TBBS.Hangup : Boolean;
  3355.  
  3356.  
  3357.                  Hangup will attempt to hang up the modem      if it is
  3358.  
  3359.             currently off-hook.  BBSkit will first try to lower the Data
  3360.  
  3361.             Terminal Ready (DTR) line for two seconds.   This makes most
  3362.  
  3363.             modems drop carrier if they are online.  If this      fails,
  3364.  
  3365.             Hangup will then  try to send the attention string (default
  3366.  
  3367.             is +++, but can be changed by AT commands), followed      by
  3368.  
  3369.             ATH0.  If this also fails, a FALSE value will be returned to
  3370.  
  3371.             the calling routine.  If the DTR drop  succeeds, BBSkit will
  3372.  
  3373.             not attempt to send the hangup    string to the modem.  If
  3374.  
  3375.             Hangup is successful in dropping carrier,  a TRUE value will
  3376.  
  3377.             be returned.
  3378.  
  3379.  
  3380.             Sample Program
  3381.             Sample Program
  3382.             Sample Program
  3383.  
  3384.  
  3385.                  if (not Hangup) then WriteLn('Unable to hangup!')
  3386.  
  3387.                  else WriteLn('Disconnected with remote modem.');
  3388.  
  3389.  
  3390.             See Also:
  3391.             See Also:
  3392.             See Also: Online.
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.                               BBSkit Manual      Page 39
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.                                                               HideCursor
  3435.  
  3436.  
  3437.             PROCEDURE HideCursor;
  3438.             PROCEDURE HideCursor;
  3439.             PROCEDURE HideCursor;
  3440.  
  3441.  
  3442.                  HideCursor turns the cursor  off on the local screen.
  3443.  
  3444.             It is intended for turning off the cursor when text is being
  3445.  
  3446.             continuously shown in the  same area, without a flickering
  3447.  
  3448.             cursor creating a static effect on screen.  Most of      the
  3449.  
  3450.             time, the cursor should be on.
  3451.  
  3452.                  The cursor can be turned back on with the    ShowCursor
  3453.  
  3454.             procedure.
  3455.  
  3456.  
  3457.             See Also:
  3458.             See Also:
  3459.             See Also: ShowCursor.
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.                               BBSkit Manual      Page 40
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.                                                                 Incoming
  3511.  
  3512.  
  3513.             FUNCTION TBBS.Incoming : Boolean;
  3514.             FUNCTION TBBS.Incoming : Boolean;
  3515.             FUNCTION TBBS.Incoming : Boolean;
  3516.  
  3517.  
  3518.                  Incoming reports a boolean value     depending on the
  3519.  
  3520.             status of the input buffer of the serial      port, and the
  3521.  
  3522.             keyboard buffer of the local terminal.  If either the FOSSIL
  3523.  
  3524.             driver or the keyboard reports a key waiting,       Incoming
  3525.  
  3526.             returns a TRUE value.  Otherwise,  Incoming returns a FALSE.
  3527.  
  3528.             Incoming does
  3529.                      does
  3530.                      does  check the status of input redirection,    and
  3531.  
  3532.             will not consider a device if      BBSkit is not currently
  3533.  
  3534.             accepting input from it.
  3535.  
  3536.                  Note that this method does not distinguish between the
  3537.  
  3538.             keyboard or the modem.  It simply returns  a value reporting
  3539.  
  3540.             whether or not a key is waiting at either device.
  3541.  
  3542.  
  3543.             Sample Program
  3544.             Sample Program
  3545.             Sample Program
  3546.  
  3547.  
  3548.                  if (Incoming) then
  3549.  
  3550.                   begin
  3551.  
  3552.                     if (Keypressed) then
  3553.  
  3554.                        WriteLn('Key waiting at keyboard.');
  3555.  
  3556.                     if (ChWaiting) then
  3557.  
  3558.                        WriteLn('Key waiting at modem.');
  3559.  
  3560.                   end;
  3561.  
  3562.  
  3563.             See Also:
  3564.             See Also:
  3565.             See Also: ChWaiting, CRT.Keypressed.
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.                               BBSkit Manual      Page 41
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.                                                                     Init
  3603.  
  3604.  
  3605.             CONSTRUCTOR TBBS.Init;
  3606.             CONSTRUCTOR TBBS.Init;
  3607.             CONSTRUCTOR TBBS.Init;
  3608.  
  3609.  
  3610.                  Init is the standard means for initializing        your
  3611.  
  3612.             program.  Even though this method does not contain a virtual
  3613.                                                                  virtual
  3614.                                                                  virtual
  3615.  
  3616.             keyword, it is still programmer-overridable and    should be
  3617.  
  3618.             overridden to initialize your own variables and        such.
  3619.  
  3620.             However, you should still  call TBBS.Init from within your
  3621.  
  3622.             own Init method to insure that    BBSkit can initialize the
  3623.  
  3624.             variables it needs to at runtime.
  3625.  
  3626.  
  3627.             Sample Program
  3628.             Sample Program
  3629.             Sample Program
  3630.  
  3631.  
  3632.                  BEGIN
  3633.  
  3634.                    TBBS.Init;
  3635.  
  3636.                  END.
  3637.  
  3638.  
  3639.             See Also:
  3640.             See Also:
  3641.             See Also: Run, Done.
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.                               BBSkit Manual      Page 42
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.                                                                 IntToStr
  3687.  
  3688.  
  3689.             FUNCTION IntToStr(Num : LongInt) : String;
  3690.             FUNCTION IntToStr(Num : LongInt) : String;
  3691.             FUNCTION IntToStr(Num : LongInt) : String;
  3692.  
  3693.  
  3694.                  IntToStr converts the   long integer (or integer, or
  3695.  
  3696.             word, or byte, etc.) in Num    to a string and returns the
  3697.  
  3698.             result as a function.  It's basically the way   that the Str
  3699.  
  3700.             procedure should have been written from the beginning.
  3701.  
  3702.                  ComWrite and ComWriteLn cannot handle non-string types,
  3703.  
  3704.             so IntToStr must be performed on  all integer-type value you
  3705.  
  3706.             want to send out the serial port.
  3707.  
  3708.  
  3709.             Sample Program
  3710.             Sample Program
  3711.             Sample Program
  3712.  
  3713.  
  3714.                  ComWriteLn('Calls: ' + IntToStr(TotalCalls));
  3715.  
  3716.  
  3717.             See Also:
  3718.             See Also:
  3719.             See Also: StrToInt.
  3720.  
  3721.  
  3722.  
  3723.  
  3724.  
  3725.  
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.                               BBSkit Manual      Page 43
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.                                                                     Left
  3767.  
  3768.  
  3769.             FUNCTION Left(Strn : String; Places : Byte) : String;
  3770.             FUNCTION Left(Strn : String; Places : Byte) : String;
  3771.             FUNCTION Left(Strn : String; Places : Byte) : String;
  3772.  
  3773.  
  3774.                  Left left-justifies Strn to Places places.  This is for
  3775.  
  3776.             formatting text to a uniform width, and pushes  all the text
  3777.  
  3778.             in Strn to left side of the justified   string.  If needed,
  3779.  
  3780.             spaces are added to the    end of the string before it is
  3781.  
  3782.             returned as the function result.
  3783.  
  3784.                  If Strn is more than Places  characters long, Strn will
  3785.  
  3786.             be truncated to  a length of Places, and no left-justifying
  3787.  
  3788.             will be done (it isn't needed in that case).
  3789.  
  3790.  
  3791.             See Also:
  3792.             See Also:
  3793.             See Also: Center, Space, Right.
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.                               BBSkit Manual      Page 44
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.                                                            LoadEmulation
  3844.  
  3845.  
  3846.             FUNCTION TBBS.LoadEmulation(Fname : String) : Boolean;
  3847.             FUNCTION TBBS.LoadEmulation(Fname : String) : Boolean;
  3848.             FUNCTION TBBS.LoadEmulation(Fname : String) : Boolean;
  3849.  
  3850.  
  3851.                  LoadEmulation loads a previously defined      emulation
  3852.  
  3853.             template into memory from the filename contained in   Fname.
  3854.  
  3855.             Fname should not contain     an extension, as ".EMU" is
  3856.  
  3857.             automatically added by LoadEmulation.  If the template   was
  3858.  
  3859.             loaded without error, TRUE is returned.  If  any errors were
  3860.  
  3861.             detected, FALSE is returned.
  3862.  
  3863.                  Once a template is loaded, any    calls to the Emu_...
  3864.  
  3865.             procedures will use the new codes  loaded from the template.
  3866.  
  3867.             The old template in memory is lost, and must be  reloaded to
  3868.  
  3869.             be used again.
  3870.  
  3871.                  Additional templates can be  created with the EmuMaker
  3872.  
  3873.             program, provided on the BBSkit distribution disk.
  3874.  
  3875.  
  3876.             See Also:
  3877.             See Also:
  3878.             See Also: Emu_....
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.  
  3902.  
  3903.  
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.                               BBSkit Manual      Page 45
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.                                                                    Lower
  3925.  
  3926.  
  3927.             FUNCTION Lower(Strn : String) : String;
  3928.             FUNCTION Lower(Strn : String) : String;
  3929.             FUNCTION Lower(Strn : String) : String;
  3930.  
  3931.  
  3932.                  Lower returns Strn with all of its uppercase characters
  3933.  
  3934.             converted to lower case.  Characters      not in the range
  3935.  
  3936.             'A'..'Z' are unaffected.
  3937.  
  3938.  
  3939.             Sample Program
  3940.             Sample Program
  3941.             Sample Program
  3942.  
  3943.  
  3944.                  WriteLn(Lower('BBSkit'));
  3945.  
  3946.  
  3947.             Sample Run
  3948.             Sample Run
  3949.             Sample Run
  3950.  
  3951.  
  3952.                  bbskit
  3953.  
  3954.  
  3955.             See Also:
  3956.             See Also:
  3957.             See Also: Upper.
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.                               BBSkit Manual      Page 46
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.                                                                   Online
  4005.  
  4006.  
  4007.             FUNCTION TBBS.Online : Boolean;
  4008.             FUNCTION TBBS.Online : Boolean;
  4009.             FUNCTION TBBS.Online : Boolean;
  4010.  
  4011.  
  4012.                  Online returns the status  of the carrier detect (CD)
  4013.  
  4014.             line of the current COM port.    If a carrier is detected,
  4015.  
  4016.             Online returns TRUE.  Otherwise, Online returns FALSE.
  4017.  
  4018.  
  4019.             Sample Program
  4020.             Sample Program
  4021.             Sample Program
  4022.  
  4023.  
  4024.                  while (Online) do
  4025.  
  4026.                   begin
  4027.  
  4028.                     WriteLn('Still online!');
  4029.  
  4030.                   end;
  4031.  
  4032.                  WriteLn('Carrier lost!');
  4033.  
  4034.  
  4035.             See Also:
  4036.             See Also:
  4037.             See Also: CarrierLost.
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.                               BBSkit Manual      Page 47
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.                                                                 OpenPort
  4085.  
  4086.  
  4087.             PROCEDURE TBBS.OpenPort(Comport : Byte);
  4088.             PROCEDURE TBBS.OpenPort(Comport : Byte);
  4089.             PROCEDURE TBBS.OpenPort(Comport : Byte);
  4090.  
  4091.  
  4092.                  OpenPort initializes Comport for use by          BBSkit
  4093.  
  4094.             routines.  If Comport is equal to 1, then COM1 will be used.
  4095.  
  4096.             If Comport equals 2, then COM2 will   be used, up to COM4.
  4097.  
  4098.             Support for serial ports beyond COM4 is not provided.
  4099.  
  4100.                  OpenPort must
  4101.                           must
  4102.                           must be called  before any other serial port
  4103.  
  4104.             routines are used, unless    the FOSSIL has already been
  4105.  
  4106.             initialized by   another program.  In general, though,
  4107.  
  4108.             OpenPort is a requirement.
  4109.  
  4110.  
  4111.             Sample Program
  4112.             Sample Program
  4113.             Sample Program
  4114.  
  4115.  
  4116.                  OpenPort(1);  {use COM1}
  4117.  
  4118.                  ComWriteLn('Hello, World.');
  4119.  
  4120.                  ClosePort;
  4121.  
  4122.  
  4123.             See Also:
  4124.             See Also:
  4125.             See Also: ClosePort, SetPort.
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.                               BBSkit Manual      Page 48
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.                                                              PickupPhone
  4170.  
  4171.  
  4172.             PROCEDURE TBBS.PickupPhone;
  4173.             PROCEDURE TBBS.PickupPhone;
  4174.             PROCEDURE TBBS.PickupPhone;
  4175.  
  4176.  
  4177.                  PickupPhone will pick up the phone using the currently
  4178.  
  4179.             active answer mode.  If the answer mode is set to originate,
  4180.  
  4181.             then PickupPhone will pick up the phone and      wait for a
  4182.  
  4183.             carrier from the remote modem.  If   answer mode is set to
  4184.  
  4185.             answer, then PickupPhone   will pick up the phone, send a
  4186.  
  4187.             carrier, and wait for  the remote modem to connect to your
  4188.  
  4189.             modem.  In either case, PickupPhone  does not do the actual
  4190.  
  4191.             waiting.  Rather, you  must write code to detect whether a
  4192.  
  4193.             connection was established.
  4194.  
  4195.  
  4196.             Sample Program
  4197.             Sample Program
  4198.             Sample Program
  4199.  
  4200.  
  4201.                  (see sample program for TBBS.Dial)
  4202.  
  4203.  
  4204.             See Also:
  4205.             See Also:
  4206.             See Also: SetAnswerMode.
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.                               BBSkit Manual      Page 49
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.                                                            PutScreenWord
  4252.  
  4253.  
  4254.             PROCEDURE PutScreenWord(X, Y : Byte; Attr : Byte; Ch :
  4255.             PROCEDURE PutScreenWord(X, Y : Byte; Attr : Byte; Ch :
  4256.             PROCEDURE PutScreenWord(X, Y : Byte; Attr : Byte; Ch :
  4257.  
  4258.             Char);
  4259.             Char);
  4260.             Char);
  4261.  
  4262.  
  4263.                  PutScreenWord places the character  Ch in video memory
  4264.  
  4265.             at absolute location   X,Y with the attribute byte set to
  4266.  
  4267.             Attr.  This procedure goes directly to video memory, and may
  4268.  
  4269.             cause snow on some old CGA systems.  However, it is also   a
  4270.  
  4271.             bit faster, and  does not relocate the cursor after placing
  4272.  
  4273.             the character on-screen.
  4274.  
  4275.  
  4276.             See Also:
  4277.             See Also:
  4278.             See Also: GetScreenWord.
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.                               BBSkit Manual      Page 50
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.                                                                  PutText
  4330.  
  4331.  
  4332.             PROCEDURE PutText(X, Y : Byte; var Src);
  4333.             PROCEDURE PutText(X, Y : Byte; var Src);
  4334.             PROCEDURE PutText(X, Y : Byte; var Src);
  4335.  
  4336.  
  4337.                  PutText places the text in Src at absolute       screen
  4338.  
  4339.             coordinates X,Y.  PutText goes directly  to video memory and
  4340.  
  4341.             may cause snow on old CGA systems.
  4342.  
  4343.                  The  text placed on-screen must have been previously
  4344.  
  4345.             captured using the GetText call, or else random garbage will
  4346.  
  4347.             result.
  4348.  
  4349.  
  4350.             See Also:
  4351.             See Also:
  4352.             See Also: GetText.
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.                               BBSkit Manual      Page 51
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.                                                                  Receive
  4405.  
  4406.  
  4407.             FUNCTION TBBS.ReceiveXmodem(Fname : ComStr) : Boolean;
  4408.             FUNCTION TBBS.ReceiveXmodem(Fname : ComStr) : Boolean;
  4409.             FUNCTION TBBS.ReceiveXmodem(Fname : ComStr) : Boolean;
  4410.  
  4411.  
  4412.                  There is currently one transfer protocol      available
  4413.  
  4414.             directly to BBSkit programmers: Xmodem.  Registered versions
  4415.  
  4416.             of BBSkit will include support for  Xmodem/CRC,   Xmodem/1K,
  4417.  
  4418.             and Zmodem.
  4419.  
  4420.                  ReceiveXmodem is called with a single filename as   its
  4421.  
  4422.             argument, such as ReceiveXmodem('TEMP').  Xmodem is probably
  4423.  
  4424.             the most widely   used error checking protocol in the BBS
  4425.  
  4426.             community, although it is slow.  Error checking is done with
  4427.  
  4428.             a simple checksum.  Xmodem uses 128 byte      "packets."  A
  4429.  
  4430.             packet is all of the information sent to the other end in  a
  4431.  
  4432.             transfer at one time.
  4433.  
  4434.                  All protocol receive functions  return a boolean value
  4435.  
  4436.             depending on whether the  file transfer(s) were successful.
  4437.  
  4438.             TRUE is returned if there were      no problems, and FALSE
  4439.  
  4440.             otherwise.  The programmer is expected to take care       of
  4441.  
  4442.             failed transfers.  BBSkit does not delete or       otherwise
  4443.  
  4444.             change files which are the results    of a failed transfer.
  4445.  
  4446.             The protocol is operator-abortable by pressing ESCape on the
  4447.  
  4448.             local keyboard.
  4449.  
  4450.  
  4451.             Sample Program
  4452.             Sample Program
  4453.             Sample Program
  4454.  
  4455.  
  4456.                  Success := ReceiveXmodem(Filename);
  4457.  
  4458.                  if (not Success) then ComWriteLn('Transfer failed.')
  4459.  
  4460.                  else ComWriteLn('Transfer successful.');
  4461.  
  4462.  
  4463.             See Also:
  4464.             See Also:
  4465.             See Also: SendXmodem.
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.                               BBSkit Manual      Page 52
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.                                                                Replicate
  4499.  
  4500.  
  4501.             FUNCTION Replicate(Ch : String; Num : Byte) : String;
  4502.             FUNCTION Replicate(Ch : String; Num : Byte) : String;
  4503.             FUNCTION Replicate(Ch : String; Num : Byte) : String;
  4504.  
  4505.  
  4506.                  Replicate creates a string consisting of Num occurances
  4507.  
  4508.             of Ch, one after the other, in string format.    Although Ch
  4509.  
  4510.             can be multiple characters, this function is mainly intended
  4511.  
  4512.             for creating long, non-space areas of    text, such as menu
  4513.  
  4514.             headers or dividing lines.
  4515.  
  4516.  
  4517.             Sample Program
  4518.             Sample Program
  4519.             Sample Program
  4520.  
  4521.  
  4522.                  WriteLn(Replicate('BBSkit', 3));
  4523.  
  4524.  
  4525.             Sample Run
  4526.             Sample Run
  4527.             Sample Run
  4528.  
  4529.  
  4530.                  BBSkitBBSkitBBSkit
  4531.  
  4532.  
  4533.             See Also:
  4534.             See Also:
  4535.             See Also: Space.
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.                               BBSkit Manual      Page 53
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.                                                                    Right
  4581.  
  4582.  
  4583.             FUNCTION Right(Strn : String; Places : Byte) : String;
  4584.             FUNCTION Right(Strn : String; Places : Byte) : String;
  4585.             FUNCTION Right(Strn : String; Places : Byte) : String;
  4586.  
  4587.  
  4588.                  Right will right justify Strn to a length of    Places.
  4589.  
  4590.             If spaces are needed to make Strn Places long, they  will be
  4591.  
  4592.             added to the beginning of the string, pushing  the text over
  4593.  
  4594.             and right justifying  it.  The justified string is returned
  4595.  
  4596.             as the function result.
  4597.  
  4598.                  If Strn is more than Places long, the text on  the left
  4599.  
  4600.             side of Strn will be truncated to make it Places long.
  4601.  
  4602.  
  4603.             See Also:
  4604.             See Also:
  4605.             See Also: Center, Left, Space.
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.                               BBSkit Manual      Page 54
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.                                                                  Ringing
  4657.  
  4658.  
  4659.             FUNCTION TBBS.Ringing : Boolean;
  4660.             FUNCTION TBBS.Ringing : Boolean;
  4661.             FUNCTION TBBS.Ringing : Boolean;
  4662.  
  4663.  
  4664.                  Ringing will return the  status of the ring indicator
  4665.  
  4666.             (RI) line on the current serial port.  If a ring has    been
  4667.  
  4668.             detected, Ringing will return TRUE.  Otherwise, Ringing will
  4669.  
  4670.             return FALSE.
  4671.  
  4672.                  This method is mainly for use in wait for call loops.
  4673.  
  4674.  
  4675.             Sample Program
  4676.             Sample Program
  4677.             Sample Program
  4678.  
  4679.  
  4680.                  while (not Ringing) and (not Keypressed) do
  4681.  
  4682.                   begin
  4683.  
  4684.                     GotoXY(1, 1);
  4685.  
  4686.                     Write('Waiting For Call: ', Time);
  4687.  
  4688.                   end;
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.                               BBSkit Manual      Page 55
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.                                                                      Run
  4736.  
  4737.  
  4738.             PROCEDURE TBBS.Run; VIRTUAL;
  4739.             PROCEDURE TBBS.Run; VIRTUAL;
  4740.             PROCEDURE TBBS.Run; VIRTUAL;
  4741.  
  4742.  
  4743.                  Run is a virtual method that does all of   the work for
  4744.  
  4745.             your version of TBBS.   This routine should contain all of
  4746.  
  4747.             your BBS driving code, and should only exit when the  BBS is
  4748.  
  4749.             ready to be shut down.  Typically, it is called in the  main
  4750.  
  4751.             block of your program, right after   
  4752.                                                  
  4753.                                                   Init
  4754.                                                   Init
  4755.                                                   Init and right before
  4756.  
  4757.             Done
  4758.             Done
  4759.             Done.
  4760.  
  4761.  
  4762.             See Also:
  4763.             See Also:
  4764.             See Also: Done, Init.
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.                               BBSkit Manual      Page 56
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.                                                                   SendAT
  4817.  
  4818.  
  4819.             FUNCTION TBBS.SendAT(Cmd : String) : Boolean;
  4820.             FUNCTION TBBS.SendAT(Cmd : String) : Boolean;
  4821.             FUNCTION TBBS.SendAT(Cmd : String) : Boolean;
  4822.  
  4823.  
  4824.                  SendAT will send  Cmd out the current serial port, and
  4825.  
  4826.             wait for an "OK"  response from the modem for two seconds.
  4827.  
  4828.             If this response is not detected  within two seconds, SendAT
  4829.  
  4830.             returns FALSE.  If the response  is detected, SendAT returns
  4831.  
  4832.             TRUE.
  4833.  
  4834.                  All AT commands must be prefixed  with the "AT" command
  4835.  
  4836.             prefix.  SendAT does not add this header to commands sent to
  4837.  
  4838.             it to remain compatible with the escape sequence, which does
  4839.  
  4840.             not use an AT prefix.  It does, however,   append a carriage
  4841.  
  4842.             return to the end of Cmd.
  4843.  
  4844.  
  4845.             Sample Program
  4846.             Sample Program
  4847.             Sample Program
  4848.  
  4849.  
  4850.                  while (not SendAT('ATZ')) do
  4851.  
  4852.                     WriteLn('Modem not responding.  Trying again...');
  4853.  
  4854.  
  4855.             See Also:
  4856.             See Also:
  4857.             See Also: WaitFor.
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.                               BBSkit Manual      Page 57
  4894.  
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.                                                                     Send
  4901.  
  4902.  
  4903.             FUNCTION TBBS.SendXmodem(Fname : ComStr) : Boolean;
  4904.             FUNCTION TBBS.SendXmodem(Fname : ComStr) : Boolean;
  4905.             FUNCTION TBBS.SendXmodem(Fname : ComStr) : Boolean;
  4906.  
  4907.  
  4908.                  There is one   protocol directly available to BBSkit
  4909.  
  4910.             programmers for sending files to a remote modem:     Xmodem.
  4911.  
  4912.             Registered versions include support  for sending files with
  4913.  
  4914.             Xmodem/CRC, Xmodem/1K, and Zmodem.
  4915.  
  4916.                  SendXmodem is called with   a single filename as its
  4917.  
  4918.             argument.  Xmodem is an error checking protocol,       using
  4919.  
  4920.             checksum error checking and  128 byte packets.  It is slow
  4921.  
  4922.             but widely available.
  4923.  
  4924.                  All protocols return a boolean value        determining
  4925.  
  4926.             whether they were successful.  A  TRUE value means that all
  4927.  
  4928.             transfers were successful, while  a FALSE value means that
  4929.  
  4930.             the file (in the case of the Xmodem protocols) or one of the
  4931.  
  4932.             files (with Zmodem) failed to transfer correctly.        The
  4933.  
  4934.             protocol  is operator-abortable by pressing ESCape on the
  4935.  
  4936.             local keyboard.
  4937.  
  4938.  
  4939.             Sample Program
  4940.             Sample Program
  4941.             Sample Program
  4942.  
  4943.  
  4944.                  Success := SendXmodem(Filename);
  4945.  
  4946.                  if (not Success) then ComWriteLn('Transfer failed.')
  4947.  
  4948.                  else ComWriteLn('Transfer successful.');
  4949.  
  4950.  
  4951.             See Also:
  4952.             See Also:
  4953.             See Also: ReceiveXmodem.
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.                               BBSkit Manual      Page 58
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.                                                            SetAnswerMode
  4991.  
  4992.  
  4993.             PROCEDURE TBBS.SetAnswerMode(Status : Byte);
  4994.             PROCEDURE TBBS.SetAnswerMode(Status : Byte);
  4995.             PROCEDURE TBBS.SetAnswerMode(Status : Byte);
  4996.  
  4997.  
  4998.                  SetAnswer mode will set the answer  mode for the method
  4999.  
  5000.             PickupPhone.  To avoid confusion, you should use         the
  5001.  
  5002.             constants Originate
  5003.                       Originate
  5004.                       Originate  and  Answer
  5005.                                       Answer
  5006.                                       Answer  which  are provided with
  5007.  
  5008.             BBSkit.  Although SetAnswerMode will accept    other values,
  5009.  
  5010.             the results are unpredictable.
  5011.  
  5012.                  Originate
  5013.                  Originate
  5014.                  Originate mode causes PickupPhone to send ATD out   the
  5015.  
  5016.             serial port when it is called.  Answer
  5017.                                             Answer
  5018.                                             Answer mode causes an ATA to
  5019.  
  5020.             be sent.  In both cases, the phone is taken off-hook and   a
  5021.  
  5022.             carrier can then be waited for and acted upon.
  5023.  
  5024.  
  5025.             Sample Program
  5026.             Sample Program
  5027.             Sample Program
  5028.  
  5029.  
  5030.                  SetAnswerMode(Answer);
  5031.  
  5032.                  Repeat
  5033.  
  5034.                  Until (Ringing);
  5035.  
  5036.                  PickupPhone;
  5037.  
  5038.                  WaitFor('C', 30);
  5039.  
  5040.                  if (Online) then LogUser
  5041.  
  5042.                  else Recycle;
  5043.  
  5044.  
  5045.             See Also:
  5046.             See Also:
  5047.             See Also: GetAnswerMode.
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.                               BBSkit Manual      Page 59
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.                                                                   SetBps
  5087.  
  5088.  
  5089.             PROCEDURE TBBS.SetBps(Bps : Word);
  5090.             PROCEDURE TBBS.SetBps(Bps : Word);
  5091.             PROCEDURE TBBS.SetBps(Bps : Word);
  5092.  
  5093.  
  5094.                  SetBps sets the baud rate on the current serial port to
  5095.  
  5096.             Bps.   Legal values are 300, 600, 1200, 2400, 4800, 9600,
  5097.  
  5098.             19200, and 38400.  Other values  will not work because they
  5099.  
  5100.             are not supported by current FOSSIL specifications.
  5101.  
  5102.                  This method must be called before  any calls to GetBps,
  5103.  
  5104.             or BBSkit will not be able  to accurately identify the rate
  5105.  
  5106.             of a serial port.
  5107.  
  5108.  
  5109.             Sample Program
  5110.             Sample Program
  5111.             Sample Program
  5112.  
  5113.  
  5114.                  SetBps(2400);
  5115.  
  5116.                  if (not SendAT('ATZ')) then
  5117.  
  5118.                   begin
  5119.  
  5120.                     WriteLn('Modem not responding.');
  5121.  
  5122.                     Halt(1);
  5123.  
  5124.                   end
  5125.  
  5126.                  else
  5127.  
  5128.                     WaitForCall;
  5129.  
  5130.  
  5131.             See Also:
  5132.             See Also:
  5133.             See Also: GetBps.
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.                               BBSkit Manual      Page 60
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.                                                            SetCarrierChk
  5174.  
  5175.  
  5176.             PROCEDURE TBBS.SetCarrierChk(Status : Boolean);
  5177.             PROCEDURE TBBS.SetCarrierChk(Status : Boolean);
  5178.             PROCEDURE TBBS.SetCarrierChk(Status : Boolean);
  5179.  
  5180.  
  5181.                  This method sets the mode of carrier checking on    the
  5182.  
  5183.             current serial port during any wait-for-key            loops
  5184.  
  5185.             (ComReadKey, ComReadKeyE, ComReadLn, ComReadLnWrap).  If   a
  5186.  
  5187.             carrier is  lost while inside one of these loops, it will
  5188.  
  5189.             exit and allow the calling code to check for a lost carrier,
  5190.  
  5191.             and take whatever action  is necessary.  It is provided to
  5192.  
  5193.             keep users from being able to "crash" your BBS by hanging up
  5194.  
  5195.             on it.
  5196.  
  5197.  
  5198.             See Also:
  5199.             See Also:
  5200.             See Also: SetTime, SetTimeDelay.
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.                               BBSkit Manual      Page 61
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.                                                           SetCaptureFile
  5251.  
  5252.  
  5253.             PROCEDURE TBBS.SetCaptureFile(Path : ComStr);
  5254.             PROCEDURE TBBS.SetCaptureFile(Path : ComStr);
  5255.             PROCEDURE TBBS.SetCaptureFile(Path : ComStr);
  5256.  
  5257.  
  5258.                  SetCaptureFile determines where text will be sent when
  5259.  
  5260.             file capturing is turned on.  This allows you to      create
  5261.  
  5262.             files of entire user sessions, documenting  what they did at
  5263.  
  5264.             any point in their session.  It can also be used as        a
  5265.  
  5266.             capture buffer or "backscroll" feature for a        terminal
  5267.  
  5268.             program.
  5269.  
  5270.                  The default   file is SESSION.TXT, in the current
  5271.  
  5272.             directory.  Path can be any legal DOS   pathname, up to 127
  5273.  
  5274.             characters, including drive and subdirectory identifiers.
  5275.  
  5276.  
  5277.             Sample Program
  5278.             Sample Program
  5279.             Sample Program
  5280.  
  5281.  
  5282.                  SetCaptureFile('LEECH.TXT');
  5283.  
  5284.                  SetCaptureStatus(True);
  5285.  
  5286.                  ComWriteLn('Session recording has been turned on.');
  5287.  
  5288.  
  5289.             See Also:
  5290.             See Also:
  5291.             See Also: SetCaptureStatus, SetPrinter.
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.                               BBSkit Manual      Page 62
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.                                                         SetCaptureStatus
  5335.  
  5336.  
  5337.             PROCEDURE TBBS.SetCaptureStatus(Status : Boolean);
  5338.             PROCEDURE TBBS.SetCaptureStatus(Status : Boolean);
  5339.             PROCEDURE TBBS.SetCaptureStatus(Status : Boolean);
  5340.  
  5341.  
  5342.                  SetCaptureStatus turns on or  off session capturing to
  5343.  
  5344.             the file specified by SetCaptureFile, or to SESSION.TXT   if
  5345.  
  5346.             no call to SetCaptureFile is made.  All text transferred out
  5347.  
  5348.             through either ComWrite or ComWriteLn, as  well as all input
  5349.  
  5350.             made through the Comxxx calls, will  be copied to this file
  5351.  
  5352.             if Status is TRUE.  The file is closed and saved when Status
  5353.  
  5354.             is FALSE.
  5355.  
  5356.  
  5357.             See Also:
  5358.             See Also:
  5359.             See Also: SetCaptureFile, SetPrinter.
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.                               BBSkit Manual      Page 63
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.                                                                  SetEcho
  5411.  
  5412.  
  5413.             PROCEDURE TBBS.SetEcho(Ch : Char);
  5414.             PROCEDURE TBBS.SetEcho(Ch : Char);
  5415.             PROCEDURE TBBS.SetEcho(Ch : Char);
  5416.  
  5417.  
  5418.                  SetEcho sets the character to be echoed when input from
  5419.  
  5420.             the modem is echoed back to  the modem (through ComReadKeyE,
  5421.  
  5422.             ComReadLn, or ComReadLnWrap).  It is useful for the input of
  5423.  
  5424.             passwords, but not much  else.  This echoing can be turned
  5425.  
  5426.             off by passing SetEcho a null value (#0).
  5427.  
  5428.  
  5429.             Sample Program
  5430.             Sample Program
  5431.             Sample Program
  5432.  
  5433.  
  5434.                  ComWrite('Enter password, stars echo: ');
  5435.  
  5436.                  SetEcho('*');
  5437.  
  5438.                  ComReadLn(Password, 10);
  5439.  
  5440.                  SetEcho(#0);  { turn echoing off }
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.                               BBSkit Manual      Page 64
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.                                                                 SetInput
  5489.  
  5490.  
  5491.             PROCEDURE TBBS.SetInput(Console, Remote : Boolean);
  5492.             PROCEDURE TBBS.SetInput(Console, Remote : Boolean);
  5493.             PROCEDURE TBBS.SetInput(Console, Remote : Boolean);
  5494.  
  5495.  
  5496.                  SetInput controls how input is accepted into the input
  5497.  
  5498.             routines (ComReadKey, ComReadKeyE, ComReadLn,            and
  5499.  
  5500.             ComReadLnWrap).  If Console is TRUE,    then input from the
  5501.  
  5502.             local keyboard will be  accepted.  If FALSE, input will be
  5503.  
  5504.             ignored.   If Remote is TRUE, then input from the current
  5505.  
  5506.             serial port will be accepted.  If FALSE, it will be ignored.
  5507.  
  5508.  
  5509.             Sample Program
  5510.             Sample Program
  5511.             Sample Program
  5512.  
  5513.  
  5514.                  SetInput(True, False);  { console only }
  5515.  
  5516.                  SetOutput(True, False);
  5517.  
  5518.                  ComWrite('New security level: ');
  5519.  
  5520.                  ComReadLn(Security, 5);  { let sysop input, user }
  5521.  
  5522.                                       { can't see it          }
  5523.  
  5524.                  SetInput(True, True);  { console and modem }
  5525.  
  5526.                  SetOutput(True, True);
  5527.  
  5528.  
  5529.             See Also:
  5530.             See Also:
  5531.             See Also: GetInput, GetOutput, SetOutput.
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.                               BBSkit Manual      Page 65
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.                                                               SetIntChar
  5574.  
  5575.  
  5576.             PROCEDURE TBBS.SetIntChar(Ch : Char);
  5577.             PROCEDURE TBBS.SetIntChar(Ch : Char);
  5578.             PROCEDURE TBBS.SetIntChar(Ch : Char);
  5579.  
  5580.  
  5581.                  SetIntChar defines what key will act as the interrupter
  5582.  
  5583.             for files when viewing a file through TypeFile.  If      the
  5584.  
  5585.             interrupt character is pressed,   the file is stopped and
  5586.  
  5587.             TypeFile returns to the calling code.
  5588.  
  5589.                  If Ch is null (#0), then the file cannot             be
  5590.  
  5591.             interrupted.  The default is a space (#32).
  5592.  
  5593.  
  5594.             See Also:
  5595.             See Also:
  5596.             See Also: SetPauseChar, TypeFile.
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.  
  5628.  
  5629.  
  5630.  
  5631.  
  5632.  
  5633.  
  5634.  
  5635.  
  5636.  
  5637.  
  5638.  
  5639.  
  5640.  
  5641.                               BBSkit Manual      Page 66
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.                                                                    SetLF
  5649.  
  5650.  
  5651.             PROCEDURE TBBS.SetLF(Status : Boolean);
  5652.             PROCEDURE TBBS.SetLF(Status : Boolean);
  5653.             PROCEDURE TBBS.SetLF(Status : Boolean);
  5654.  
  5655.  
  5656.                  SetLF controls the sending  of line feeds (#10) after
  5657.  
  5658.             carriage returns (#13).  This affects    both output to the
  5659.  
  5660.             modem and output to the local console.    When set to TRUE,
  5661.  
  5662.             every time a ComWriteLn(...) is executed,    a line feed is
  5663.  
  5664.             sent out as well.  When set to FALSE, no line feeds      are
  5665.  
  5666.             appending to carriage returns.
  5667.  
  5668.                  This is mainly used for output    to the main console,
  5669.  
  5670.             although some terminal emulations need it as well.
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.                               BBSkit Manual      Page 67
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.                                                                 SetNulls
  5723.  
  5724.  
  5725.             PROCEDURE TBBS.SetNulls(Nulls : Byte);
  5726.             PROCEDURE TBBS.SetNulls(Nulls : Byte);
  5727.             PROCEDURE TBBS.SetNulls(Nulls : Byte);
  5728.  
  5729.  
  5730.                  SetNulls determines how many nulls to send after   each
  5731.  
  5732.             carriage return.  Some   older terminals require a slight
  5733.  
  5734.             pause between lines, and  nulls are the only non-printing,
  5735.  
  5736.             non-command character these terminals can           process.
  5737.  
  5738.             Therefore, setting nulls to 4 or 5 can  give older terminals
  5739.  
  5740.             the time they need to "catch up" with the transmission.   If
  5741.  
  5742.             nulls are needed and not used, the first few characters from
  5743.  
  5744.             each line are usually lost.
  5745.  
  5746.  
  5747.  
  5748.  
  5749.  
  5750.  
  5751.  
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.                               BBSkit Manual      Page 68
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.                                                                SetOutput
  5797.  
  5798.  
  5799.             PROCEDURE TBBS.SetOutput(Console, Remote : Boolean);
  5800.             PROCEDURE TBBS.SetOutput(Console, Remote : Boolean);
  5801.             PROCEDURE TBBS.SetOutput(Console, Remote : Boolean);
  5802.  
  5803.  
  5804.                  SetOutput controls output redirection from ComWrite and
  5805.  
  5806.             ComWriteLn.  If  Console is TRUE, output from these methods
  5807.  
  5808.             is sent out to the screen.  If FALSE, no output is seen at
  5809.  
  5810.             the local terminal.  If Remote is TRUE,   output is sent to
  5811.  
  5812.             the serial port.  If FALSE, no output is seen at the  remote
  5813.  
  5814.             terminal.
  5815.  
  5816.  
  5817.             See Also:
  5818.             See Also:
  5819.             See Also: GetInput, GetOutput, SetInput.
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.                               BBSkit Manual      Page 69
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.                                                                SetPaging
  5872.  
  5873.  
  5874.             PROCEDURE TBBS.SetPaging(Status : Boolean);
  5875.             PROCEDURE TBBS.SetPaging(Status : Boolean);
  5876.             PROCEDURE TBBS.SetPaging(Status : Boolean);
  5877.  
  5878.  
  5879.                  SetPaging controls the pause at the end of each page of
  5880.  
  5881.             text.  If Status is set to TRUE, every page of text will end
  5882.  
  5883.             with a (more...) prompt, and a pause   for a keypress.  If
  5884.  
  5885.             Status is FALSE, text scrolls by without any pauses.
  5886.  
  5887.                  The length   of a screen can be set by a call to
  5888.  
  5889.             SetPagingLines.  The message  sent at the end of each page
  5890.  
  5891.             can be set by a call to SetPagingMsg.  The  internal counter
  5892.  
  5893.             which determines  when a page of text has been reached is
  5894.  
  5895.             reset each time the    user pressed a key and after the
  5896.  
  5897.             keypress following the (more...) prompt.
  5898.  
  5899.  
  5900.             Sample Program
  5901.             Sample Program
  5902.             Sample Program
  5903.  
  5904.  
  5905.                  SetPaging(True);
  5906.  
  5907.                  SetPagingLines(24);
  5908.  
  5909.                  SetPagingMsg('(more...)');
  5910.  
  5911.                  TypeFile('READ.ME');
  5912.  
  5913.  
  5914.             See Also:
  5915.             See Also:
  5916.             See Also: SetPagingLines, SetPagingMsg.
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.                               BBSkit Manual      Page 70
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.                                                           SetPagingLines
  5958.  
  5959.  
  5960.             PROCEDURE TBBS.SetPagingLines(Num : Byte);
  5961.             PROCEDURE TBBS.SetPagingLines(Num : Byte);
  5962.             PROCEDURE TBBS.SetPagingLines(Num : Byte);
  5963.  
  5964.  
  5965.                  SetPagingLines determines how long the screen    is for
  5966.  
  5967.             screen pausing.  The default is 24.  Pausing   is not turned
  5968.  
  5969.             on until a call to SetPaging is made.
  5970.  
  5971.  
  5972.             See Also:
  5973.             See Also:
  5974.             See Also: SetPaging, SetPagingMsg.
  5975.  
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020.  
  6021.  
  6022.                               BBSkit Manual      Page 71
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.                                                             SetPagingMsg
  6030.  
  6031.  
  6032.             PROCEDURE TBBS.SetPagingMsg(Msg : String);
  6033.             PROCEDURE TBBS.SetPagingMsg(Msg : String);
  6034.             PROCEDURE TBBS.SetPagingMsg(Msg : String);
  6035.  
  6036.  
  6037.                  This method allows the programmer to customize the way
  6038.  
  6039.             a user is told a page of test has been reached.  Note that
  6040.  
  6041.             the page pausing   routine currently implemented does not
  6042.  
  6043.             allow  for "Continue? Yes/No/Continuous" type prompts,
  6044.  
  6045.             because a keypress is not processed at the end of a page  of
  6046.  
  6047.             text.  Therefore, this prompt should just convey the    idea
  6048.  
  6049.             that the user must press a key to continue viewing  the text
  6050.  
  6051.             on his screen.
  6052.  
  6053.  
  6054.             See Also:
  6055.             See Also:
  6056.             See Also: SetPaging, SetPagingLines.
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.  
  6099.                               BBSkit Manual      Page 72
  6100.  
  6101.  
  6102.  
  6103.  
  6104.  
  6105.  
  6106.                                                             SetPauseChar
  6107.  
  6108.  
  6109.             PROCEDURE TBBS.SetPauseChar(Ch : Char);
  6110.             PROCEDURE TBBS.SetPauseChar(Ch : Char);
  6111.             PROCEDURE TBBS.SetPauseChar(Ch : Char);
  6112.  
  6113.  
  6114.                  SetPauseChar determines what character will stop output
  6115.  
  6116.             when typing a file using TypeFile.  It is an  alternative to
  6117.  
  6118.             various types of flow    control since FOSSIL based flow
  6119.  
  6120.             control does not allow BBSkit to  do any inactivity checking
  6121.  
  6122.             while waiting for a key.  SetPauseChar can be   of any case.
  6123.  
  6124.             The check   for a pause key being pressed is not case
  6125.  
  6126.             sensitive.
  6127.  
  6128.                  The default is P.  Once the file has   been paused, any
  6129.  
  6130.             key will restart it.
  6131.  
  6132.  
  6133.             See Also:
  6134.             See Also:
  6135.             See Also: SetIntChar, TypeFile.
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159.  
  6160.  
  6161.  
  6162.  
  6163.  
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.                               BBSkit Manual      Page 73
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.                                                                  SetPort
  6185.  
  6186.  
  6187.             PROCEDURE TBBS.SetPort(Comport : Byte);
  6188.             PROCEDURE TBBS.SetPort(Comport : Byte);
  6189.             PROCEDURE TBBS.SetPort(Comport : Byte);
  6190.  
  6191.  
  6192.                  Sets the current COM port to  Comport.  This is useful
  6193.  
  6194.             for setting the comport in applications where the     FOSSIL
  6195.  
  6196.             driver should already  be initialized, such as in doors and
  6197.  
  6198.             other external programs used by a BBS.
  6199.  
  6200.                  Comport must be in the range of 1   - 4, inclusive, or
  6201.  
  6202.             the call is ignored.
  6203.  
  6204.  
  6205.             See Also:
  6206.             See Also:
  6207.             See Also: OpenPort.
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.  
  6217.  
  6218.  
  6219.  
  6220.  
  6221.  
  6222.  
  6223.  
  6224.  
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.                               BBSkit Manual      Page 74
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.                                                               SetPrinter
  6260.  
  6261.  
  6262.             PROCEDURE TBBS.SetPrinter(Status : Boolean);
  6263.             PROCEDURE TBBS.SetPrinter(Status : Boolean);
  6264.             PROCEDURE TBBS.SetPrinter(Status : Boolean);
  6265.  
  6266.  
  6267.                  SetPrinter controls the status of printer dumping of a
  6268.  
  6269.             session in progress.     The printer to be used must be
  6270.  
  6271.             accessible through Pascal's Lst pseudo-file, which     sends
  6272.  
  6273.             data to the printer.     The "Printer" unit need not be
  6274.  
  6275.             included in your program, but it      must be available at
  6276.  
  6277.             compile-time.
  6278.  
  6279.                  If Status is set to TRUE, all text output       through
  6280.  
  6281.             ComWrite and ComWriteLn will be sent to the printer, and all
  6282.  
  6283.             input from the ComReadKey, ComReadKeyE, ComReadLn,       and
  6284.  
  6285.             ComReadLnWrap calls will also be sent to the printer.
  6286.  
  6287.  
  6288.             See Also:
  6289.             See Also:
  6290.             See Also: SetCaptureFile, SetCaptureStatus.
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.                               BBSkit Manual      Page 75
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.                                                                 SetTimer
  6339.  
  6340.  
  6341.             PROCEDURE TBBS.SetTimer(Status : Boolean);
  6342.             PROCEDURE TBBS.SetTimer(Status : Boolean);
  6343.             PROCEDURE TBBS.SetTimer(Status : Boolean);
  6344.  
  6345.  
  6346.                  This method controls monitoring of user     inactivity.
  6347.  
  6348.             When Status is TRUE, and the    user has been idle for the
  6349.  
  6350.             amount of time specified by SetTimerDelay, BBSkit will send
  6351.  
  6352.             a short message to  the user, telling him of the impending
  6353.  
  6354.             logoff.  If 30 additional seconds pass, and the user has not
  6355.  
  6356.             pressed a key, the input routine  will be cancelled and the
  6357.  
  6358.             CarrierLost function will  act as if carrier had been lost.
  6359.  
  6360.             Your code should check  CarrierLost and act as if the user
  6361.  
  6362.             had hung up on instead of trying to determine whether or not
  6363.  
  6364.             carrier was actually lost.
  6365.  
  6366.  
  6367.             See Also:
  6368.             See Also:
  6369.             See Also: CarrierLost, SetTimerDelay.
  6370.  
  6371.  
  6372.  
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379.  
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.                               BBSkit Manual      Page 76
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.                                                            SetTimerDelay
  6418.  
  6419.  
  6420.             PROCEDURE TBBS.SetTimerDelay(Dly : Word);
  6421.             PROCEDURE TBBS.SetTimerDelay(Dly : Word);
  6422.             PROCEDURE TBBS.SetTimerDelay(Dly : Word);
  6423.  
  6424.  
  6425.                  This method specifies the time interval,    in seconds,
  6426.  
  6427.             before BBSkit should treat the situation  as a carrier loss.
  6428.  
  6429.             Inactivity checking is turned on and off through         the
  6430.  
  6431.             SetTimer method.
  6432.  
  6433.  
  6434.             See Also:
  6435.             See Also:
  6436.             See Also: SetTimer.
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.                               BBSkit Manual      Page 77
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.                                                               ShowCursor
  6491.  
  6492.  
  6493.             PROCEDURE ShowCursor;
  6494.             PROCEDURE ShowCursor;
  6495.             PROCEDURE ShowCursor;
  6496.  
  6497.  
  6498.                  ShowCursor turns the local screen text cursor on after
  6499.  
  6500.             it was previously turned off with the HideCursor procedure.
  6501.  
  6502.  
  6503.             See Also:
  6504.             See Also:
  6505.             See Also: HideCursor.
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.  
  6550.  
  6551.  
  6552.  
  6553.  
  6554.                               BBSkit Manual      Page 78
  6555.  
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.                                                                    Space
  6562.  
  6563.  
  6564.             FUNCTION Space(Num : Byte) : String;
  6565.             FUNCTION Space(Num : Byte) : String;
  6566.             FUNCTION Space(Num : Byte) : String;
  6567.  
  6568.  
  6569.                  Space returns a string consisting of Num spaces.  It is
  6570.  
  6571.             mainly used for aligning text out from the left side  of the
  6572.  
  6573.             screen, without having to  insert literal spaces into your
  6574.  
  6575.             code.
  6576.  
  6577.  
  6578.             See Also:
  6579.             See Also:
  6580.             See Also: Center, Left, Replicate, Right.
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.  
  6614.  
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620.  
  6621.  
  6622.  
  6623.  
  6624.  
  6625.  
  6626.  
  6627.                               BBSkit Manual      Page 79
  6628.  
  6629.  
  6630.  
  6631.  
  6632.  
  6633.  
  6634.                                                                 StrToInt
  6635.  
  6636.  
  6637.             FUNCTION StrToInt(Strn : String) : LongInt;
  6638.             FUNCTION StrToInt(Strn : String) : LongInt;
  6639.             FUNCTION StrToInt(Strn : String) : LongInt;
  6640.  
  6641.  
  6642.                  StrToInt converts the string  Strn into the equivalent
  6643.  
  6644.             long integer and returns   it as a function.  It is the
  6645.  
  6646.             procedure Val in function form, like    it should have been
  6647.  
  6648.             from the beginning.
  6649.  
  6650.                  ComReadLn and ComReadLnWrap cannot handle input of non-
  6651.  
  6652.             string types, so any numbers entered from these   procedures
  6653.  
  6654.             must first be converted into an  integer-type to be used by
  6655.  
  6656.             the programmer.
  6657.  
  6658.  
  6659.             Sample Program
  6660.             Sample Program
  6661.             Sample Program
  6662.  
  6663.  
  6664.                  ComWrite('Lines per page: ');
  6665.  
  6666.                  ComReadLn(Inp, 3);
  6667.  
  6668.                  Lines := StrToInt(Inp);
  6669.  
  6670.  
  6671.             See Also:
  6672.             See Also:
  6673.             See Also: IntToStr.
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682.  
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.                               BBSkit Manual      Page 80
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.                                                                    SwapB
  6718.  
  6719.  
  6720.             PROCEDURE SwapB(var A : Byte);
  6721.             PROCEDURE SwapB(var A : Byte);
  6722.             PROCEDURE SwapB(var A : Byte);
  6723.  
  6724.  
  6725.                  SwapB will swap the high and low order hex digits  of a
  6726.  
  6727.             byte.  It is  useful for reversing the text attributes and
  6728.  
  6729.             swapping the foreground and background colors.  It     isn't
  6730.  
  6731.             useful for much else, however.  (At least, nothing       the
  6732.  
  6733.             author can think of right now.)
  6734.  
  6735.  
  6736.             Sample Program
  6737.             Sample Program
  6738.             Sample Program
  6739.  
  6740.  
  6741.                  Temp := $12;
  6742.  
  6743.                  SwapB(Temp);
  6744.  
  6745.  
  6746.             Sample Watch
  6747.             Sample Watch
  6748.             Sample Watch
  6749.  
  6750.  
  6751.                  Temp,h : $21
  6752.  
  6753.  
  6754.                  If you want to send hex numbers to the screen, you will
  6755.  
  6756.             have to write your own function or procedure      to do so.
  6757.  
  6758.             Turbo Pascal doesn't include one.  However, using a watch is
  6759.  
  6760.             sufficient for this sample.
  6761.  
  6762.  
  6763.             See Also:
  6764.             See Also:
  6765.             See Also: SYSTEM.Swap.
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.                               BBSkit Manual      Page 81
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.                                                             TerminalMode
  6805.  
  6806.  
  6807.             FUNCTION TBBS.TerminalMode(Duplex : Byte) : Char;
  6808.             FUNCTION TBBS.TerminalMode(Duplex : Byte) : Char;
  6809.             FUNCTION TBBS.TerminalMode(Duplex : Byte) : Char;
  6810.  
  6811.  
  6812.                  TerminalMode provides the closest contact with      the
  6813.  
  6814.             modem that BBSkit provides a user.   Duplex contains one of
  6815.  
  6816.             two values, which  are represented by constants.  If Duplex
  6817.  
  6818.             is Full
  6819.                Full
  6820.                Full,  then no character typed at the local console is
  6821.  
  6822.             sent to the screen.  If Duplex is     Half
  6823.                                                   Half
  6824.                                                   Half, every  character
  6825.  
  6826.             typed at the keyboard will also appear at the   screen.  All
  6827.  
  6828.             characters typed are sent out the serial port, and       any
  6829.  
  6830.             characters coming through the serial port will appear on the
  6831.  
  6832.             local screen.
  6833.  
  6834.                  TerminalMode exits when one of the extended keycodes is
  6835.  
  6836.             detected by Pascal.  These include the Alt- keys,       some
  6837.  
  6838.             Control- keys, function keys, and others.  For a    complete
  6839.  
  6840.             list, and the codes that go with each key, check your Pascal
  6841.  
  6842.             manuals under "Extended Key Codes."
  6843.  
  6844.  
  6845.  
  6846.  
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.  
  6871.  
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.                               BBSkit Manual      Page 82
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.                                                              TextMemSize
  6889.  
  6890.  
  6891.             FUNCTION TextMemSize(X1, Y1, X2, Y2 : Byte) : Word;
  6892.             FUNCTION TextMemSize(X1, Y1, X2, Y2 : Byte) : Word;
  6893.             FUNCTION TextMemSize(X1, Y1, X2, Y2 : Byte) : Word;
  6894.  
  6895.  
  6896.                  TextMemSize returns the amount of memory required for a
  6897.  
  6898.             GetText call using   the coordinates X1,Y1 to X2,Y2.  All
  6899.  
  6900.             coordinates are absolute screen coordinates, not relative to
  6901.  
  6902.             the current window.
  6903.  
  6904.                  The memory required for a GetText call is  equal to the
  6905.  
  6906.             width of the box * 2, multiplied by the height of the   box,
  6907.  
  6908.             plus 2.  Each character on-screen  requires two bytes.  The
  6909.  
  6910.             first is the    actual character, and the second is the
  6911.  
  6912.             attribute byte.  The  attribute byte determines what color
  6913.  
  6914.             the character is, its background, and if the       character
  6915.  
  6916.             blinks.  Two more bytes are required for PutText to know how
  6917.  
  6918.             large the text is that it is placing on-screen.
  6919.  
  6920.  
  6921.             See Also:
  6922.             See Also:
  6923.             See Also: GetText, PutText.
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.  
  6962.                               BBSkit Manual      Page 83
  6963.  
  6964.  
  6965.  
  6966.  
  6967.  
  6968.  
  6969.                                                                     Time
  6970.  
  6971.  
  6972.             FUNCTION Time : String;
  6973.             FUNCTION Time : String;
  6974.             FUNCTION Time : String;
  6975.  
  6976.  
  6977.                  Time returns the current time from the internal   clock
  6978.  
  6979.             (if any) or from DOS (if there is no clock) and formats into
  6980.  
  6981.             the form HH:MM[a/p].  Therefore, 12:00 noon would         be
  6982.  
  6983.             returned as 12:00p, and 8 in  the morning would be returned
  6984.  
  6985.             as  8:00a.  (There is a leading space for times when     the
  6986.  
  6987.             hour only takes up one digit.)    The length of the string
  6988.  
  6989.             returned by Time is always
  6990.                                 always
  6991.                                 always 6 characters.
  6992.  
  6993.  
  6994.             See Also:
  6995.             See Also:
  6996.             See Also: Date.
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.  
  7021.  
  7022.  
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.                               BBSkit Manual      Page 84
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.                                                                 TypeFile
  7048.  
  7049.  
  7050.             PROCEDURE TBBS.TypeFile(Fname : String);
  7051.             PROCEDURE TBBS.TypeFile(Fname : String);
  7052.             PROCEDURE TBBS.TypeFile(Fname : String);
  7053.  
  7054.  
  7055.                  TypeFile acts exactly like the DOS equivalent, but also
  7056.  
  7057.             sends text to the serial port    and/or screen depending on
  7058.  
  7059.             SetOutput.
  7060.  
  7061.                  The file can     be paused if the key defined by
  7062.  
  7063.             SetPauseChar is pressed,  and stopped if the key defined by
  7064.  
  7065.             SetIntChar is pressed.
  7066.  
  7067.  
  7068.             See Also:
  7069.             See Also:
  7070.             See Also: SetIntChar, SetPauseChar.
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079.  
  7080.  
  7081.  
  7082.  
  7083.  
  7084.  
  7085.  
  7086.  
  7087.  
  7088.  
  7089.  
  7090.  
  7091.  
  7092.  
  7093.  
  7094.  
  7095.  
  7096.  
  7097.  
  7098.  
  7099.  
  7100.  
  7101.  
  7102.  
  7103.  
  7104.  
  7105.  
  7106.  
  7107.  
  7108.  
  7109.  
  7110.  
  7111.  
  7112.  
  7113.  
  7114.  
  7115.                               BBSkit Manual      Page 85
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.                                                                    Upper
  7123.  
  7124.  
  7125.             FUNCTION Upper(Strn : String) : String;
  7126.             FUNCTION Upper(Strn : String) : String;
  7127.             FUNCTION Upper(Strn : String) : String;
  7128.  
  7129.  
  7130.                  Upper will make Strn consist completely    of uppercase
  7131.  
  7132.             characters.  Characters not in the    range of 'a'..'z' are
  7133.  
  7134.             unaffected.
  7135.  
  7136.  
  7137.             Sample Program
  7138.             Sample Program
  7139.             Sample Program
  7140.  
  7141.  
  7142.                  WriteLn(Upper('BBSkit'));
  7143.  
  7144.  
  7145.             Sample Run
  7146.             Sample Run
  7147.             Sample Run
  7148.  
  7149.  
  7150.                  BBSKIT
  7151.  
  7152.  
  7153.             See Also:
  7154.             See Also:
  7155.             See Also: Lower.
  7156.  
  7157.  
  7158.  
  7159.  
  7160.  
  7161.  
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.                               BBSkit Manual      Page 86
  7196.  
  7197.  
  7198.  
  7199.  
  7200.  
  7201.  
  7202.                                                                VersionID
  7203.  
  7204.  
  7205.             FUNCTION VersionID : String;
  7206.             FUNCTION VersionID : String;
  7207.             FUNCTION VersionID : String;
  7208.  
  7209.  
  7210.                  Returns a string reporting the version of BBSkit,   who
  7211.  
  7212.             wrote it, the release date, and whether it  is registered or
  7213.  
  7214.             unregistered.
  7215.  
  7216.                  This function was  added instead of using a title line
  7217.  
  7218.             at the  beginning of each program that used BBSkit.  Your
  7219.  
  7220.             programs can now   also report the version of BBSkit used
  7221.  
  7222.             without anything more  complex than a recompile for a newer
  7223.  
  7224.             version.
  7225.  
  7226.  
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.  
  7265.  
  7266.  
  7267.  
  7268.  
  7269.                               BBSkit Manual      Page 87
  7270.  
  7271.  
  7272.  
  7273.  
  7274.  
  7275.  
  7276.                                                                  WaitFor
  7277.  
  7278.  
  7279.             FUNCTION TBBS.WaitFor(Strn : String; Timeout 
  7280.             FUNCTION TBBS.WaitFor(Strn : String; Timeout 
  7281.             FUNCTION TBBS.WaitFor(Strn : String; Timeout     : Word) :
  7282.                                                              : Word) :
  7283.                                                              : Word) :
  7284.  
  7285.             Boolean;
  7286.             Boolean;
  7287.             Boolean;
  7288.  
  7289.  
  7290.                  WaitFor will wait  for Strn to come through the serial
  7291.  
  7292.             port in Timeout seconds or less.    If the string is seen,
  7293.  
  7294.             WaitFor returns a TRUE value.  Otherwise, it returns FALSE.
  7295.  
  7296.                  WaitFor is not case sensitive,          and does no
  7297.  
  7298.             differentiate between whole words and partial         words.
  7299.  
  7300.             Therefore, WaitFor would return  TRUE while waiting for an
  7301.  
  7302.             "e" if the following string came through the serial port:
  7303.  
  7304.  
  7305.             BBSkit is neat!
  7306.  
  7307.  
  7308.                  This method does make use of the serial port's    input
  7309.  
  7310.             buffer, though, so all  characters up to the "a" in "neat"
  7311.  
  7312.             would be lost.  The only characters remaining  in the buffer
  7313.  
  7314.             after that call would be "at!".
  7315.  
  7316.                  WaitFor is primarily used for checking to see if    the
  7317.  
  7318.             modem received a   sent command.  The method   SendAT
  7319.                                                            SendAT
  7320.                                                            SendAT calls
  7321.  
  7322.             WaitFor after sending a command out the serial port, and has
  7323.  
  7324.             it wait two seconds for an "OK" string to be sent back.
  7325.  
  7326.                  WaitFor can also be used to find out what baud a caller
  7327.  
  7328.             has connected at:
  7329.  
  7330.  
  7331.             Sample Program
  7332.             Sample Program
  7333.             Sample Program
  7334.  
  7335.  
  7336.                  if (WaitFor('CONNECT', 30)) then
  7337.  
  7338.                   begin
  7339.  
  7340.                     ComReadLn(Result, 40);  { read in result code }
  7341.  
  7342.                     Bps := IntToStr(Copy(Result, 2, 5));
  7343.  
  7344.                     if (Bps = 0) then Bps := 300;
  7345.  
  7346.                     SetBps(Bps);
  7347.  
  7348.                   end;
  7349.  
  7350.  
  7351.                  This code works because a common connect string,   such
  7352.  
  7353.             as CONNECT 1200, would be seen.  " 1200" would remain in the
  7354.  
  7355.             input buffer, so the programmer would turn all     character
  7356.  
  7357.             past the leading space into a number, and use that number to
  7358.  
  7359.             set the bit rate.  If that number were 0, it would mean that
  7360.  
  7361.             there was no text following the CONNECT, so you must      be
  7362.  
  7363.             running at 300 baud.  Note that   some modems must be told
  7364.  
  7365.             specifically to send  the extended CONNECT codes if they do
  7366.  
  7367.             not do so as default.
  7368.  
  7369.  
  7370.             See Also:
  7371.             See Also:
  7372.             See Also: SendAT.
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.                               BBSkit Manual      Page 88
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.                                                                     XPos
  7390.  
  7391.  
  7392.             FUNCTION XPos(Strn, SubStrn : String; Offset : Byte) : Byte;
  7393.             FUNCTION XPos(Strn, SubStrn : String; Offset : Byte) : Byte;
  7394.             FUNCTION XPos(Strn, SubStrn : String; Offset : Byte) : Byte;
  7395.  
  7396.  
  7397.                  XPos returns the first occurance of SubStrn within Strn
  7398.  
  7399.             starting at Offset into Strn.  This function is an extension
  7400.  
  7401.             of the standard function Pos, which does not allow       for
  7402.  
  7403.             finding multiple occurances of the sub-string.
  7404.  
  7405.                  Please note that XPos makes a  more logical approach to
  7406.  
  7407.             searching a string for a sub-string, and the string       to
  7408.  
  7409.             search in comes first,  while the string to locate in that
  7410.  
  7411.             string comes second.    (Pos reverses it.  The sub-string
  7412.  
  7413.             comes before the string.)
  7414.  
  7415.                  The result of  this function is the absolute offset at
  7416.  
  7417.             which the sub-string starts within the string, or zero if no
  7418.  
  7419.             occurance was found.
  7420.  
  7421.  
  7422.             Sample Program
  7423.             Sample Program
  7424.             Sample Program
  7425.  
  7426.  
  7427.                  WriteLn(XPos('Hi! Hi!', 'Hi', 3));
  7428.  
  7429.  
  7430.             Sample Run
  7431.             Sample Run
  7432.             Sample Run
  7433.  
  7434.  
  7435.                  5
  7436.  
  7437.  
  7438.  
  7439.  
  7440.  
  7441.  
  7442.  
  7443.  
  7444.  
  7445.  
  7446.  
  7447.  
  7448.  
  7449.  
  7450.  
  7451.  
  7452.  
  7453.  
  7454.  
  7455.  
  7456.  
  7457.  
  7458.  
  7459.  
  7460.  
  7461.  
  7462.  
  7463.  
  7464.  
  7465.  
  7466.  
  7467.  
  7468.                               BBSkit Manual      Page 89