home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TPFL_092.ZIP / TPFL.DOC < prev    next >
Encoding:
Text File  |  1990-03-26  |  11.1 KB  |  284 lines

  1.  
  2.  
  3.                        TURBO PASCAL FAST LIBRARY
  4.                        -------------------------
  5.  
  6.  
  7.   TURBO PASCAL Fast Library(TPFL) is (c) Copyright 1990 by L. B. Neal.
  8.   All rights reserved.
  9.  
  10.   TPFL is distributed as "shareware".  This means you may try it out before
  11.   you need to pay for it.  If you find the items presented in this package
  12.   to be useful and of value you in time saving or money savings you MUST
  13.   pay the registration fee of $5.00 or nolonger use the package.  In any
  14.   case you may NOT use the FUNCTIONS or PROCEDURES presented in this package
  15.   in a program without paying the registration fee.
  16.  
  17.   IF you send $7.00, I will mail you a disk with the next significant upgrade
  18.   of the package.
  19.  
  20.                             LEGAL NOTICE
  21.                             ------------
  22.  
  23.   TPFL is presented "as is" without any form of warranty!  I will NOT and
  24.   cannot assume any responsibilty for the performance or non-performance of
  25.   any portion of this package.
  26.  
  27.  
  28.  
  29.   Registered users may freely use the FUNCTIONS or PROCEDURES included for
  30.   private or commercial programs.
  31.  
  32.   The registration fee is onetime only!  However, if you need direct upgrades
  33.   I must ask for a nominal $2.00 to cover media, handling and mailing costs.
  34.   Updated versions will be made available to the BBS distribution system.
  35.  
  36.   Software "vendors" and "distributors" may offer this package as long as it
  37.   costs no more than $5.00 and the package is totally intact.
  38.  
  39.   USERS NOTE: If you purchased TPFL from anyone but L. B. Neal you have NOT
  40.               registered the product!  You have paid a fee to another party
  41.               for media, handling and/or mailing costs.
  42.  
  43.  
  44.   PACKAGE DESCRIPTION
  45.   -------------------
  46.  
  47.   TPFL consists of the following  files:
  48.  
  49.      TPFL.DOC          This documentation file.
  50.  
  51.      TPFL5.TPU         Turbo Pascal 5.0 TPU non-overlay.
  52.  
  53.      TPFL5_O.TPU       Turbo Pascal 5.0 TPU for-overlay.
  54.  
  55.      TPFL55.TPU        Turbo Pascal 5.5 TPU non-overlay.
  56.  
  57.      TPFL55_O.TPU      Turbo Pascal 5.5 TPU for-overlay.
  58.  
  59.      TPFLDEMO.PAS      A small demo of the package contents.
  60.  
  61.      TPFLDEMO.EXE      Compiled demo using TP 5.0.
  62.  
  63.      TPFLDEM2.PAS      Second Demo of other features.
  64.  
  65.      TPFLDEM2.EXE      Compiled Demo2 using TP 5.0.
  66.      
  67.  
  68.   PACKAGE CONTENTS
  69.   ----------------
  70.  
  71.   The FUNCTIONS and PROCEDURES in the TPU's are described below:
  72.  
  73.  TYPE Strg = String[255];
  74.       Wstr = String[255];
  75.  
  76.  VAR Delay_Calc: Real;
  77.      { Used by SDelay. This value MUST be provided by the following }
  78.      { method: Delay_Calc := CpuSpeed/4.77. CpuSpeed being an       }
  79.      { Integer or Real representing the approximate CPU speed of    }
  80.      { the machine the program is running on.                       }
  81.  
  82.  
  83.  
  84.  FUNCTION StrCopy(cs: Strg; strt, scnt: Integer): Strg;
  85.  { This replaces the Copy( from TP. It should be called exactly as }
  86.  { you would call the normal Copy Function.  This version is much  }
  87.  { faster in action.                                               }
  88.  
  89.  FUNCTION StrAdd(astrg,bstrg: Strg): Strg;
  90.  { This replaces ConCat and adding strings via '+' sign which      }
  91.  { really calls ConCat. This Function is much faster than using the}
  92.  { provided concat function. It will add bstring to the end of     }
  93.  { astring and return the result.                                  }
  94.  
  95.  FUNCTION IntegerToStr(i_in:Integer):Strg;
  96.  { Returns a string representing the value of the Integer i_in. }
  97.  
  98.  FUNCTION WordToStr(w_in:Word):Strg;
  99.  { Returns a string representing the value of the Word w_in.    } 
  100.  
  101.  FUNCTION LongIntToStr(l_in:LongInt):Strg;
  102.  { Returns a string representing the value of the LongInt l_in.  } 
  103.  
  104.  FUNCTION RealToStr(r_in:Real; Num_Base:Integer):Strg;
  105.  { Returns a string representing the value of r_in in the number }
  106.  { base called by Num_Base: ie 10 for Decimal, 16 for Hex        }
  107.  
  108.  PROCEDURE SDELAY(Ms : Word);
  109.  { Provides a relativly stable Delay equal to the Delay          }
  110.  { Function. The Delay provided will pretty close to the value   }
  111.  { provided in Ms.  If this Procedure is called in a loop        }
  112.  { situation the call overhead will make the effective delay     }
  113.  { longer than expected especially when Ms has small values that }
  114.  { in the 1 to 10 range.                                         }
  115.  
  116.  PROCEDURE WrtStr(strin: Wstr; Wmode,ChkSnow: Boolean);
  117.  { Writes from 1 to 255 characters. DirectVideo is set to match   }
  118.  { Wmode. CheckSnow is set to match ChkSnow.  The starting values }
  119.  { are reset at the end of the procedure. NOTE: Slower than normal}
  120.  { Write, if DirectVideo, but allows local control of Video.      }
  121.  { AS of 0.92 uses WriteTTY for False mode!                       }
  122.  
  123.  PROCEDURE WrtLnStr(strin: Wstr; Wmode,ChkSnow: Boolean);
  124.  { Writes from 1 to 255 characters. DirectVideo is set to match   }
  125.  { Wmode. CheckSnow is set to match ChkSnow.  The starting values }
  126.  { are reset at the end of the procedure.  A Cr/Lf sequence is    }
  127.  { at the end of strin.  NOTE: Slower than normal WriteLn, if     }
  128.  { DirectVideo, but allows local control of Video.                }
  129.  { AS of 0.92 uses WriteTTY for False mode!                       }
  130.  
  131.  FUNCTION TimeStr(showsec:Boolean):Strg;
  132.  { Returns a string representing the time in this format:      }
  133.  { HR:MN:SC ie 18:03:55, if showsec is false then only HR:MN   } 
  134.  { is returned ie 18:03.                                       }
  135.  
  136.  FUNCTION TimeCnt:Longint;
  137.  { Returns a value which is the number of seconds in the day that } 
  138.  { have passed being from 0 to 86,400.                            }
  139.  
  140.  FUNCTION Today:Strg;
  141.  { Returns the date in this format: "03/15/90"  }
  142.  
  143.  FUNCTION GetDate(ShowTime:Boolean):Strg;
  144.  { Returns the date formated with the time if ShowTime = True as:  }
  145.  { "18:03 Mon May 15,1990" or if ShowTime = False then it returns  }
  146.  { the date as: "Mon May 15,1990".                                 }
  147.  
  148.  FUNCTION TodayNumCnt(dt:strg):integer;
  149.  { Returns the integer number of what day this is.   }
  150.  
  151.  
  152.  { 0.91+}
  153.  FUNCTION IsInChar(IsInTest1,IsInTest2:Char; IsInFeed:Char): Boolean;
  154.  { Returns True if IsInFeed is between IsIntest1 & IsIntest2  }
  155.  
  156.  FUNCTION IsInStrg(TestChar:Char; ChkStrg: Strg): Boolean;
  157.  { Returns True if Char is in ChkStrg }
  158.  
  159.  FUNCTION WhrStrg(TstChar:Char; TstStrg: Strg): Integer;
  160.  { Returns Integer indicating the position of TstChar in ChkStrg }
  161.  { Faster replacement for POS( function.                         }
  162.  
  163. { 0.92+ }
  164.  { ---------------------------------------------------------------- }
  165.  { NOTE: The next Five PROCEDURES are meant to replace the BIOS    }
  166.  {       ScreenWrites of TP. TP writes all BIOS chars one-at-a-time }
  167.  {       which adds immense overhead.  IF your program must use     }
  168.  {       BIOS screen writes this set will give considerable speed   }
  169.  {       increase!  These routines are for ASCII Characters ONLY!   }
  170.  
  171.  PROCEDURE Windo(StartX,StartY,EndX,EndY: Byte);
  172.  { Lets TPFL know of Window in use and then tells TP! }
  173.  
  174.  PROCEDURE WriteTTY(strgin: Strg);
  175.  { Writes a string to the screen via BIOS w/curr attribute   }
  176.  { Moves cursor to next position. Sometimes called Write TTY }
  177.  { NOTE: Knows about windows!                                }
  178.  
  179.  PROCEDURE WriteLnTTY(strgin: Strg);
  180.  { Writes a string to the screen via BIOS w/curr attribute   }
  181.  { Moves cursor to next position. Sometimes called Write TTY }
  182.  { NOTE: Knows about windows!                                }
  183.  
  184.  PROCEDURE WinWrite(strgin: Strg; attr:Byte);
  185.  { BIOS screen write that knows of screen windows. ASCII char ONLY! }
  186.  { Windo MUST be used to define all Windows!                        }
  187.  
  188.  PROCEDURE WinWriteLn(strin: Strg; attr: Byte);
  189.  { BIOS string screen write that knows of screen windows }
  190.  { For ASCII strings ONLY!                               }
  191.  { Windo MUST be used to define all Windows!             }
  192.  { ---------------------------------------------------------------- }
  193.  
  194.  
  195.  PACKAGE USE/ADVANTAGES
  196.  ----------------------
  197.  
  198.   The FUNCTIONS and PROCEDURES are intended to provide you the user
  199.   the ability to make your programs run faster and/or eliminate the
  200.   need to write specialty routines with the resulting cost in time
  201.   and perhaps money.
  202.  
  203.   Several of the items provide sustitutions for standard FUNCTIONS or
  204.   PROCEDURES that will run much faster.
  205.  
  206.   Other items are intended to supplement the normally provided items
  207.   in the libraries.
  208.  
  209.   Since I have provided TPFL in UNITS, unused code will NOT be pulled
  210.   into your final .EXE of the program compiled.
  211.  
  212.  PACKAGE DISADVANTAGES
  213.  ---------------------  
  214.  
  215.   I'm sure you will note that the source code becomes a bit larger using
  216.   the routines in TPFL.  However, you will find the resulting programs
  217.   will generally run significantly faster than using the built-in features.
  218.  
  219.   This NOT a problem with TP!  A generalized feature MUST contain overhead
  220.   because to provides many features which may or may not be used in your
  221.   particular application.  Where TPFL is inadequate by all means use the
  222.   fine routines provided with the compiler.  If a TPFL feature indicates
  223.   it will support your application please give it a try.  If the feature
  224.   does not perform as described please bring it to my attention ASAP!
  225.   
  226.  
  227.  THE FUTURE
  228.  ----------
  229.   TPFL will continue to evolve and improve based on:
  230.  
  231.    1. Registrations.
  232.  
  233.    2. User feedback.
  234.  
  235.   I will gladly address adding new FUNCTIONS or PROCEDURES when suggested.
  236.  
  237.  HOW TO REGISTER
  238.  ---------------
  239.  
  240.   Send me a Check or Money Order made out to L. B. Neal.  As of this
  241.   version my mailing address is:
  242.  
  243.    L. B Neal
  244.    370 Altair Way #103
  245.    Sunnyvale, CA 94086
  246.  
  247.   Please feel free to inclose any comments or suggestions about improving
  248.   TPFL.
  249.  
  250.   
  251.  EDITORIAL
  252.  ---------
  253.  
  254.   This package and all of the other thousands of fine programs and
  255.   support items would not be possible except for the efforts of BORLAND
  256.   INTERNATIONAL who took a crippled learning language called "PASCAL"
  257.   and created a powerful developement language which I feel is still
  258.   superior to "C", even TURBO C!
  259.  
  260.   All of the flap about "C" has made some folks think TURBO PASCAL is 
  261.   nolonger a powerful versatile language.  This is an error!
  262.  
  263.   The changes in 5.0 and 5.5 have brought TP much power similiar to
  264.   MODULA-2 that is in no way available with any "C" compiler that I'm
  265.   familiar with and I own at least 6 of them.
  266.  
  267.   TP may NOT be "portable" but it is aimed at getting the most out of
  268.   the machine it was written for NOT a pretty fair or mediocre performance
  269.   on any ol' computer you point it at.
  270.  
  271.  
  272.  FINAL COMMENTS
  273.  --------------
  274.   I hope you find these first versions of TPFL to be useful.  Future versions
  275.   will attempt to supplement the features of TP to provide an opportunity
  276.   for improved program performance and versatility.
  277.  
  278.   Several packages offer outstanding improvements in screen handling and
  279.   other aspects of programs not covered in TPFL.  I see no reason to try
  280.   to duplicate their fine offerings.  I will try to fill another void in
  281.   the chain.  Please investigate and support those authors if their
  282.   product is of value.
  283.  
  284.