      
      $READ.ME (c)Copyright Sequiter Software Inc., 1990-1994.
      All rights reserved.

      ----------------------------------------------------------

	   CODEPASCAL 5.1 SUPPORT INFORMATION

      ----------------------------------------------------------


      I.    Introduction to CodePascal 5.1

      II.   Directories/Files included

      III.  Using CodePascal 5.1 with Borland Pascal 7.0

	    a)  Using the supplied DLLs
	    b)  WIN87EM.DLL
            c)  Opening more than 20 files
	    d)  Running programs

      IV.   Using the CodeBase 5.1 manuals with CodePascal 5.1

	    a)  Function Names            
	    b)  Function Parameters
	    c)  Function Returns
	    d)  CodeBase Structures
	    e)  User's Guide Examples
	    f)  Manual Differences

      V.    Functions/Structures supported
	   
      VI.   Additional Functions

	    a)  Structure functions
	    b)  Init/Free functions
	    c)  Additional functions

      VII.  Using CodeReporter

	    a)  Using CodeReporter
	    b)  Manual Revisions

      VIII. Examples

      IX.   Creating the CodePascal 5.1 DLLs
	    
      X.    The Sequiter Public Access Bulletin Board System (BBS)

      ----------------------------------------------------------
 
      I.   Introduction to CodePascal 5.1


      Before using this manual you should already have a working 
      knowledge of Borland Pascal 7.0.
	       
      The functions contained in the CodeBase 5.1 DLLs are fully
      documented in the manuals and can be called from a Borland Pascal 7.0
      application using the methods described in this file.  When using the
      CodeBase 5.1 manuals, keep in mind that the function names are slightly
      different and some of the functions have different parameters.  Some
      new functions not listed in the manual have also been added.  See the
      Quick Reference in the CodePascal manual for a complete list of
      CodePascal functions.
      
      CodePascal 5.1's compatibility allows you to directly create, access, 
      and change, the data, index,and memo files of FoxPro, dBASE IV,
      dBASE III+ and Clipper, all from within the Borland Pascal 7.0
      environment.  This gives your programs the power and sophistication of
      traditional database packages from within DOS (protected mode) or
      Windows. There are 12 DLLs that are provided with CodePascal 5.1.
      Section II lists the names of these DLLs.

      CodePascal 5.1 also has full multi-user capabilities.  When programs
      are run on a network, the network is automatically detected and used.  
      CodePascal 5.1 allows both explicit and automatic record locking and 
      file locking. It is also possible to bypass the locking mechanism 
      and read data locked by another user.

      Consult the CodeBase 5.1 manual for additional information on 
      database terms, concepts and methods.  

      CodePascal 5.1 has been tested with Borland Pascal 7.0.  The supplied
      files will allow you to access the DLLs in a DOS (protected mode) or
      Windows application.  The supported file formats include FoxPro 
      (CDX), dBASE IV (MDX), dBASE III+ (NDX) and Clipper (NTX).

     ----------------------------------------------------------

      II.  Directories/Files included

      The following files have been included with CodePascal 5.1.

	    $READ.ME        - CodePascal 5.1 support information
	    UNFOLD.EXE      - Unfold program
	    INSTALL.DOC     - Information on CodePascal 5.1 installation
			      Includes manual unfolding documentation
	    INSTALL.EXE     - Installation program

	    SUPPORT <dir>

	       CODEBASE.PAS - CodeBase unit definition
	       CODEBASE.INC - CodeBase unit include file
	       P4PASCAL.C   - 'C' source file to provide Pascal support
	       P4DOS.BAT    - Batch file to compile a DOS Protected Mode
			      example
	       P4WIN.BAT    - Batch file to compile a Windows example
               P4DLL.*      - Files to rebuild CodePascal 5.1 DLLs

	    DLLS_DOS <dir>

	       P4FOX.DLL    - FoxPro, DOS support
	       P4MDX.DLL    - dBASE IV, DOS support 
	       P4NDX.DLL    - dBASE III, DOS support
	       P4CLI.DLL    - Clipper, DOS support

	       P4FOXDEB.DLL - FoxPro, DOS, DEBUG support
	       P4MDXDEB.DLL - dBASE IV, DOS, DEBUG support
       
	    DLLS_WIN <dir>

	       P4FOX.DLL    - FoxPro, Windows support
	       P4MDX.DLL    - dBASE IV, Windows support 
	       P4NDX.DLL    - dBASE III, Windows support
	       P4CLI.DLL    - Clipper, Windows support

	       P4FOXDEB.DLL - FoxPro, Windows, DEBUG support
	       P4MDXDEB.DLL - dBASE IV, Windows, DEBUG support

	    TESTCODE <dir>

	       T4*.PAS      - CodePascal 5.1 test files

	    EXAMPLES <dir>

	       EXAMPLES.DOC - Information on usage of the CodePascal 5.1
			      example programs
	       CPDEMO*.PAS  - CodePascal 5.1 example files
 
	    USERS <dir>
	   
	       *.*          - User's Guide examples
			    - Data used by the User's Guide examples

	    CODEREP <dir>

               CODEREP.DOC  - Information on using CodeReporter 2.0 with
                              CodePascal 5.1
               CREP2.*      - CodeReporter files
               BWCC.DLL     - Borland Custom Control DLL
               LNCH_*.EXE   - DOS launch utilities
               LAUNCH_W.EXE - Windows launch utility
               DLLNAME.EXE  - DOS utility to change DLL name

	    PROTECT <dir>

	       WIN87EM.*    - Files for building a WIN87EM.DLL for use
	       FPDLL.*        under DOS Protected Mode (supplied by
               TESTFP.*       Borland)
               EXTEND.*     - Files for opening more than 20 files under
               SHRINK.*       DOS Protected Mode (supplied by Borland)

      ----------------------------------------------------------
 
      III.   Using CodePascal 5.1 with Borland Pascal 7.0


      Using the supplied DLLs
      -----------------------
      
      Access to the CodeBase functions in Borland Pascal 7.0 is achieved 
      through the use of one of the supplied Dynamic Link Libraries.
      The CodeBase 5.1 DLLs are used through the CODEBASE.PAS file.
      CODEBASE.PAS compiles to create a 'CodeBase' unit.  This unit
      can then be 'used' in your application.  CODEBASE.PAS looks for a
      P4DLL.DLL.  You may need to rename the DLL of your choice to
      P4DLL.DLL.  CODEBASE.PAS, contains a listing of all the function
      prototypes accessible by Borland Pascal 7.0 (refer to the supplied
      Quick Reference).

      CodePascal 5.1 includes various DLLs to support either DOS or Windows
      in any of the supported index file formats.

      The functions that can be accessed in the CodePascal 5.1 DLL are
      the same functions that are documented in the CodeBase 5.1 manual.

      It is recommended that you copy the DLL to your Windows 
      sub-directory. 

      The best way to learn how to use CodePascal 5.1 with Borland  
      Pascal 7.0 is through the use of the supplied examples.  See
      Section VIII below.

      To indicate which index file format to use, set the proper define
      in CODEBASE.INC (see CodePascal manual, page 4).


      WIN87EM.DLL
      -----------

      This DLL is used to emulate portions of the Windows version of
      WIN87EM.DLL in Protected Mode.  For more information, see WIN87EM.DOC.


      Opening more than 20 files
      --------------------------

      To open more than 20 files in DOS Protected Mode, you must include the
      EXTEND unit in the USES statement of your code (eg. CPDEMO11.PAS).
      Both EXTEND.PAS and SHRINK.PAS need to be compiled.  For more
      information, see EXTEND.DOC.
      

      Running programs
      ----------------

      Compiling/running programs with CodePascal 5.1 is very easy.  The
      process consists of compiling the 'CodeBase' unit (CODEBASE.TPP for
      Protected Mode, CODEBASE.TPW for Windows), and compiling the specific
      program.  C4DOS.BAT (Protected Mode) and C4WIN.BAT (Windows) can be
      used from the command line.

      ----------------------------------------------------------
 
      IV.    Using the CodeBase 5.1 manuals with CodePascal 5.1


      Function Names
      --------------

      The naming convention for CodePascal 5.1 has changed slightly compared
      to what appears in the CodeBase 5.1 manuals.  See the Quick Reference
      in the CodePascal manual for the actual name changes.


      Function Parameters
      -------------------

      One of the major differences in using CodePascal 5.1 is the
      nature of the parameters passed to the various functions.  In
      the manual, many functions have parameters that are pointers to
      various CodeBase 5.1 defined data types, such as CODE4 and DATA4.
      For example:

      C Version

	   CODE4 cb ;          // Structure to hold initial settings
	   DATA4 *db ;         // Pointer to Data file structure
	   FIELD4 *fld ;       // Pointer to Field structure

	   d4init( &cb) ;                  // Initialize CodeBase
	   db  = d4open( &cb, "TEST" ) ;   // Open file
	   fld = d4field( db, "NAME" ) ;   // Get pointer to field info
			 

      CodePascal 5.1 Version

	   CODE4 cb ;          { Structure to hold initial settings }
	   DATA4 db ;          { Pointer to Data file structure }
	   FIELD4 fld ;        { Pointer to Field structure }

	   cb  := d4init ;                 { Initialize CodeBase }
	   db  := d4open( cb, 'TEST' ) ;   { Open file }
	   fld := d4field( db, 'NAME' ) ;  { Get field pointer }


      One other important item to note is the d4init() function.
      In CodePascal 5.1, this function has no parameter - unlike in
      CodeBase 5.1, where the address of the CODE4 structure is required.
      The d4init() function is very important as it initializes CodeBase
      for further use.  This function should always be called first.


      Function Returns
      ----------------

      The return of many 'C' functions is '0'.  This could represent
      either an integer type return, or a null pointer return.  In 
      CodePascal 5.1, functions which return pointers return 'nil' 
      instead of returning '0'.


      CodeBase Structures
      -------------------

      As was mentioned in the previous section, the first CodeBase 
      function called should be d4init().  It is critical that 
      d4init() is called to initialize the CODE4 structure. 

      As explained in the manual, the CODE4 structure contains
      settings and variables that determine how CodeBase behaves
      in many situations. Because you cannot access this structure
      directly from CodePascal 5.1, functions have been added that
      return and/or set the value of the CODE4 structure. These
      functions start with code4.  See Section VI below.

      Access to the CODE4 and other structures is allowed through the use
      of various structure functions.  See Section VI below.

      Example:

	   PCODE4 cb ;
	   PDATA4 db ;

	   cb := d4init ;

	   { Modify some flags and settings }
	   rc := code4autoOpen( cb, False ) ;
	   rc := code4memSizeBlock( cb, $H800 ) ;         { 2048 }
	   rc := code4memSizeBuffer( cb, $H2000 ) ;       { 8192 }

	   { r4unique is defined in CODEBASE.PAS }
	   rc := code4defaultUniqueError( cb, r4unique ) ;

	   { Open file with new settings }
	   db := d4open( cb, 'FILE.DBF' ) ;
	   .
	   .
	   .


      User's Guide Examples
      ---------------------

      The examples from the User's Guide have been converted to CodePascal
      5.1 code.  They can be found in the USERS directory.


      Manual Differences
      ------------------

      Some differences exist between what the CodeBase 5.1 manuals say and
      what you should do in CodePascal 5.1.  Some functions have had their
      parameters changed (eg. d4init(), file4create(), ...).  See Section VI.

      a)  CodeBase Reference Guide, page 193

	  Don't need to initialize LIST4 contents using the memset()
	  function.  This is done in the list4init() function

      b)  CodeBase Reference Guide, page 194

	  When creating the 'node' structure, use 2 PVoid members instead
	  of the LINK4 member.  Eg :

	     AGES = Record
		link1 : PVoid ;
		link2 : PVoid ;
		age   : integer ;
	     end ;

      b)  CodeBase Reference Guide, page 238

	  sort4free() MUST be called.

      Although the supplied CodeBase manuals are accurate for most of 
      the functionality supplied for use with CodePascal 5.1, there 
      are some syntactical changes that must be made when calling 
      the CodeBase functions from Borland Pascal 7.0. See the CodePascal
      Quick Reference for the exact syntax of all CodePascal functions.

      ----------------------------------------------------------
 
      V.   Functions/Structures supported


      The supported functions include all the functions in the 
      CodeBase 5.1 manual.  Direct access to the CodeBase 5.1 structures
      is not supported.  See Section VI.

      The following functions are NOT supported :

      a)  CodeBase Reference Guide, page 204, mem4reset()
      
	  CodePascal exists as a DLL for use in both Protected Mode and in
	  Windows.  mem4reset() should NEVER be used with a DLL.

      b)  CodeBase Reference Guide, page 316, e4hook()
	  CodeBase Reference Guide, page 163, file4lock_hook()

	  Both of these functions are supported if you have the source code
	  for CodeBase 5.1.  Changes could then be made as indicated in the
	  CodeBase manual.  The DLL would then need to be rebuilt.
	  See Section IX for details.
	  
      Borland Pascal 7.0 does not have a (void *) type.  The type PVoid
      was created.  PVoid is defined as a pointer to a char (PChar).

      ----------------------------------------------------------
 
      VI.  Additional CodePascal 5.1 specific functions


      Structure functions
      -------------------

      Functions were added to CodePascal 5.1 to allow access to
      particular members or settings within CodeBase 5.1.  For a complete
      description, see the Quick Reference in the CodePascal manual.


      Init/Free functions
      -------------------

      Many functions were added to enable the user to declare a variable of
      a particular structure.  You cannot directly declare a variable of
      type, eg. CODE4, but you can use d4init to allocate the appropriate
      memory for its usage.  This however makes it necessary to call the
      appropriate 'free' call to release the allocated memory.  Below are
      functions which initialize/free the appropriate structure memory :

      a)  d4init() and d4initUndo()                               (modified)

      b)  file4seqWriteInit() and file4seqWriteFree()             (added)

      c)  file4seqReadInit() and file4seqReadFree()               (added)

      d)  list4init() and list4free()                             (added)

      e)  file4create(), file4open(), file4temp(), file4replace() (modified)
	  file4close()                                            (modified)

      f)  sort4init() and sort4free()                             (modified)


      Additional functions
      --------------------

      ----------------------------------------------------------

      VII. Using CodeReporter


      Using CodeReporter
      ------------------

      CodeReporter support is managed through the generated report files
      and the CodeReporter functions.  The generated code which CodeReporter
      can generate will NOT be in CodePascal 5.1 code.  It will exist as
      CodeBase 5.1 code.

      Before running any of the launch utilities (Protected Mode or
      Windows), be sure to rename the appropriate DLL to P4DLL.DLL.  See
      the CODEREP.DOC file for more information.


      Manual Revisions
      ----------------

      ----------------------------------------------------------

      VIII.   Examples


      The purpose of the examples is to introduce you to some of the
      most commonly used CodePascal 5.1 functions and how they are
      employed from within Borland Pascal 7.0.  
      
      Running Examples :

      a)   Move the DLL to either your current directory or your WINDOWS
	   directory and rename it to P4DLL.DLL.

      b)   Build the CodeBase unit by compiling CODEBASE.PAS. The CodeBase
	   unit will be called CODEBASE.TPP (Protected Mode) or CODEBASE.TPW
	   (Windows).

      c)   Include the CodeBase unit in the program as well as
	   CODEBASE.INC (see examples).

      d)   Compile and run program.

      To simplify this process, P4DOS.BAT and P4WIN.BAT have been included.
	
      (See the CodePascal manual pages 3-5 for more detailed instructions.)

      ----------------------------------------------------------
 
      IX.    Creating the CodePascal 5.1 DLLs


      The CodePascal 5.1 DLLs can be rebuilt using CodeBase 5.1 and the
      supplied batch files.  Use the P4DLL.BAT, P4DLL.DEF and P4DLL.DEF
      files to rebuild the CodePascal DLLs.

      ----------------------------------------------------------
 
      X.   The Sequiter Public Access Bulletin Board System (BBS)


      Any user with a modem may connect with the Sequiter
      Bulletin Board System.  Connection to the BBS is free, 
      although all users are responsible for their own long-
      distance toll charges.  The BBS operates twenty-four hours
      a day, seven days-a-week, excluding maintenance periods.  
      The BBS operates under the DOS environment, running
      WildCat(c) communications software.

      The BBS contains several CodeBasic-related files and
      documents that may be downloaded.  There is also a message
      system so that electronic correspondence may be left for
      Sequiter staff, or other BBS users.  The files include example
      programs, utilities, add-ons and enhancements, written by
      both Sequiter developers and CodeBasic users.  Users are
      invited to upload interesting CodeBasic-related files for the
      use of all BBS users.

      The phone number for the BBS is found on the back outside
      cover of the CodeBasic manual.  The phone number is currently
      (403)-437-2229. An additional line has been added that supports
      up to 9600 baud modems. The current number for this line is
      (403) 437-2301

      Settings for the connection are:

	   1200, 2400 or 9600 baud
	   ANSI terminal type.
	   No parity.
	   8 bits.
	   1 stop bit.

      Upon connection to the Sequiter BBS, a new user will be
      prompted for some information and the selection of a private
      password.  After selection of your password, please memorize
      it since you will be asked for that password on future
      connections to the BBS.

      Sequiter Software is a registered member of the 'Data Based
      Advisor Forum' on CompuServe.  Through this forum, messages can
      be sent to Sequiter Technical Support.  Also, support and 
      demonstration files can be downloaded from the DBA library area.  
      To access the DBA forum, type 'GO DBA' at any CompuServe exclamation
      (!) prompt.

      Messages can be directed to Sequiter using the following CIS ID
      number:

	   71321,1306

      This account is monitored for messages a minimum of three times
      a week.


      The following are detailed instructions as to how our customers
      can access Sequiter through the DBA Forum on Compuserv (CIS).
      
      1 - Once user is logged on to CIS, he or she can get to the DBA Forum
	  from any "!" prompt by entering the command "GO DBA".
      
      2 - This will bring the user into the DBA top menu, at which time the
	  user selects menu item " 1 Data Based Advisor Forum ".
      
      3 - The next screen is the Welcome Screen, at which the user
	  presses the <ENTER>, which then takes the user into the "Forum
	  Menu".
      
      4 - If menu item " 3 LIBRARIES (Files) " is selected, the next
	  menu to come up is one which lists all 17 library areas.  All
	  Sequiter files will be located in area " 6 Libs, Addons, Tools".
      
      5 - After selecting this area, the user can then browse through
	  this area, searching by a key word which identifies our
	  packages (i.e. SEQUITER, CODEBASE, CODEBASIC, etc.), or if the
	  user knows the name of the file he or she wants to download, he
	  or she can simply select download.

      ---------------------------- END -----------------------------------

