home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / ttt1.zip / MANUAL.DOC next >
Text File  |  1989-02-05  |  167KB  |  5,692 lines

  1. TECHNOJOCK'S TURBO TOOLKIT v5.0
  2.  
  3.  
  4.  
  5. Copyright 1986, 1989 TechnoJock Software, Inc.
  6. All Rights Reserved
  7. Restricted by License
  8.  
  9.  
  10.  
  11.  
  12. The software described in this manual is protected by copyright laws. 
  13. Information in this manual is subject to change without notice and does not
  14. represent any commitment on the part of TechnoJock Software, Inc.
  15.  
  16. Thank-you for reviewing TechnoJock's Turbo Toolkit v5.0. This file is an 
  17. abridged version of the user guide, but does contain approximately 100
  18. pages of information about the Toolkit, including a comprehensive procedure
  19. reference in alphabetic order. The on-disk version of the manual excludes
  20. the illustrations and formatting niceties that are included in the printed
  21. manual.
  22.  
  23. If you register the Toolkit, you will receive a 300 page typeset manual,
  24. including a pull-out quick reference. Refer to the file Register.Doc for
  25. registration information.
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. CHAPTER 1 - TOOLKIT BASICS
  34. ==========================
  35.  
  36. What is the Toolkit?
  37.  
  38.   TechnoJock's Turbo Toolkit software is a collection of procedures and
  39.   functions for Turbo Pascal programmers. The Toolkit will reduce the time
  40.   taken to write applications and is designed for novice and expert
  41.   programmer alike.
  42.  
  43.   The real purpose of the Toolkit is to provide easy-to-implement procedures
  44.   that free the programmer from the more tedious and repetitive programming
  45.   chores, such as windows, menus, user input, string formatting, directory
  46.   listing etc. The programmer (or software engineer if you are from
  47.   California!) can concentrate on the main purpose of the program. The full
  48.   value of the Toolkit is not limited to saving the programmer time. The
  49.   final program will have a consistent easy-to-use interface that will impart
  50.   a professional quality to the program.
  51.  
  52.   The Toolkit is designed specifically to operate with Turbo Pascal v5.0 and
  53.   v4.0 from Borland International. The full source code for all of the
  54.   Toolkit is included so that the code may be reviewed and modified.
  55.  
  56.   The quickest way of gaining an appreciation of the capabilities of the
  57.   Toolkit is to execute the program DemoTTT.exe. This program demonstrates
  58.   most of the procedures and functions available. The demo itself was, of
  59.   course, written with the Toolkit. If you haven't run it yet, run it now!
  60.  
  61.  
  62.  
  63. How To Use The Toolkit
  64.  
  65.   The manual assumes that the reader has a basic knowledge of Borland's Turbo
  66.   Pascal and understands the concepts of units. If you are new to Turbo
  67.   Pascal, read the Chapter "Units and Related Mysteries" in the compiler's
  68.   user's guide (page 65 v5.0, page 61 v4.0).
  69.  
  70.   It is not necessary to understand the internal workings of any of the
  71.   Toolkit units in order to use them - all you need to know is how to call
  72.   the procedures and functions.
  73.  
  74.  
  75. Example 1
  76.  
  77.   The technique is best illustrated with an example. In the unit FastTTT5
  78.   there is a procedure for drawing boxes called BOX. A somewhat primitive
  79.   program to draw a box on the screen would be as follows:
  80.  
  81.   PROGRAM TOOLKIT_DEMO;
  82.   USES FASTTTT5;
  83.   
  84.   BEGIN
  85.       BOX(1,1,80,25,15,4,1);
  86.  
  87.   END.
  88.   
  89.   All you need to know is the unit that contains the procedure Box and the
  90.   syntax of the Box procedure. (If you must, take a peek at page 16-14 to see
  91.   the detailed documentation for the BOX procedure!) That's all there is to
  92.   it - no need to worry about drawing horizontal and vertical lines, or what
  93.   the ASCII codes are for the box corners etc.
  94.  
  95.  
  96. Example 2
  97.  
  98.   The above example is useful to illustrate the most basic concept of the
  99.   toolkit but how often will you write five line programs?!! More typically,
  100.   you will want to use procedures and functions from a variety of the Toolkit
  101.   units. All you need to do is "use" all the units that contain the relevant
  102.   procedures. For example, let's say we want to expand the above program to
  103.   draw a filled box and write the date in a neat (!) format at the top of the
  104.   screen:
  105.  
  106.   
  107.  
  108.   PROGRAM IMPROVED_TOOLKIT_DEMO;
  109.   USES FASTTTT5, MISCTTT5;
  110.   
  111.   BEGIN
  112.       FBOX(1,1,80,25,15,4,1);
  113.       WRITECENTER(2,14,4,DATE);
  114.   END.
  115.   
  116.   The FBox and WriteCenter procedures are in the FastTTT5 unit and the Date
  117.   function is in the MiscTTT5 unit.
  118.  
  119.  
  120.  
  121. Required Software & HARDWARE
  122.  
  123.   The Toolkit is designed to work with v5.0 or v4.0 of Borland
  124.   International's Turbo Pascal compiler for the IBM PC. To compile programs
  125.   developed using the Toolkit, you will need Turbo Pascal (version 4.0 or
  126.   greater), as well as MS-DOS or PC-DOS (version 2.0 or greater).
  127.  
  128.   Programs developed with the Toolkit will function on the same hardware as
  129.   specified in the Turbo Pascal compiler documentation, i.e. IBM PC, XT, AT,
  130.   PS/2 and true compatibles. Any of the standard display adapters are
  131.   supported, including the monochrome, CGA, EGA and VGA. The Toolkit
  132.   automatically supports a Microsoft (or true compatible) mouse. If the
  133.   system does not have a mouse, no problem, the mouse features are ignored.
  134.   In other words, if you develop a program using the Toolkit, it can be run
  135.   on machines with or without a mouse.
  136.  
  137.  
  138.  
  139. ROYALTIES
  140.  
  141.   Many Toolkit users develop commercial programs specifically to sell for
  142.  
  143.   profit. TechnoJock Software Inc. neither expects nor requires a royalty fee
  144.   on such programs. The major restriction is that you may not develop a
  145.   program that is itself a toolkit, i.e. a library of programmer's utilities.
  146.  
  147.   The Toolkit TPU's and source code may not be sold or distributed as part of
  148.   another program.
  149.  
  150.   Refer to the License Agreement at the front of the manual for more
  151.   information.
  152.  
  153.  
  154.  
  155. SUPPORT
  156.  
  157.   TechnoJock Software Inc. strives to support its users. If you have a
  158.   problem that you are unable to resolve:
  159.  
  160.   -    send a diskette containing the problematic software, together with
  161.        details of the problem and instructions on how to generate the problem
  162.        to:
  163.  
  164.             TechnoJock Software Inc.
  165.             PO Box 820927
  166.             Houston
  167.             TX 77282-0927
  168.  
  169.   -    leave an electronic message on Compuserve by typing GO EMAIL at a
  170.        CompuServe menu prompt. The userid for TechnoJock Software Inc. is
  171.        74017,227.
  172.  
  173.   -    call TechnoJock Software at (713) 493-6354.
  174.  
  175.   Identify the following: the version of the Toolkit, the DOS version, the
  176.   contents of the CONFIG.SYS file, the contents of the AUTOEXEC.BAT file, and
  177.   the type of hardware that the software is executed on.
  178.  
  179.  
  180.  
  181. ACKNOWLEDGEMENTS
  182.  
  183. In this manual, references are made to several products:
  184. Turbo Pascal, Sidekick and Sprint are registered trademarks of Borland
  185. International.
  186. IBM is a registered trademark and PC, XT, AT, PS/2 and PC-DOS are trademarks of
  187. International Business Machines Corporation.
  188. MS-DOS and Microsoft Word are trademarks of Microsoft Corporation.
  189. Pagemaker is a registered trademark of Aldus Corporation.
  190. rporation.
  191. CompuServe is a registered trademark of CompuServe Information Service, Inc.
  192. Pizazz +Plus is a trademark of Application Techniques, Inc.
  193.  
  194.  
  195.  
  196.  
  197. This User Manual was prepared using Microsoft Word, Aldus Pagemaker and Pizazz
  198. +Plus.
  199.  
  200.      
  201.  
  202.  
  203.  
  204.  
  205. CHAPTER 2 - GETTING STARTED
  206. ===========================
  207.  
  208. INTRODUCTION
  209.  
  210.   This chapter includes instructions on how to install the disks, together
  211.   with a description of the Toolkit design concepts and how to get the most
  212.   out of the User Manual.
  213.  
  214.   Make sure you read the diskette READ.ME file. It will contain any last
  215.   minute information that was not included in this User Manual.
  216.  
  217.  
  218.  
  219. WHAT'S ON THE DISKS
  220.  
  221.   The Toolkit is shipped in one of three formats: two 360k diskettes, a
  222.   single 1.2 Mb diskette or a single 3.5 inch diskette. The manual assumes
  223.   that the user is working with the two 360k diskettes option.
  224.  
  225.   Source Disk
  226.  
  227.   Diskette 1 is the SOURCE diskette and includes the following files:
  228.  
  229.   FastTTT5.pas             the pascal source for the FastTTT5 unit
  230.   FastTTT5.obj             the assembler object file for the FastTTT5 unit
  231.   WinTTT5.pas              the pascal source for the WinTTT5 unit
  232.   WinTTT5.obj              the assembler object file for the WinTTT5 unit
  233.   KeyTTT5.pas              the pascal source for the KeyTTT5 unit
  234.   MenuTTT5.pas             the pascal source for the MenuTTT5 unit
  235.   PullTTT5.pas             the pascal source for the PullTTT5 unit
  236.   NestTTT5.pas             the pascal source for the NestTTT5 unit
  237.   ListTTT5.pas             the pascal source for the ListTTT5 unit
  238.   DirTTT5.pas              the pascal source for the DirTTT5 unit
  239.   ReadTTT5.pas             the pascal source for the ReadTTT5 unit
  240.   IOTTT5.pas               the pascal source for the IOTTT5 unit
  241.   StrnTTT5.pas             the pascal source for the StrnTTT5 unit
  242.   MiscTTT5.pas             the pascal source for the MiscTTT5 unit
  243.   Register.doc             an ASCII order form for the Toolkit
  244.   Read.Me                  latest information about the Toolkit.
  245.   TTT.Mak                  a make file for all the units in the Toolkit.
  246.   
  247.   
  248.   Demo Disk
  249.  
  250.   Diskette 2 is the DEMO disk, although it does also contain the assembler
  251.   source for the OBJ files on diskette 1 and the on-disk manual. The DEMO
  252.   disk includes the following files:
  253.  
  254.   FastTTT5.asm   assembler source for the FastTTT5.obj file
  255.   WinTTT5.asm    assembler source for the WinTTT5.obj file
  256.   Demo5.ARC      demonstration files for Turbo 5.0 Users
  257.   Demo4.ARC      demonstration files for Turbo 4.0 Users
  258.  
  259.   Manual.ARC     an abridged version of this manual to help others evaluate
  260.                  the Toolkit.
  261.   ArcX.COM       a utility file to de-archive the ARC files
  262.   Register.doc   an ASCII order form for the Toolkit
  263.   Upgrade.doc    special information for users of earlier versions of the
  264.   Toolkit
  265.   BuildTTT.pas   a program to build the TPU files
  266.  
  267.  
  268.   The files with an extension of ARC are archived files which contain files
  269.   in a compressed format.
  270.  
  271.  
  272.  
  273. INSTALLATION
  274.  
  275.   The first thing to do is create a subdirectory called TTT (or whatever you
  276.   choose) below the compiler directory. Assuming your compiler is in a
  277.   directory called TURBO, the commands would be:
  278.  
  279.        C:
  280.        MD\TURBO\TTT
  281.        CD\TURBO\TTT
  282.  
  283.   Now place each of the disks into drive A and type the following command:
  284.  
  285.        COPY A:*.* C:\TURBO\TTT
  286.  
  287.   Put the master diskettes away in a safe place.
  288.  
  289.   There are two sets of demonstration files; one for Turbo 5 users, and one
  290.   for Turbo 4 users. The sets are very similar and differ only in minor ways.
  291.   The next task is to extract the source code from the relevant ARC file,
  292.   i.e. DEMO5.ARC or DEMO4.ARC, by using the ARCX.COM program that is included
  293.   on the disk, e.g.
  294.  
  295.        ARCX TURBO4
  296.   or
  297.        ARCX TURBO5
  298.  
  299.   The Manual.Arc file contains an abridged version of this User Manual and is
  300.   included on the diskette so that non-registered users can evaluate the
  301.   Toolkit. You will not need to keep the manual file on the hard disk since
  302.   you already have this wonderful masterpiece! Therefore, all the arc files
  303.   can be deleted from the fixed disk, e.g.
  304.  
  305.        DEL *.ARC
  306.  
  307.   
  308.   To save space, the Toolkit does not include the compiled TPU files. The
  309.   compiler will automatically compile any required units when you build your
  310.   first program. However, all the units can be recompiled using one of the
  311.   following methods:
  312.  
  313.   1    If you are familiar with the MAKE utility, execute the TTT.MAK file:
  314.  
  315.  
  316.        MAKE -fTTT.MAK
  317.  
  318.   2    Compile the program BUILDTTT.PAS or use the BUILD compiler option.
  319.        This program forces the compiler to build all the TPU's. Some of the
  320.        units are available in two versions; a compact unit that doesn't
  321.        contain all the features but has a reduced program size, and a full
  322.        featured unit. The desired version is controlled through the use of
  323.        compiler directives. (Refer to the section Minimizing Program Size for
  324.        more information on conditional compiler directives.) Instructions are
  325.        included at the top of the BuildTTT.pas file.
  326.  
  327.  
  328.  
  329. USING THE MANUAL
  330.  
  331.   The User Manual is organized into two main sections.
  332.  
  333.   Chapters 1 to 15 discuss the features and options of each individual unit.
  334.   It is recommended that you read the appropriate chapter before using a unit
  335.   for the first time. Each chapter includes a description of each procedure,
  336.   how it should be used in a program, the unit organization, and how to
  337.   modify the characteristics of the units by assigning new values to global
  338.   variables.
  339.  
  340.   Chapter 16 is the main reference section and contains a full alphabetic
  341.   listing of all the procedures and functions in the Toolkit. It includes a
  342.   description of each procedure, the declaration syntax, a cross reference to
  343.   other related procedures and an example of the procedure in use.
  344.  
  345.  
  346.  
  347. TOOLKIT CONCEPTS
  348.  
  349.   The Toolkit has been designed to be both flexible and easy to use.
  350.  
  351.   One of the major design critera was to minimize the complexity of the
  352.   Toolkit. The number of parameters passed to each procedure has been kept to
  353.   a minimum. We didn't want you to learn a whole new philosophy just to use
  354.   the Toolkit in your programs!
  355.  
  356.   Part of the flexibility has been attained through the use of global
  357.   variables which control the look and feel of many of the units. For
  358.   example, the ReadTTT5 unit includes a global variable RTTT that controls
  359.   the display colors, whether the user can escape, if the user is initially
  360.   in input mode or overtype mode, etc. The Toolkit sets RTTT to some default
  361.   values. If you prefer to use alternate settings, just change the relevant
  362.   element of RTTT, e.g.
  363.  
  364.        VAR
  365.          NAME : STRING;
  366.        BEGIN
  367.            WITH RTTT DO
  368.            BEGIN
  369.                INSERT := FALSE;
  370.  
  371.                WHITESPACE := ' ';
  372.                RIGHTJUSTIFY := TRUE;
  373.            END;
  374.            READ_STRING(10,5,30,'ENTER YOUR NAME ',2,NAME);
  375.        END;
  376.  
  377.   The Toolkit default settings can be automatically restored by executing the
  378.   unit's Default_Settings procedure, e.g.
  379.  
  380.        READTTT5.DEFAULT_SETTINGS;
  381.  
  382.   The following units include global variables:
  383.  
  384.        DirTTT5             DTTT
  385.        ListTTT5            LTTT
  386.        NestTTT5            NTTT
  387.        PullTTT5            PTTT
  388.        ReadTTT5            RTTT
  389.        
  390.   These variables are discussed fully in the User Manual.
  391.  
  392.   Many of the procedures are designed to write text to the screen. The
  393.   FastTTT5 unit includes a string type of StrScreen which is set to an 80
  394.   character string. The Turbo Pascal compiler expects these procedures to be
  395.   passed only strings of exactly the same type. Sometimes, when a different
  396.   string type is used, the compiler will halt and issue the message "Error
  397.   26: Type Mismatch". You do not need to change all the string types in your
  398.   program to type StrScreen. Just place the following compiler directive at
  399.   the top of your program:
  400.  
  401.                            {$V-}
  402.  
  403.   This directive turns off string type checking.
  404.  
  405.  
  406.  
  407. USER HOOKS
  408.  
  409.   The Toolkit provides User Hooks to allow the programmer to hook into the
  410.   heart of the Toolkit units and customize the program.
  411.  
  412.   A User Hook is basically a programmer defined procedure that is called by a
  413.   Toolkit unit every time a particular event occurs. For example, a
  414.   programmer's procedure can be called every time a key is pressed. This
  415.   hooked procedure is passed the character pressed by the user. The hooked
  416.   procedure can call other procedures and can even modify the key that was
  417.   pressed before returning control back to the Toolkit.
  418.  
  419.   The hooks provide a mechanism to customize the Toolkit functionality
  420.   without modifying the Toolkit source code.
  421.  
  422.   The following units include user hooks:
  423.  
  424.                  KeyTTT5
  425.                  MenuTTT5
  426.  
  427.                  PullTTT5
  428.                  NestTTT5
  429.                  ListTTT5
  430.                  IOTTT5
  431.   
  432.   Full details on the hooks are contained in the unit chapters.
  433.  
  434.  
  435.  
  436. CONDITIONAL COMPILATION
  437.  
  438.   Some of the units can be used in one of two modes; full featured or fewer
  439.   features with smaller program size. The three units that provide the two
  440.   modes are KeyTTT5, DirTTT5 and IOTTT5.
  441.  
  442.   The programmer can control the mode through the use of compiler directives.
  443.   Turbo Pascal's conditional compiler directives allow you to produce
  444.   different code from the same source text, based on conditional symbols.The
  445.   three conditional symbols are K_FULL, DIRFULL and IOFULL, respectively.
  446.  
  447.   By default, the Toolkit uses these units in their slim form. To recompile
  448.   the units in their full form, use the /D switch on the command-line
  449.   compiler or the menu command O/C/Conditional Defines in the integrated
  450.   environment. Figure 2.1 (below) illustrates the integrated environment
  451.   option.
  452.  
  453.   Once the appropriate conditional defines have been set, BUILD the program.
  454.   This will force the TPUs to be recompiled. The compiler directives do not
  455.   need to be set every time you compile your program, only when you want to
  456.   change the units from their current state.
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. CHAPTER 16 - REFERENCE LOOKUP
  464. =============================
  465.  
  466. This chapter is an aplhabetical listing of all the procedures and functions 
  467. in the Toolkit.
  468.  
  469.  
  470.  
  471. ___________________________________________________________________________
  472.  
  473. Activate_Table                                                       IOTTT5
  474.  
  475.  
  476. Purpose   Redirects all IOTTT5 activity to the assigned table.
  477.  
  478. Decln.    Activate_Table(Table_No:byte);
  479.  
  480. Remarks   Table_No is the number of the table to activate. It must be in
  481.           the range 1 to Max_Tables. The default active table is table 1.
  482.  
  483.  
  484. See Also  Create_Tables, Dispose_Tables
  485.  
  486. Example   
  487.  
  488. BEGIN
  489.     CREATE_TABLES(3);
  490.     ACTIVATE_TABLE(1);
  491.     CREATE_FIELDS(20);
  492.     ACTIVATE_TABLE(2);
  493.     CREATE_FIELDS(5);
  494.     ACTIVATE_TABLE(3);
  495.     CREATE_FIELDS(10);
  496. END;
  497.  
  498. Three tables are created and then 20, 5 and 10 fields are created for each
  499. table.
  500.  
  501. ___________________________________________________________________________
  502.  
  503. Activate_Virtual_Screen                                             WinTTT5
  504.  
  505.  
  506. Purpose   Redirects all subsequent screen writing activity to a virtual
  507.           screen.
  508.  
  509. Decln.    Activate_Virtual_Screen(Page:byte);
  510.  
  511. Remarks   Page is the number of the virtual screen to activate. It must be
  512.           in the range 1 to Max_Screens and must have been created with
  513.           CreateScreen or SaveScreen.
  514.  
  515. See Also  CreateScreen, SaveScreen, Activate_Visible_Screen
  516.  
  517. Example   
  518.  
  519. BEGIN
  520.     CREATESCREEN(3,25);
  521.     ACTIVATE_VIRTUAL_SCREEN(3);
  522.     CLEARTEXT(1,1,80,25,WHITE,BLUE);
  523.     WRITECENTER(1,YELLOW,BLUE,'HELP SYSTEM');
  524.     ......
  525.     SLIDERESTORESCREEN(3,DOWN);
  526.     ACTIVATE_VISIBLE_SCREEN;
  527. END;
  528.  
  529. Virtual screen number 3 is created and all screen writes are redirected to
  530. it with the Activate_Virtual_Screen procedure. The virtual screen is
  531. displayed to the user by sliding it down onto the display.
  532.  
  533. ___________________________________________________________________________
  534.  
  535. Activate_Visible_Screen                                             WinTTT5
  536.  
  537.  
  538.  
  539. Purpose   Redirects all subsequent screen writing activity back to the
  540.           visible screen.
  541.  
  542. Decln.    Activate_Visible_Screen;
  543.  
  544. Remarks   The visible screen is effectively screen 0. This command is the
  545.           equivalent of Activate_Virtual_Screen(0);
  546.  
  547. See Also  Activate_Virtual_Screen
  548.  
  549. Example   
  550.  
  551. BEGIN
  552.     CREATESCREEN(3,25);
  553.     ACTIVATE_VIRTUAL_SCREEN(3);
  554.     CLEARTEXT(1,1,80,25,WHITE,BLUE);
  555.     WRITECENTER(1,YELLOW,BLUE,'HELP SYSTEM');
  556.     ......
  557.     SLIDERESTORESCREEN(3,DOWN);
  558.     ACTIVATE_VISIBLE_SCREEN;
  559.     WRITE(1,25,WHITE,RED,'PRESS ANY KEY TO CONTINUE');
  560. END;
  561.  
  562. ___________________________________________________________________________
  563.  
  564. Add_Field                                                            IOTTT5
  565.  
  566.  
  567. Purpose   Creates an input field for full screen editing.
  568.  
  569. Decln.    Add_Field(ID,U,D,L,R,X,Y)
  570.  
  571. Remarks   ID is the field ID number of the field being added. It must be
  572.           within the range of fields that were created with the
  573.           Create_Fields procedure
  574.           U, D, L and R are the fields to jump to when the user presses the
  575.           Up, Down, Left and Right movement keys.
  576.           X Y are the coordinates of the first character of the field.
  577.  
  578. See Also  Create_Fields, String_Field, Byte_Field, etc.
  579.  
  580. Example   
  581.  
  582. BEGIN
  583.     CREATE_FIELDS(5);
  584.     ADD_FIELD(1, 5,2,5,2, 5,10);
  585.     ADD_FIELD(2, 1,3,1,3, 5,12);
  586.     ADD_FIELD(3, 2,4,2,4, 5,14);
  587.     ADD_FIELD(4, 3,5,3,5, 5,16);
  588.     ADD_FIELD(5, 4,1,4,1, 5,18);
  589. END;
  590.  
  591.  
  592. ___________________________________________________________________________
  593.  
  594. Add_Message                                                          IOTTT5
  595.  
  596.  
  597. Purpose   Assigns a message to a specific input field.
  598.  
  599. Decln.    Add_Message(ID,X,Y:byte;Msg:string);
  600.  
  601. Remarks   ID is the field ID number. The field must have previously been
  602.           added with the Add_Field procedure.
  603.           X Y are the leftmost coordinates of the message. If X is set to
  604.           zero, the Toolkit automatically centers the message on the
  605.           screen. If Y is set to zero, the message is displayed on the line
  606.           below the input field.
  607.           Msg is the message text.
  608.           
  609.           Every time the user enters the input field, the message will be
  610.           displayed. When the user leaves the field, the message will be
  611.           removed and the original screen contents restored.
  612.  
  613. See Also  Add_Field
  614.  
  615. Example   
  616.  
  617. BEGIN
  618.     CREATE_FIELDS(20);
  619.     ADD_FIELD(1, 20,2,20,2, 40,5);
  620.     ADD_MESSAGE(1, 1,5, 'CHECK THEIR CREDIT RATING!');
  621. END;
  622.  
  623. ___________________________________________________________________________
  624.  
  625. Add_Topic                                                          NestTTT5
  626.  
  627.  
  628. Purpose   Adds a new topic to a menu.
  629.  
  630. Decln.    Add_Topic(var
  631.           M:Nest_Menu;N:MenuStr;A:Boolean;Key:char;code:integer;Sub:MenuPtr
  632.           );
  633.  
  634. Remarks   M is the name of the menu variable to which the topic will be
  635.           added.
  636.           N is the topic text, i.e. the string that will be displayed in
  637.           the menu.
  638.           A indicates if the topic is selectable or non-selectable. Set to
  639.           true for normal selectable topics.
  640.           Key is the character code of a hotkey that can be used to execute
  641.           the topic. Set to #0 to disable the hotkey.
  642.           Code is an integer code that will be passed to the despatcher
  643.           procedure to indicate that the user selected this topic. Set the
  644.           code to zero if a sub-menu is going to be called.
  645.           Sub is the address of a sub-menu that is to be called if the
  646.  
  647.           topic is selected. Set to NIL if the topic executes a despatcher
  648.           procedure rather than displaying a sub-menu.
  649.           
  650.           Add topics in the order that they are to appear. When a topic is
  651.           added, the Toolkit assigns a topic number. This topic number is
  652.           used to modify or delete topics.
  653.  
  654. See Also  Initialize_Menu, Modify_Topic, Delete_A_Topic
  655.  
  656. Example   
  657.  
  658. BEGIN
  659.     ADD_TOPIC(PRINT,'RESET PRINTER',TRUE,#0,301,NIL);
  660.     ADD_TOPIC(PRINT,'SET CONDENSED',TRUE,#0,302,NIL);
  661.     ADD_TOPIC(PRINT,'REPORT MENU (ALT-R)',TRUE,#147,0,@REPORT);
  662. END;
  663.  
  664. Three topics are added to the menu variable PRINT. When selected, the first
  665. two topics call the despatcher with codes of 301 and 302, respectively. The
  666. third topic calls the Report menu.
  667.  
  668. ___________________________________________________________________________
  669.  
  670. Allow_Beep                                                           IOTTT5
  671.  
  672.  
  673. Purpose   Indicates if the system will beep when the user presses an
  674.           invalid key.
  675.  
  676. Decln.    Allow_Beep(On:boolean);
  677.  
  678. Remarks   Pass true to activate beeping and false to disable beeping.
  679.           Default is true. The setting applies to the active table.
  680.  
  681. See Also  Activate_Table
  682.  
  683. Example   
  684.  
  685. BEGIN
  686.     ALLOW_BEEP(FALSE);
  687. END;
  688.  
  689. ___________________________________________________________________________
  690.  
  691. Allow_Esc                                                            IOTTT5
  692.  
  693.  
  694. Purpose   Indicates if the user can escape from the input session by
  695.           pressing Esc.
  696.  
  697. Decln.    Allow_Esc(On:boolean);
  698.  
  699. Remarks   Pass true to allow the user to escape and false to disable the
  700.           Esc key. Default is true. The setting applies to the active
  701.           table.
  702.  
  703.  
  704. See Also  Activate_Table
  705.  
  706. Example   
  707.  
  708. BEGIN
  709.     ALLOW_ESC(FALSE);
  710. END;
  711.  
  712. ___________________________________________________________________________
  713.  
  714. Alt_Pressed                                                         KeyTTT5
  715.  
  716.  
  717. Purpose   Indicates if the Alt key is depressed (i.e. held down - not
  718.           melancholy!).
  719.  
  720. Decln.    Alt_Pressed:boolean
  721.  
  722. Returns   Boolean
  723.  
  724. See Also  Ctrl_Pressed, Shift_pressed
  725.  
  726. Example   
  727.  
  728. BEGIN
  729.     ......
  730.     IF ALT_PRESSED THEN
  731.        WRITECENTER(25,YELLOW,RED,' LET GO OF THE ALT KEY! ');
  732. END;
  733.  
  734. ___________________________________________________________________________
  735.  
  736. Assign_CharHook                                                      IOTTT5
  737.  
  738.  
  739. Purpose   Identifies a procedure that will be called every time the user
  740.           presses a key during field input.
  741.  
  742. Decln.    Assign_CharHook(Proc:Char_Hook_Proc);
  743.  
  744. Remarks   Proc is the name of the procedure to Hook into the IO routines.
  745.           The procedure must be declared far with 3 passed parameters; a
  746.           variable type char, a variable type ID and a variable type byte.
  747.           The procedure will be passed the character that was just pressed,
  748.           the current field ID number and a refresh code.
  749.  
  750. See Also  Assign_InsHook, Assign_LeaveFieldHook, Assign_EnterFieldHook
  751.  
  752. Example   
  753.  
  754.     {$F+}
  755.     PROCEDURE BOBS_HOOK(VAR C:CHAR;VAR ID:BYTE;VAR R:BYTE);
  756.     BEGIN
  757.         IF C = F2 THEN
  758.  
  759.            DISPLAY_USERID;
  760.     END;
  761.     {$F-}
  762.  
  763. BEGIN
  764.     ASSIGN_CHARHOOK(BOBS_HOOK);
  765. END;
  766.  
  767. This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
  768. programmers should replace the procedure with the statement:
  769.  
  770.      IO_CHARHOOK := @BOBS_HOOK;
  771.  
  772. ___________________________________________________________________________
  773.  
  774. Assign_Despatcher                                                  NestTTT5
  775.  
  776.  
  777. Purpose   Identifies the procedure that will be called when a user selects
  778.           a menu topic.
  779.  
  780. Decln.    Assign_Despatcher(D:Despatcher_proc);
  781.  
  782. Remarks   D is the name of the procedure that will be executed when a user
  783.           selects a menu topic. The procedure must be declared far with two
  784.           passed parameters; a variable integer indicating the selected
  785.           topic and a variable byte indicating the refresh code. The
  786.           selected topic code is the code that was passed with the
  787.           Add_Topic procedure.
  788.  
  789. See Also  Add_Topic
  790.  
  791. Example   
  792.  
  793.     {$F+}
  794.     PROCEDURE TASK_MASTER(VAR CODE:INTEGER;VAR R:BYTE);
  795.     BEGIN
  796.         CASE CODE OF
  797.         ....
  798.         301 : BEGIN
  799.                   RESET_PRINTER;
  800.                   R := CLEARCURRENT;
  801.               END;
  802.         ....
  803.         END; {CASE}
  804.     END; {PROC}
  805.     {$F-}
  806.  
  807. BEGIN
  808.     ASSIGN_DESPATCHER(TASK_MASTER);
  809. END;
  810.  
  811. The despatcher procedure Task_Master checks to see if the user selected the
  812. topic with a code of 301. If so, the printer is reset, and control is
  813. passed back to the nested menu, but the menu is removed and the parent menu
  814. displayed.
  815.  
  816.  
  817. ___________________________________________________________________________
  818.  
  819. Assign_EnterFieldHook                                                IOTTT5
  820.  
  821.  
  822. Purpose   Identifies a procedure that will be called every time the user
  823.           enters a new field during field input.
  824.  
  825. Decln.    Assign_EnterFieldHook(Proc:Move_Field_proc);
  826.  
  827. Remarks   Proc is the name of the procedure to Hook into the IO routines.
  828.           The procedure must be declared far with 2 passed parameters; a
  829.           variable type byte and a variable type byte. The procedure will
  830.           be passed the field ID number that the user is moving to and a
  831.           refresh code.
  832.  
  833. See Also  Assign_InsHook, Assign_CharHook, Assign_LeaveFieldHook
  834.  
  835. Example   
  836.  
  837.     {$F+}
  838.     PROCEDURE INTO_HOOK(VAR ID:BYTE;VAR R:BYTE);
  839.     BEGIN
  840.         IF ID = 21 THEN
  841.            DISPLAY_COMPANY_INFO;
  842.     END;
  843.     {$F-}
  844.  
  845. BEGIN
  846.     ASSIGN_ENTERFIELDHOOK(INTO_HOOK);
  847. END;
  848.  
  849. This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
  850. programmers should replace the procedure with the statement:
  851.  
  852.      IO_ENTERHOOK := @INTO_HOOK;
  853.  
  854. ___________________________________________________________________________
  855.  
  856. Assign_Finish_Char                                                   IOTTT5
  857.  
  858.  
  859. Purpose   Indicates the character that the user can press to terminate
  860.           input.
  861.  
  862. Decln.    Assign_Finish_Char(Ch:char)
  863.  
  864. Remarks   Ch is the end input character. The default is the F10 function
  865.           key. The appendix includes a list of the Toolkit character codes.
  866.           Remember to advise the user of the key so that he/she can exit!
  867.  
  868. See Also  Assign_LeaveFieldHook
  869.  
  870. Example   
  871.  
  872.  
  873. BEGIN
  874.     ASSIGN_FINISH_CHAR(#173);
  875. END;
  876.  
  877. The input will be terminated when the user presses Alt-X.
  878.  
  879. ___________________________________________________________________________
  880.  
  881. Assign_Idle_Hook                                                    KeyTTT5
  882.  
  883.  
  884. Purpose   Identifies a procedure that will be continually called while the
  885.           program is waiting for a key.
  886.  
  887. Decln.    Assign_Idle_Hook(Proc:Key_Idle_Type);
  888.  
  889. Remarks   Proc is the assigned procedure which must be declared far and
  890.           must have no passed parameters. Keep the procedure fast and
  891.           efficient to avoid a sluggish keyboard response. If the procedure
  892.           is a background procedure (such as printing), be sure to check
  893.           for KeyPressed, and exit if the user has pressed a key.
  894.  
  895. See Also  Assign_Pressed_Hook
  896.  
  897. Example   
  898.  
  899.     {$F+}
  900.     PROCEDURE KEY_STATUS;
  901.     BEGIN
  902.         IF CAPSON THEN
  903.            WRITEAT(65,25,WHITE,BLUE,'CAPS')
  904.         ELSE
  905.            WRITEAT(65,25,WHITE,BLUE,'   ');
  906.     END;
  907.     {$F-}
  908.  
  909. BEGIN
  910.     ASSIGN_IDLE_HOOK(KEY_STATUS);
  911. END;
  912.  
  913. This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
  914. programmers should replace the procedure with the statement:
  915.  
  916.      KTTT.IDLE_HOOK := @KEY_STATUS;
  917.  
  918. ___________________________________________________________________________
  919.  
  920. Assign_InsHook                                                       IOTTT5
  921.  
  922.  
  923. Purpose   Identifies a procedure which will be called every time the user
  924.           presses the Ins key during field input.
  925.  
  926. Decln.    Assign_InsHook(Proc:Insert_proc);
  927.  
  928.  
  929. Remarks   Proc is the name of the procedure to Hook into the IO routines.
  930.           The procedure must be declared far with 1 passed parameter; a
  931.           boolean. The procedure is passed the new state of the insert key.
  932.           The default procedure sets the cursor to a full block in Overtype
  933.           mode and an underscore cursor in Insert Mode.
  934.  
  935. See Also  Assign_CharHook, Assign_EnterFieldHook, Assign_LeaveFieldHook
  936.  
  937. Example   
  938.  
  939.     {$F+}
  940.     PROCEDURE INS_HOOK(INSERTON:BOOLEAN);
  941.     BEGIN
  942.         IF INSERTON THEN
  943.            WRITEAT(71,25,WHITE,RED,'INSERT  ')
  944.         ELSE
  945.            WRITEAT(71,25,WHITE,RED,'OVERTYPE');
  946.     END;
  947.     {$F-}
  948.  
  949. BEGIN
  950.     ASSIGN_INSHOOK(INS_HOOK);
  951. END;
  952.  
  953. This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
  954. programmers should replace the procedure with the statement:
  955.  
  956.      IO_INSERTHOOK:= @INS_HOOK;
  957.  
  958. ___________________________________________________________________________
  959.  
  960. Assign_LeaveFieldHook                                                IOTTT5
  961.  
  962.  
  963. Purpose   Identifies a procedure that will be called every time the user
  964.           leaves a field during field input.
  965.  
  966. Decln.    Assign_LeaveFieldHook(Proc:Move_Field_proc);
  967.  
  968. Remarks   Proc is the name of the procedure to Hook into the IO routines.
  969.           The procedure must be declared far with 2 passed parameters; a
  970.           variable type byte and a variable type byte. The procedure will
  971.           be passed the field ID number that the user is leaving and a
  972.           refresh code.
  973.  
  974. See Also  Assign_InsHook, Assign_CharHook, Assign_EnterFieldHook
  975.  
  976. Example   
  977.  
  978.     {$F+}
  979.     PROCEDURE LEAVE_HOOK(VAR ID:BYTE;VAR R:BYTE);
  980.     BEGIN
  981.         IF ID = 21 THEN
  982.            R := END_INPUT;
  983.  
  984.     END;
  985.     {$F-}
  986.  
  987. BEGIN
  988.     ASSIGN_LEAVEFIELDHOOK(LEAVE_HOOK);
  989. END;
  990.  
  991. This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
  992. programmers should replace the procedure with the statement:
  993.  
  994.      IO_LEAVEHOOK := @LEAVE_HOOK;
  995.  
  996. ___________________________________________________________________________
  997.  
  998. Assign_Pressed_Hook                                                 KeyTTT5
  999.  
  1000.  
  1001. Purpose   Assigns a procedure that will be called every time a key is
  1002.           pressed.
  1003.  
  1004. Decln.    Assign_Pressed_Hook(Proc: Key_Pressed_Type);
  1005.  
  1006. Remarks   Proc is the name of the procedure to Hook into the GetKey
  1007.           routine. The procedure must be declared far with 1 passed
  1008.           parameter; a variable character. The hooked procedure is passed
  1009.           the character that the user just pressed. The character can be
  1010.           modified to any value before being returned to GetKey.
  1011.  
  1012. See Also  GetKey, Assign_Idle_Hook
  1013.  
  1014. Example   
  1015.  
  1016.     {$F+}
  1017.     PROCEDURE GLOBAL_TASKS(VAR C : CHAR);
  1018.     BEGIN
  1019.         CASE C OF
  1020.         F1  : HELP_ROUTINES;
  1021.         ALTX: EXIT_ROUTINES;
  1022.         END; {CASE}
  1023.     END;
  1024.     {$F}
  1025.  
  1026. BEGIN
  1027.     ....
  1028.     ASSIGN_PRESSED_HOOK(GLOBAL_TASKS);
  1029.     ....
  1030. END;
  1031.  
  1032. This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
  1033. programmers should replace the procedure with the statement:
  1034.  
  1035.      KTTT.PRESSEDHOOK := @GLOBAL_TASKS;
  1036.  
  1037.  
  1038. ___________________________________________________________________________
  1039.  
  1040. Attrib                                                             FastTTT5
  1041.  
  1042.  
  1043. Purpose   Changes the display attributes of an area of the screen.
  1044.  
  1045. Decln.    Attrib(X1,Y1,X2,Y2,F,B:byte);
  1046.  
  1047. Remarks   X1, Y1 are the coordinates of the top left corner of the area to
  1048.           be changed.
  1049.           X2, Y2 are the lower right corner coordinates.
  1050.           F, B are the foreground and background colors.
  1051.  
  1052. See Also  ClearText
  1053.  
  1054. Example   
  1055.  
  1056. BEGIN
  1057.     ATTRIB(20,5,60,15,WHITE,LIGHTGRAY,BLACK);
  1058. END;
  1059.  
  1060. ___________________________________________________________________________
  1061.  
  1062. Attr                                                               FastTTT5
  1063.  
  1064.  
  1065. Purpose   Combines a foreground and a background color into an attribute
  1066.           byte.
  1067.  
  1068. Decln.    Attr(F,B:byte):byte;
  1069.  
  1070. Returns   Byte
  1071.  
  1072. Example   
  1073.  
  1074. BEGIN
  1075.     FASTWRITE(1,2,ATTR(YELLOW,RED),'HELLO');
  1076. END;
  1077.  
  1078. This command is the equivalent of:
  1079.  
  1080.     WRITEAT(1,1,YELLOW,RED,'HELLO');
  1081.  
  1082. ___________________________________________________________________________
  1083.  
  1084. Beep                                                               MiscTTT5
  1085.  
  1086.  
  1087. Purpose   Emits a beep from the PC speaker.
  1088.  
  1089. Decln.    Beep;
  1090.  
  1091. Example   
  1092.  
  1093.  
  1094. BEGIN
  1095.     IF INVALID_CHAR(CH) THEN
  1096.        BEEP;
  1097. END;
  1098.  
  1099. ___________________________________________________________________________
  1100.  
  1101. Box                                                                FastTTT5
  1102.  
  1103.  
  1104. Purpose   Draws a box on the screen.
  1105.  
  1106. Decln.    Box(X1,Y1,X2,Y2,F,B,BoxType:byte)
  1107.  
  1108. Remarks   X1, Y1 are the coordinates of the top left corner of the area to
  1109.           be changed.
  1110.           X2, Y2 are the lower right corner coordinates.
  1111.           F, B are the foreground and background colors.
  1112.           BoxType is a code to indicate the box type: 0 no box, 1 single
  1113.           line box, 2 double line box, 3 single top/bottom and double
  1114.           sides, 4 double top/bottom and single sides. If a box type in the
  1115.           range 5..255 is used, the box is drawn using the ASCII character
  1116.           represented by that number.
  1117.           
  1118.           The area of the display inside the Box border is not cleared.
  1119.  
  1120. See Also  FBox, GrowFBox
  1121.  
  1122. Example   
  1123.  
  1124. BEGIN
  1125.     CLRSCR;
  1126.     BOX(1,1,80,20,LIGHTCYAN,RED,2);
  1127. END;
  1128.  
  1129. ___________________________________________________________________________
  1130.  
  1131. Byte_Field                                                           IOTTT5
  1132.  
  1133.  
  1134. Purpose   Assigns a byte variable to an input field.
  1135.  
  1136. Decln.    Byte_Field(ID:byte;var BVar:byte;Fmt:Lstring;Min,Max:byte);
  1137.  
  1138. Remarks   ID is the field ID number.
  1139.           Bvar is the name of the byte variable that will be updated with
  1140.           the user's input.
  1141.           Fmt is the format of the input field. Pass a null string '' for
  1142.           the default.
  1143.           Min, Max are the minimum and maximum values for range check. Set
  1144.           to 0 to accept any byte value.
  1145.           
  1146.           The field must be declared with Add_Field prior to calling this
  1147.           procedure.
  1148.  
  1149.  
  1150. See Also  Add_Field, Word_Field, Integer_Field, LongInt_Field, Real_Field,
  1151.           Date_Field, String_Field
  1152.  
  1153. Example   
  1154.  
  1155. BEGIN
  1156.     ACTIVATE_TABLE(3);
  1157.     BYTE_FIELD(1, AGE, '', 0,120);
  1158.     BYTE_FIELD(2, DAY, '', 1,31);
  1159. END;
  1160.  
  1161. ___________________________________________________________________________
  1162.  
  1163. CapsOn                                                              KeyTTT5
  1164.  
  1165.  
  1166. Purpose   Indicates if the Caps Lock key is on.
  1167.  
  1168. Decln.    CapsOn:boolean;
  1169.  
  1170. Returns   Boolean
  1171.  
  1172. Remarks   Returns true if the CapsOn key is "illuminated".
  1173.  
  1174. See Also  Set_Caps, NumOn, ScrollOn
  1175.  
  1176. Example   
  1177.  
  1178. BEGIN
  1179.     IF CAPSON THEN
  1180.        WRITEAT(70,1,WHITE,BLACK,'CAPS')
  1181.     ELSE
  1182.        WRITEAT(70,1,WHITE,BLACK,'    ')
  1183. END;
  1184.  
  1185. ___________________________________________________________________________
  1186.  
  1187. ClearLine                                                          FastTTT5
  1188.  
  1189.  
  1190. Purpose   Erases all the text on a line and sets the display attribute.
  1191.  
  1192. Decln.    ClearLine(Y,F,B);
  1193.  
  1194. Remarks   Y is the line number.
  1195.           F, B are the foreground and background colors to set the blank
  1196.           line with.
  1197.  
  1198. See Also  ClearText
  1199.  
  1200. Example   
  1201.  
  1202. BEGIN
  1203.     CLEARLINE(25,YELLOW,RED);
  1204.  
  1205.     PLAINWRITE(1,25,'FATAL ERROR - FILE SERVER EXPLODED');
  1206. END;
  1207.  
  1208. ___________________________________________________________________________
  1209.  
  1210. ClearText                                                          FastTTT5
  1211.  
  1212.  
  1213. Purpose   Erases all the text on a rectangular area of the screen and sets
  1214.           the display attribute.
  1215.  
  1216. Decln.    ClearText(X1,Y1,X2,Y2,F,B:byte);
  1217.  
  1218. Remarks   X1, Y1 are the coordinates of the top left corner of the area to
  1219.           be erased.
  1220.           X2, Y2 are the lower right corner coordinates.
  1221.           F, B are the foreground and background colors.
  1222.  
  1223. See Also  ClearLine, Attrib
  1224.  
  1225. Example   
  1226.  
  1227. BEGIN
  1228.     CLEARTEXT(1,1,80,13,WHITE,BLACK);
  1229. END;
  1230.  
  1231. ___________________________________________________________________________
  1232.  
  1233. ClickWrite                                                         FastTTT5
  1234.  
  1235.  
  1236. Purpose   Writes text to the screen with a fancy ticker-tape effect.
  1237.           Strictly trivial!
  1238.  
  1239. Decln.    ClickWrite(X,Y,F,B:byte;St:strscreen);
  1240.  
  1241. Remarks   X, Y are the coordinates of the first character of the string.
  1242.           F, B are the foreground and background display colors.
  1243.           St is the text to be displayed.
  1244.  
  1245. See Also  WriteAT
  1246.  
  1247. Example   
  1248.  
  1249. BEGIN
  1250.     BOX(36,1,44,3,WHITE,BLUE,1);
  1251.     CLICKWRITE(35,2,LIGHTCYAN,BLUE,'MAIN MENU')
  1252. END;
  1253.  
  1254. ___________________________________________________________________________
  1255.  
  1256. Clock                                                              MiscTTT5
  1257.  
  1258.  
  1259. Purpose   Displays the current time
  1260.  
  1261.  
  1262. Decln.    Clock;
  1263.  
  1264. Remarks   This procedure is designed to be used with the Assign_Idle_Hook
  1265.           to display a clock on the screen while the program is waiting for
  1266.           keyboard input.
  1267.           
  1268.           The MiscTTT5 unit includes 4 global byte variables that control
  1269.           the clock display:
  1270.           
  1271.           ClockX, ClockY are the clock display coordinates.
  1272.           
  1273.           ClockF, ClockB are the foreground and background display colors.
  1274.  
  1275. See Also  Assign_Idle_Hook
  1276.  
  1277. Example   
  1278.  
  1279. BEGIN
  1280.     CLOCKX := 68;
  1281.     CLOCKY := 1;
  1282.     CLOCKF := LIGHTCYAN;
  1283.     CLOCKB := BLACK;
  1284.     ASSIGN_IDLE_HOOK(CLOCK);
  1285. END;
  1286.  
  1287. ___________________________________________________________________________
  1288.  
  1289. ColorScreen                                                        FastTTT5
  1290.  
  1291.  
  1292. Purpose   Indicates whether the program is running on a color display
  1293.           system.
  1294.  
  1295. Decln.    ColorScreen:boolean;
  1296.  
  1297. Returns   Boolean
  1298.  
  1299. Remarks   The Toolkit automatically determines if the program is running on
  1300.           a color or a monochrome system.
  1301.  
  1302. See Also  EGAVGASystem
  1303.  
  1304. Example   
  1305.  
  1306. BEGIN
  1307.     IF COLORSCREEN THEN
  1308.        WRITEAT(1,1,YELLOW,RED,'ERROR - PRINTER MELTED')
  1309.     ELSE
  1310.        WRITEAT(1,1,WHITE,BLACK,'ERROR - PRINTER MELTED')
  1311. END;
  1312.  
  1313.  
  1314. ___________________________________________________________________________
  1315.  
  1316. ColWrite                                                           FastTTT5
  1317.  
  1318.  
  1319. Purpose   Displays a string on the screen using preset colors.
  1320.  
  1321. Decln.    ColWrite(X,Y:byte;St:strscreen);
  1322.  
  1323. Remarks   X, Y are the coordinates of the first character.
  1324.           St is the text to be displayed.
  1325.           
  1326.           The FastTTT5 unit includes two global variables FCol and BCol
  1327.           that Colwrite uses for the display colors.
  1328.  
  1329. See Also  WriteAT, FastWrite, PlainWrite, FWrite, FWriteLn
  1330.  
  1331. Example   
  1332.  
  1333. BEGIN
  1334.     FCOL := YELLOW;
  1335.     BCOL := BLUE;
  1336.     COLWRITE(1,1,'TECHNOJOCK');
  1337.     COLWRITE(1,2,'SOFTWARE');
  1338.     COLWRITE(1,3,'INC');
  1339. END;
  1340.  
  1341. ___________________________________________________________________________
  1342.  
  1343. Confine_Mouse_Horiz                                                 KeyTTT5
  1344.  
  1345.  
  1346. Purpose   Restricts the screen position of the mouse cursor horizontally.
  1347.  
  1348. Decln.    Confine_Mouse_Horiz(X1,X2:byte);
  1349.  
  1350. Remarks   X1, X2 are the leftmost and rightmost X coordinates.
  1351.           
  1352.           If the mouse is outside the confined coordinates when the
  1353.           procedure is called, the mouse is repositioned inside the nearest
  1354.           boundary as soon as any mouse activity occurs.
  1355.  
  1356. See Also  Confine_Mouse_Vert
  1357.  
  1358. Example   
  1359.  
  1360. BEGIN
  1361.     HIDE_MOUSE_CURSOR;
  1362.     CONFINE_MOUSE_HORIZ(20,60);
  1363.     SHOW_MOUSE_CURSOR;
  1364. END;
  1365.  
  1366.  
  1367. ___________________________________________________________________________
  1368.  
  1369. Confine_Mouse_Vert                                                  KeyTTT5
  1370.  
  1371.  
  1372. Purpose   Restricts the screen position of the mouse cursor vertically.
  1373.  
  1374. Decln.    Confine_Mouse_Vert(Y1,Y2:byte);
  1375.  
  1376. Remarks   Y1, Y2 are the leftmost and rightmost Y coordinates.
  1377.           
  1378.           If the mouse is outside the confined coordinates when the
  1379.           procedure is called, the mouse is repositioned inside the nearest
  1380.           boundary as soon as any mouse activity occurs.
  1381.  
  1382. See Also  Confine_Mouse_Horiz
  1383.  
  1384. Example   
  1385.  
  1386. BEGIN
  1387.     HIDE_MOUSE_CURSOR;
  1388.     CONFINE_MOUSE_HORIZ(20,60);
  1389.     CONFINE_MOUSE_VERT(5,15);
  1390.     SHOW_MOUSE_CURSOR;
  1391. END;
  1392.  
  1393. ___________________________________________________________________________
  1394.  
  1395. CopyFile                                                           MiscTTT5
  1396.  
  1397.  
  1398. Purpose   Copies a DOS file.
  1399.  
  1400. Decln.    CopyFile(Source, Target:string):byte
  1401.  
  1402. Returns   Byte
  1403.  
  1404. Remarks   Source and Target are the filenames. They may optionally include
  1405.           the drive and/or path. If the Target file already exists, it is
  1406.           overwritten.
  1407.           
  1408.           The return codes are
  1409.           
  1410.           0    Copy successful
  1411.           1    Source and target are the same
  1412.           2    Source file not found
  1413.           3    Unable to create Target file
  1414.           4    Data copy failed
  1415.  
  1416. See Also  Exist
  1417.  
  1418. Example   
  1419.  
  1420. BEGIN
  1421.  
  1422.     IF COPYFILE('C:\AUTOEXEC.BAT','C:\AUTOEXEC.BAK') = 0 THEN
  1423.        WRITECENTER(1,WHITE,BLACK,'FILE SAVED')
  1424.     ELSE
  1425.        WRITECENTER(1,YELLOW,RED,'COPY FAILED');
  1426. END;
  1427.  
  1428. ___________________________________________________________________________
  1429.  
  1430. CopyScreenBlock                                                     WinTTT5
  1431.  
  1432.  
  1433. Purpose   Copies one part of the screen to another part of the display.
  1434.  
  1435. Decln.    CopyScreenBlock(X1,Y1,X2,Y2,X,Y:byte);
  1436.  
  1437. Remarks   X1, Y1 are the coordinates of the top left corner of the source
  1438.           area.
  1439.           X2, Y2 are the coordinates of the bottom right corner of the
  1440.           source area.
  1441.           X, Y are the coordinates of the top left corner of the target
  1442.           area.
  1443.  
  1444. See Also  MoveScreenBlock
  1445.  
  1446. Example   
  1447.  
  1448. BEGIN
  1449.     COPYSCREENBLOCK(1,1,80,3,1,22)
  1450. END;
  1451.  
  1452. ___________________________________________________________________________
  1453.  
  1454. CreateScreen                                                        WinTTT5
  1455.  
  1456.  
  1457. Purpose   Creates an empty virtual screen.
  1458.  
  1459. Decln.    CreateScreen(Page:byte;Lines:byte);
  1460.  
  1461. Remarks   Page is the screen number of the virtual screen.
  1462.           Lines is the number of lines (1..255) for the virtual screen. The
  1463.           Page number must be in the range 1 to Max_Screens.
  1464.           
  1465.           The virtual screen is created with a default display attribute of
  1466.           yellow on black. If the virtual screen already exists, the screen
  1467.           is cleared.
  1468.  
  1469. See Also  SaveScreen, RestoreScreen, DisposeScreen, Activate_Virtual_Screen
  1470.  
  1471. Example   
  1472.  
  1473. BEGIN
  1474.     CREATESCREEN(3,25);
  1475.     ACTIVATE_VIRTUAL_SCREEN(3);
  1476.     ....
  1477. END;
  1478.  
  1479.  
  1480. ___________________________________________________________________________
  1481.  
  1482. Create_Fields                                                        IOTTT5
  1483.  
  1484.  
  1485. Purpose   Allocates the total number of input fields.
  1486.  
  1487. Decln.    Create_Fields(Count:byte);
  1488.  
  1489. Remarks   Count is the number of fields to create for the active table. The
  1490.           total number of fields must be in the range 2 to MaxInputFields.
  1491.           This procedure must be called before Add_Field.
  1492.  
  1493. See Also  Create_Tables, Add_Field, Dispose_Fields
  1494.  
  1495. Example   
  1496.  
  1497. BEGIN
  1498.     CREATE_FIELDS(5);
  1499.     ADD_FIELD(1, 5,2,5,2, 5,10);
  1500.     ADD_FIELD(2, 1,3,1,3, 5,12);
  1501.     ADD_FIELD(3, 2,4,2,4, 5,14);
  1502.     ADD_FIELD(4, 3,5,3,5, 5,16);
  1503.     ADD_FIELD(5, 4,1,4,1, 5,18);
  1504. END;
  1505.  
  1506. ___________________________________________________________________________
  1507.  
  1508. Create_Tables                                                         IOTT5
  1509.  
  1510.  
  1511. Purpose   Allocates multiple tables for multi-screen input forms.
  1512.  
  1513. Decln.    Create_Tables(Count:byte);
  1514.  
  1515. Remarks   Count is the number of tables to create. If only one table is
  1516.           going to be used throughout the program, the procedure need not
  1517.           be called, i.e. the Toolkit initializes the unit with
  1518.           Create_Tables(1);
  1519.  
  1520. See Also  Create_Fields, Dispose_Tables
  1521.  
  1522. Example   
  1523.  
  1524. BEGIN
  1525.     CREATE_TABLES(3);
  1526.     ACTIVATE_TABLE(1);
  1527.     CREATE_FIELDS(20);
  1528.     ACTIVATE_TABLE(2);
  1529.     CREATE_FIELDS(5);
  1530.     ACTIVATE_TABLE(3);
  1531.     CREATE_FIELDS(10);
  1532. END;
  1533.  
  1534.  
  1535. ___________________________________________________________________________
  1536.  
  1537. Ctrl_Pressed                                                        KeyTTT5
  1538.  
  1539.  
  1540. Purpose   Indicates whether Ctrl key is depressed.
  1541.  
  1542. Decln.    Ctrl_Pressed:boolean
  1543.  
  1544. Returns   Boolean
  1545.  
  1546. See Also  Alt_Pressed, Shift_pressed
  1547.  
  1548. Example   
  1549.  
  1550. BEGIN
  1551.     ......
  1552.     IF CTRL_PRESSED THEN
  1553.        WRITECENTER(25,YELLOW,RED,' LET GO OF THE CTRL KEY! ');
  1554. END;
  1555.  
  1556. ___________________________________________________________________________
  1557.  
  1558. Date                                                               MiscTTT5
  1559.  
  1560.  
  1561. Purpose   Returns the system date nicely formatted.
  1562.  
  1563. Decln.    Date:string;
  1564.  
  1565. Returns   String
  1566.  
  1567. Remarks   The format of the returned string is the day followed by the
  1568.           month, day of month and year, e.g.
  1569.           
  1570.           Monday December 25, 1989
  1571.  
  1572. See Also  Time
  1573.  
  1574. Example   
  1575.  
  1576. BEGIN
  1577.     CLRSCR;
  1578.     WRITECENTER(1,YELLOW,BLACK,DATE);
  1579. END;
  1580.  
  1581. ___________________________________________________________________________
  1582.  
  1583. Date_Field                                                           IOTTT5
  1584.  
  1585.  
  1586. Purpose   Assigns a dates variable to an input field.
  1587.  
  1588. Decln.    Date_Field(ID:byte;var
  1589.           DVar:dates;DateFmt:byte;DispFmt:string;Min,Max:dates);
  1590.  
  1591.  
  1592. Remarks   ID is the field ID number.
  1593.           Dvar is the name of the dates variable that will be updated with
  1594.           the user's input.
  1595.           DateFmt is the date format of the input field. The valid date
  1596.           formats are declared as constants in the IOTTT5 unit:
  1597.                DDMMYY
  1598.                MMDDYY
  1599.                MMYY
  1600.                MMYYYY
  1601.                DDMMYYYY
  1602.                MMDDYYYY
  1603.           DispFmt is the display format for the date. Enter a null string
  1604.           if the default is satisfactory, i.e. ##/##/##, ##/####,
  1605.           ##/##/####.
  1606.           Min, Max are the earliest and latest acceptable dates for range
  1607.           checking. Set to 0 to accept any byte value.
  1608.           
  1609.           The field must be declared with Add_Field prior to calling this
  1610.           procedure.
  1611.  
  1612. See Also  Add_Field, Word_Field, Integer_Field, LongInt_Field, Real_Field,
  1613.           Byte_Field, String_Field
  1614.  
  1615. Example   
  1616.  
  1617. BEGIN
  1618.     DATE_FIELD(8, BIRTHMONTH,MMYYYY,'',0,0);
  1619.     DATE_FIELD(9, PARTYDATE,DDMMYY,'(## - ## - ##)',0,0);
  1620. END;
  1621.  
  1622. ___________________________________________________________________________
  1623.  
  1624. Date_to_Julian                                                     MiscTTT5
  1625.  
  1626.  
  1627. Purpose   Converts a date string to a Julian dates form.
  1628.  
  1629. Decln.    Date_to_Julian(StrDate:string;Fmt:byte):dates;
  1630.  
  1631. Returns   Dates
  1632.  
  1633. Remarks   StrDate is the date in string format.
  1634.           Fmt is the date format code.
  1635.  
  1636. See Also  Julian_to_Date, Today_In_Julian, Valid_Date
  1637.  
  1638. Example   
  1639.  
  1640. BEGIN
  1641.     JULDATE := DATE_TO_JULIAN('2/20/56',MMDDYY);
  1642. END;
  1643.  
  1644.  
  1645. ___________________________________________________________________________
  1646.  
  1647. Date_Within_Range                                                  MiscTTT5
  1648.  
  1649.  
  1650. Purpose   Returns true if one date falls between two other dates.
  1651.  
  1652. Decln.    Date_Within_Range(Min,Max,Test:dates):Boolean;
  1653.  
  1654. Returns   Boolean
  1655.  
  1656. Remarks   Min, Max are the beginning and ending dates in Julian form.
  1657.           Test is the date being evaluated.
  1658.  
  1659. See Also  Valid_Date
  1660.  
  1661. Example   
  1662.  
  1663. VAR
  1664.   THESTART,
  1665.   THEEND,
  1666.   TESTDATE: DATES
  1667. BEGIN
  1668.     THESTART := DATE_TO_JULIAN('07/01/89',MMDDYY);
  1669.     THEEND   := DATE_TO_JULIAN('10/01/89',MMDDYY);
  1670.     TESTDATE := TODAY_IN_JULIAN;
  1671.     IF DATE_WITHIN_RANGE(THESTART,THEEND,TESTDATE) THEN
  1672.        FWRITELN('IT''S YOUR TURN TO CLEAN THE TOILET!');
  1673. END;
  1674.  
  1675. ___________________________________________________________________________
  1676.  
  1677. Define_Colors                                                        IOTTT5
  1678.  
  1679.  
  1680. Purpose   Modifies the default display colors for the input fields and
  1681.           messages.
  1682.  
  1683. Decln.    Define_Colors(HiF,HiB,LoF,LoB,MsgF,MsgB:byte);
  1684.  
  1685. Remarks   HiF, HiB are the foreground and background colors of the field
  1686.           being edited.
  1687.           LoF, LoB are the foreground and background colors of the other
  1688.           fields.
  1689.           MsgF, MsgB are the foreground and background colors of the
  1690.           optional field messages.
  1691.           
  1692.           The Toolkit will automatically default to one of two color sets,
  1693.           depending on whether the system is monochrome or color.
  1694.  
  1695. Example   
  1696.  
  1697. BEGIN
  1698.     IF COLORSCREEN THEN
  1699.        DEFINE_COLORS(YELLOW,RED,BLACK,LIGHTGRAY,CYAN,BLUE)
  1700.     ELSE
  1701.        DEFINE_COLORS(WHITE,BLACK,LIGHTGRAY,BLACK,WHITE,BLACK);
  1702. END;
  1703.  
  1704.  
  1705. ___________________________________________________________________________
  1706.  
  1707. DelayKey                                                            KeyTTT5
  1708.  
  1709.  
  1710. Purpose   Pauses while the user presses a key or a specified time period
  1711.           elapses.
  1712.  
  1713. Decln.    DelayKey(Time:integer);
  1714.  
  1715. Remarks   Time is the maximum delay period in milliseconds, e.g. 1000 for a
  1716.           second.
  1717.           
  1718.           This procedure is very useful for temporarily displaying
  1719.           messages, copyright screens, etc. As soon as the user presses a
  1720.           key (or mouse activity occurs), the procedure ends.
  1721.  
  1722. See Also  GetKey
  1723.  
  1724. Example   
  1725.  
  1726. BEGIN
  1727.     DISPLAY_HELP;
  1728.     DELAYKEY(10000);
  1729.     CLRSCR;
  1730. END;
  1731.  
  1732. ___________________________________________________________________________
  1733.  
  1734. Delete_All_Topics                                                  NestTTT5
  1735.  
  1736.  
  1737. Purpose   Removes menu topics and disposes of the associated memory.
  1738.  
  1739. Decln.    Delete_All_Topics(var Menu:Nest_menu);
  1740.  
  1741. Remarks   Menu is the name of the menu variable storing the topics.
  1742.           
  1743.           This procedure should be called if the menu will no longer be
  1744.           used during the program execution.
  1745.  
  1746. See Also  Delete_A_Topic
  1747.  
  1748. Example   
  1749.  
  1750. BEGIN
  1751.     DELETE_ALL_TOPICS(BOBS_MENU);
  1752. END;
  1753.  
  1754.  
  1755. ___________________________________________________________________________
  1756.  
  1757. Delete_A_Topic                                                     NestTTT5
  1758.  
  1759.  
  1760. Purpose   Removes a menu topic and disposes of the associated memory.
  1761.  
  1762. Decln.    Delete_a_Topic(var Menu:Nest_menu; Topic:byte);
  1763.  
  1764. Remarks   Menu is the name of the menu variable storing the topic.
  1765.           Topic is the number of the topic which is being removed.
  1766.  
  1767. See Also  Delete_All_Topics
  1768.  
  1769. Example   
  1770.  
  1771. BEGIN
  1772.     DELETE_A_TOPICS(BOBS_MENU,12);
  1773. END;
  1774.  
  1775. ___________________________________________________________________________
  1776.  
  1777. DisplayMenu                                                        MenuTTT5
  1778.  
  1779.  
  1780. Purpose   Displays a superb looking menu!
  1781.  
  1782. Decln.    DisplayMenu(MenuDef:Menu_Record;W:boolean;var Choice,
  1783.           ECode:integer);
  1784.  
  1785. Remarks   MenuDef is the name of the menu record variable.
  1786.           W indicates if the menu should be removed and the original screen
  1787.           contents restored upon menu completion.
  1788.           Choice is returned with the user's menu selection.
  1789.           ECode is set to 0 for successful menu selection and 1 if the user
  1790.           escaped.
  1791.  
  1792. See Also  Menu_Set
  1793.  
  1794. Example   
  1795.  
  1796. VAR
  1797.   MAIN_MENU : MENU_RECORD;
  1798.   CHOICE, ERROR : BYTE;
  1799. BEGIN
  1800.     MENU_SET(MAIN_MENU);
  1801.     WITH MAIN_MENU DO
  1802.     BEGIN
  1803.         HEADING1 := 'MAIN MENU';
  1804.         TOPIC[1] := ' LOAD ';
  1805.         TOPIC[2] := ' SAVE ';
  1806.         TOPIC[3] := ' PRINT ';
  1807.         TOPIC[4] := ' QUIT ';
  1808.         TOTALPICKS := 4;
  1809.     END;
  1810.  
  1811.     CHOICE := 1;
  1812.     REPEAT
  1813.          DISPLAYMENU(MAIN_MENU,FALSE,CHOICE,ERROR);
  1814.          CASE CHOICE OF
  1815.          1 : LOAD_STUFF;
  1816.          2 : SAVE_STUFF;
  1817.          3 : PRINT_STUFF;
  1818.          4 : EXIT_PROC;
  1819.          END;
  1820.     UNTIL TRUE=FALSE;
  1821. END;
  1822.  
  1823. ___________________________________________________________________________
  1824.  
  1825. Display_All_Fields                                                   IOTTT5
  1826.  
  1827.  
  1828. Purpose   Displays the input fields.
  1829.  
  1830. Decln.    Display_All_Fields;
  1831.  
  1832. Remarks   Normally the input fields are not displayed on the screen until
  1833.           the Process_Input procedure is called. This procedure will
  1834.           display the fields without putting the user into input mode.
  1835.  
  1836. See Also  Process_Input;
  1837.  
  1838. Example   
  1839.  
  1840. BEGIN
  1841.     DISPLAY_ALL_FIELDS;
  1842. END;
  1843.  
  1844. ___________________________________________________________________________
  1845.  
  1846. Display_Directory                                                   DirTTT5
  1847.  
  1848.  
  1849. Purpose   Displays a Sidekick Plus style directory and allows the user to
  1850.           select a file or change directories.
  1851.  
  1852. Decln.    Display_Directory(PathMask:StrScreen;var Ecode : integer):
  1853.           StrScreen;
  1854.  
  1855. Returns   StrScreen
  1856.  
  1857. Remarks   PathMask is a string containing a DOS compatible file mask. The
  1858.           string may include drive/path.
  1859.           Ecode is updated with the following possible values:
  1860.           
  1861.           0    Successful completion
  1862.           1    User escaped
  1863.           2    Not enough memory
  1864.           99   Unexpected error
  1865.  
  1866.  
  1867. Example   
  1868.  
  1869. VAR
  1870.    ECODE :INTEGER;
  1871.    FNAME : STRING;
  1872. BEGIN
  1873.     FNAME := DISPLAY_DIRECTORY('C:\TTT5\*.PAS',ECODE);
  1874. END;
  1875.  
  1876. ___________________________________________________________________________
  1877.  
  1878. DisposeScreen                                                       WinTTT5
  1879.  
  1880.  
  1881. Purpose   Disposes of memory that was used to store a screen image.
  1882.  
  1883. Decln.    DisposeScreen(Page:byte);
  1884.  
  1885. Remarks   Page is the number of the screen to be disposed.
  1886.           
  1887.           If a saved/virtual screen has been restored and is no longer
  1888.           required, call this procedure to dispose of the saved image and
  1889.           free the associated memory.
  1890.  
  1891. See Also  CreateScreen, SaveScreen, RestoreScreen
  1892.  
  1893. Example   
  1894.  
  1895. BEGIN
  1896.     SAVESCREEN(1);
  1897.     ....
  1898.     {SOME STATEMENTS THAT MODIFY THE CODE}
  1899.     ....
  1900.     RESTORESCREEN(1);
  1901.     DISPOSESCREEN(1);
  1902. END;
  1903.  
  1904. ___________________________________________________________________________
  1905.  
  1906. Dispose_Fields                                                       IOTTT5
  1907.  
  1908.  
  1909. Purpose   Disposes of the memory used by all the input fields in the active
  1910.           table.
  1911.  
  1912. Decln.    Dispose_Fields;
  1913.  
  1914. Remarks   This procedure removes all the field information for the active
  1915.           table. The variables assigned to the fields are not affected.
  1916.           This procedure should only be called after the last input session
  1917.           has been terminated.
  1918.  
  1919. See Also  Create_Fields, Dispose_Tables
  1920.  
  1921. Example   
  1922.  
  1923.  
  1924. BEGIN
  1925.     ....
  1926.     PROCESS_INPUT(1);
  1927.     DISPOSE_FIELDS;
  1928. END;
  1929.  
  1930. ___________________________________________________________________________
  1931.  
  1932. Dispose_Tables                                                       IOTTT5
  1933.  
  1934.  
  1935. Purpose   Disposes of the memory used by all the input tables.
  1936.  
  1937. Decln.    Dispose_Tables;
  1938.  
  1939. Remarks   All the tables are initialized, and the memory they used is
  1940.           disposed of. Only call this procedure when all IO activity for
  1941.           the current session has ceased.
  1942.  
  1943. See Also  Create_Tables, Dispose_Fields
  1944.  
  1945. Example   
  1946.  
  1947. BEGIN
  1948.     ACTIVATE_TABLE(1);
  1949.     DISPOSE_FIELDS;
  1950.     ACTIVATE_TABLE(2);
  1951.     DISPOSE_FIELDS;
  1952.     ACTIVATE_TABLE(3);
  1953.     DISPOSE_FIELDS;
  1954.     DISPOSE_TABLES;
  1955.  
  1956. ___________________________________________________________________________
  1957.  
  1958. EGAVGASystem                                                       FastTTT5
  1959.  
  1960.  
  1961. Purpose   Indicates if the system is equipped with an EGA or VGA display.
  1962.  
  1963. Decln.    EGAVGASystem:boolean
  1964.  
  1965. Returns   Boolean
  1966.  
  1967. Remarks   Returns true if the system is equipped with an EGA or VGA card
  1968.           and monitor.
  1969.  
  1970. See Also  ColorScreen
  1971.  
  1972. Example   
  1973.  
  1974. BEGIN
  1975.     IF EGAVGASYSTEM THEN
  1976.        SETCONDENSEDLINES
  1977.     ELSE
  1978.        FWRITELN('CANNOT DISPLAY MORE LINES - THE SYSTEM IS TOO CHEAP!');
  1979. END;
  1980.  
  1981.  
  1982. ___________________________________________________________________________
  1983.  
  1984. Exist                                                              MiscTTT5
  1985.  
  1986.  
  1987. Purpose   Indicates whether a file exists.
  1988.  
  1989. Decln.    Exist(Filename:string):boolean;
  1990.  
  1991. Returns   Boolean
  1992.  
  1993. Remarks   FileName is the name of the file being checked. If may contain
  1994.           wild card characters, i.e. the function will return true if any
  1995.           file is found matching the wild card template. The function will
  1996.           find any file type including readonly, directory, hidden, system,
  1997.           etc.
  1998.  
  1999. Example   
  2000.  
  2001. BEGIN
  2002.     IF NOT EXIST('C:\AUTOEXEC.BAT') THEN
  2003.        BEEP;
  2004. END;
  2005.  
  2006. ___________________________________________________________________________
  2007.  
  2008. ExtractWords                                                       StrnTTT5
  2009.  
  2010.  
  2011. Purpose   Returns a number of specified words from a string.
  2012.  
  2013. Decln.    ExtractWords(Start,Count:byte;Str:string):string;
  2014.  
  2015. Returns   String
  2016.  
  2017. Remarks   Start is the number of the first word to extract.
  2018.           Count is the number of words to extract.
  2019.           Str is the source string.
  2020.  
  2021. See Also  PosWord, WordCnt
  2022.  
  2023. Example   
  2024.  
  2025. VAR LASTBIT : STRING;
  2026. BEGIN
  2027.     LASTBIT := EXTRACTWORDS(4,3,'WHO THE HELL SAYS CENSORSHIP IS GOOD!');
  2028. END;
  2029.  
  2030. ___________________________________________________________________________
  2031.  
  2032. FastWrite                                                          FastTTT5
  2033.  
  2034.  
  2035. Purpose   Writes a string to the screen very quickly.
  2036.  
  2037.  
  2038. Decln.    Fastwrite(X,Y,A:byte;St:StrScreen);
  2039.  
  2040. Remarks   X, Y are the coordinates of the first character.
  2041.           A is the display attribute.
  2042.           St is the text to display.
  2043.           
  2044.           WriteAT should be used in preference to Fastwrite because it is
  2045.           passed the foreground and background color attributes separately,
  2046.           rather than the combined attribute.
  2047.  
  2048. See Also  WriteAT, ColWrite, PlainWrite, FWrite, FwriteLN
  2049.  
  2050. Example   
  2051.  
  2052. BEGIN
  2053.     FASTWRITE(1,1,14,'TOP LEFT OF SCREEN');
  2054.     FASTWRITE(69,25,ATTR(15,4),'BOTTOM RIGHT');
  2055. END;
  2056.  
  2057. ___________________________________________________________________________
  2058.  
  2059. FBox                                                               FastTTT5
  2060.  
  2061.  
  2062. Purpose   Draws a filled box on the screen.
  2063.  
  2064. Decln.    FBox(X1,Y1,X2,Y2,F,B,BoxType:byte)
  2065.  
  2066. Remarks   X1, Y1 are the coordinates of the top left corner of the area to
  2067.           be changed.
  2068.           X2, Y2 are the lower right corner coordinates.
  2069.           F, B are the foreground and background colors.
  2070.           BoxType is a code to indicate the box type: 0 no box, 1 single
  2071.           line box, 2 double line box, 3 single top/bottom and double
  2072.           sides, 4 double top/bottom and single sides. If a box type in the
  2073.           range 5..255 is used, the box is drawn using the ASCII character
  2074.           represented by that number.
  2075.           
  2076.           The area of the display inside the Box border is cleared.
  2077.  
  2078. See Also  Box, GrowFBox
  2079.  
  2080. Example   
  2081.  
  2082. BEGIN
  2083.     CLRSCR;
  2084.     FBOX(1,1,80,20,LIGHTCYAN,RED,2);
  2085. END;
  2086.  
  2087.  
  2088. ___________________________________________________________________________
  2089.  
  2090. Field_Rules                                                          IOTTT5
  2091.  
  2092.  
  2093. Purpose   Defines the input characteristics of a field.
  2094.  
  2095. Decln.    Field_Rules(ID:byte;Rules:word;AChar,DChar:IOCharSet);
  2096.  
  2097. Remarks   ID is the field ID number.
  2098.           Rules is a word that indicates the display characteristics of the
  2099.           field. There are 5 different field Rules:
  2100.                ALLOWNULL
  2101.                SUPPRESSZERO
  2102.                RIGHTJUSTIFY
  2103.                ERASEDEFAULT
  2104.                JUMPIFFULL
  2105.           The desired attributes are summed to give the combined field
  2106.           Rules.
  2107.           AChar is a set of allowable characters that the user will be able
  2108.           to input. Set it to [#0] for the default characters.
  2109.           DChar is a set of characters that the user will not be able to
  2110.           input. Set it to No_Char (defined as [#0]) for the default
  2111.           characters.
  2112.  
  2113. See Also  Set_Default_Rules
  2114.  
  2115. Example   
  2116.  
  2117. BEGIN
  2118.     FIELD_RULES(2,ALLOWNULL+SUPPRESSZERO,NO_CHAR,['*','?']);
  2119.     FIELD_RULES(3,RIGHTJUSTIFY,NO_CHAR,NO_CHAR);
  2120. END;
  2121.  
  2122. ___________________________________________________________________________
  2123.  
  2124. File_Directory                                                     MiscTTT5
  2125.  
  2126.  
  2127. Purpose   Extracts the path section from a fully qualified filename.
  2128.  
  2129. Decln.    File_Directory(FullName:string):string;
  2130.  
  2131. Returns   String
  2132.  
  2133. Remarks   This function is only available to the Turbo 5.0 programmer.
  2134.           
  2135.           FullName is the source filename.
  2136.           
  2137.           If the path is not the root directory, the last backslash '\' is
  2138.           removed.
  2139.  
  2140. See Also  File_Drive, File_Ext, File_name
  2141.  
  2142. Example   
  2143.  
  2144.  
  2145. VAR
  2146.   F : STRING;
  2147. BEGIN
  2148.     F := FILE_DIRECTORY('C:\TURBO5\TTT5\MISCTTT5.PAS');
  2149. END;
  2150.  
  2151. F is assigned the value "\TURBO\TTT5".
  2152.  
  2153. ___________________________________________________________________________
  2154.  
  2155. File_Drive                                                         MiscTTT5
  2156.  
  2157.  
  2158. Purpose   Extracts the drive from a fully qualified filename.
  2159.  
  2160. Decln.    File_Drive(FullName:string):string;
  2161.  
  2162. Returns   String
  2163.  
  2164. Remarks   This function is only available to the Turbo 5.0 programmer.
  2165.           
  2166.           FullName is the source filename.
  2167.           
  2168.           If the filename does not include a drive, a null string '' is
  2169.           returned. The colon ':' is removed (sorry Ronnie).
  2170.  
  2171. See Also  File_Directory, File_Ext, File_Name
  2172.  
  2173. Example   
  2174.  
  2175. VAR
  2176.   F : STRING;
  2177. BEGIN
  2178.     F := FILE_DRIVE('C:\TURBO5\TTT5\MISCTTT5.PAS');
  2179. END;
  2180.  
  2181. F is assigned the value "C".
  2182.  
  2183. ___________________________________________________________________________
  2184.  
  2185. File_Ext                                                           MiscTTT5
  2186.  
  2187.  
  2188. Purpose   Extracts the file extension from a fully qualified filename.
  2189.  
  2190. Decln.    File_Ext(FullName:string):string;
  2191.  
  2192. Returns   String
  2193.  
  2194. Remarks   This function is only available to the Turbo 5.0 programmer.
  2195.           
  2196.           FullName is the source filename.
  2197.           
  2198.           The period is removed.
  2199.  
  2200.  
  2201. See Also  File_Drive, File_Directory, File_Name
  2202.  
  2203. Example   
  2204.  
  2205. VAR
  2206.   F : STRING;
  2207. BEGIN
  2208.     F := FILE_EXT('C:\TURBO5\TTT5\MISCTTT5.PAS');
  2209. END;
  2210.  
  2211. F is assigned the value "PAS".
  2212.  
  2213. ___________________________________________________________________________
  2214.  
  2215. File_Name                                                          MiscTTT5
  2216.  
  2217.  
  2218. Purpose   Extracts the file name, excluding the extension, from a fully
  2219.           qualified filename.
  2220.  
  2221. Decln.    File_Name(FullName:string):string;
  2222.  
  2223. Returns   String
  2224.  
  2225. Remarks   This function is only available to the Turbo 5.0 programmer.
  2226.           
  2227.           FullName is the source filename.
  2228.  
  2229. See Also  File_Drive, File_Directory, File_Ext
  2230.  
  2231. Example   
  2232.  
  2233. VAR
  2234.   F : STRING;
  2235. BEGIN
  2236.     F := FILE_NAME('C:\TURBO5\TTT5\MISCTTT5.PAS');
  2237. END;
  2238.  
  2239. F is assigned the value "MISCTTT5".
  2240.  
  2241. ___________________________________________________________________________
  2242.  
  2243. File_Size                                                          MiscTTT5
  2244.  
  2245.  
  2246. Purpose   Returns the size of a file in bytes.
  2247.  
  2248. Decln.    File_Size(Filename:string):LongInt
  2249.  
  2250. Returns   Longint
  2251.  
  2252. Remarks   FileName is the source filename.
  2253.           
  2254.           If the file is not found, a file size of -1 is returned.
  2255.  
  2256.  
  2257. See Also  Exist
  2258.  
  2259. Example   
  2260.  
  2261. VAR
  2262.   S : LONGINT;
  2263. BEGIN
  2264.     S := FILE_SIZE('C:\COMMAND.COM');
  2265. END;
  2266.  
  2267. ___________________________________________________________________________
  2268.  
  2269. FillScreen                                                          WinTTT5
  2270.  
  2271.  
  2272. Purpose   Fills part or all of the screen with a specific character.
  2273.  
  2274. Decln.    FillScreen(X1,Y1,X2,Y2,F,B:byte;Chr:char);
  2275.  
  2276. Remarks   X1, Y1 are the coordinates of the top left corner of the area to
  2277.           be filled.
  2278.           X2, Y2 are the coordinates of the lower right corner.
  2279.           F, B are the foreground and background display colors.
  2280.           Chr is the character to fill the screen.
  2281.  
  2282. See Also  ClearText, Attrib
  2283.  
  2284. Example   
  2285.  
  2286. BEGIN
  2287.     FILLSCREEN(1,1,80,25,CYAN,BLACK,CHR(177));
  2288. END;
  2289.  
  2290. ___________________________________________________________________________
  2291.  
  2292. FindCursor                                                          WinTTT5
  2293.  
  2294.  
  2295. Purpose   Determines the size and location of the cursor.
  2296.  
  2297. Decln.    FindCursor(var X,Y,Top,Bot:byte);
  2298.  
  2299. Remarks   The four parameters must be variables.
  2300.           
  2301.           X, Y are updated with the coordinates of the cursor.
  2302.           Top, Bot are updated with the top and bottom cursor scan lines.
  2303.           
  2304.           The scan codes refer to the actual location of the top and bottom
  2305.           of the cursor within a character field, where 0 is the top of the
  2306.           field (such as the top stroke of the letter T), and either 12 or
  2307.           7 is the bottom of the field, on monochrome and color displays
  2308.           respectively.
  2309.  
  2310. See Also  SizeCursor, OnCursor, OffCursor, HalfCursor, FullCursor
  2311.  
  2312.  
  2313. Example   
  2314.  
  2315. VAR
  2316.   COL,ROW,T,B : BYTE;
  2317. BEGIN
  2318.     FINDCURSOR(COL,ROW,T,B);
  2319. END;
  2320.  
  2321. ___________________________________________________________________________
  2322.  
  2323. First                                                              StrnTTT5
  2324.  
  2325.  
  2326. Purpose   Extracts the first part of a string.
  2327.  
  2328. Decln.    First(N:byte;Str:string):string;
  2329.  
  2330. Returns   String
  2331.  
  2332. Remarks   N is the number of leftmost characters to extract.
  2333.           Str is the source string.
  2334.  
  2335. See Also  Last
  2336.  
  2337. Example   
  2338.  
  2339. VAR
  2340.   F : STRING;
  2341. BEGIN
  2342.     F := FIRST(25,'ALL GOOD THINGS WILL COME TO PASS');
  2343. END;
  2344.  
  2345. The string F is assigned the value "All good things will come".
  2346.  
  2347. ___________________________________________________________________________
  2348.  
  2349. First_Capital                                                      StrnTTT5
  2350.  
  2351.  
  2352. Purpose   Returns the first capital letter in a string.
  2353.  
  2354. Decln.    First_Capital(Str:string):char;
  2355.  
  2356. Returns   Char
  2357.  
  2358. Remarks   Str is the source string.
  2359.           
  2360.           The function returns a null #0 if the string does not contain any
  2361.           capital letters.
  2362.  
  2363. See Also  First_Capital_Pos
  2364.  
  2365. Example   
  2366.  
  2367.  
  2368. VAR
  2369.   CAP : CHAR;
  2370. BEGIN
  2371.     CAP := FIRST_CAPITAL('3 LOAD');
  2372. END;
  2373.  
  2374. The variable Cap is updated with the value 'L'.
  2375.  
  2376. ___________________________________________________________________________
  2377.  
  2378. First_Capital_Pos                                                  StrnTTT5
  2379.  
  2380.  
  2381. Purpose   Returns the character positon of the first capital letter.
  2382.  
  2383. Decln.    First_Capital_Pos(Str:string):byte;
  2384.  
  2385. Returns   Byte
  2386.  
  2387. Remarks   Str is the source string.
  2388.           
  2389.           0 is returned if the string does not contain a capital letter.
  2390.  
  2391. See Also  First_Capital
  2392.  
  2393. Example   
  2394.  
  2395. VAR
  2396.   P : BYTE;
  2397. BEGIN
  2398.     P := FIRST_CAPITAL_POS('3 LOAD');
  2399. END;
  2400.  
  2401. The variable P is assigned the value 3.
  2402.  
  2403. ___________________________________________________________________________
  2404.  
  2405. FlushKeyBuffer                                                     MiscTTT5
  2406.  
  2407.  
  2408. Purpose   Removes all keystrokes from the keyboard buffer.
  2409.  
  2410. Decln.    FlushKeyBuffer;
  2411.  
  2412. Remarks   Use this procedure to stop the type ahead effect.
  2413.  
  2414. See Also  GetKey
  2415.  
  2416. Example   
  2417.  
  2418. VAR
  2419.   ANS : CHAR;
  2420. BEGIN
  2421.     FWRITE(1,1,WHITE,RED,'YOU REALLY WANT TO FORMAT THE SERVER? (Y/N)');
  2422.     FLUSHKEYBUFFER;
  2423.  
  2424.     ANS := GETKEY;
  2425.     IF UPCASE(ANS) = 'Y' THEN
  2426.        FORMATSERVER;
  2427. END;
  2428.  
  2429. The keyboard is flushed in case the user had previously typed a Y in
  2430. anticipation of a different question.
  2431.  
  2432. ___________________________________________________________________________
  2433.  
  2434. FullCursor                                                          WinTTT5
  2435.  
  2436.  
  2437. Purpose   Changes the text cursor to a full block.
  2438.  
  2439. Decln.    FullCursor;
  2440.  
  2441. Remarks   Sets the cursor on monochrome and color systems.
  2442.  
  2443. See Also  SizeCursor, HalfCursor, OnCursor, OffCursor.
  2444.  
  2445. Example   
  2446.  
  2447. BEGIN
  2448.     IF OVERTYPEMODE THEN
  2449.        FULLCURSOR;
  2450. END;
  2451.  
  2452. ___________________________________________________________________________
  2453.  
  2454. Future_date                                                        MiscTTT5
  2455.  
  2456.  
  2457. Purpose   Returns the date string by adding a specified number of days to a
  2458.           start date.
  2459.  
  2460. Decln.    Future_date(BaseDate:string; Fmt:byte;Days:word):string;
  2461.  
  2462. Returns   String
  2463.  
  2464. Remarks   BaseDate is the start date in string form.
  2465.           Fmt is the date format code of the date. The valid date formats
  2466.           are declared as constants in the MiscTTT5 unit:
  2467.                DDMMYY
  2468.                MMDDYY
  2469.                MMYY
  2470.                MMYYYY
  2471.                DDMMYYYY
  2472.                MMDDYYYY
  2473.           Days is the number of days from the BaseDate to the computed
  2474.           date.
  2475.  
  2476. See Also  Date_Within_Range, Valid_date, Date_to_Julian
  2477.  
  2478. Example   
  2479.  
  2480.  
  2481. BEGIN
  2482.     WRITEAT(1,1,14,0,'THE BILL IS DUE
  2483. '+FUTURE_DATE('07/06/89',MMDDYY,60)+'.');
  2484. END;
  2485.  
  2486.  The function computes the date that is 60 days after 07/06/89.
  2487.  
  2488. ___________________________________________________________________________
  2489.  
  2490. FWriteLn                                                           FastTTT5
  2491.  
  2492.  
  2493. Purpose   Writes text at current cursor location and moves cursor to
  2494.           beginning of next line.
  2495.  
  2496. Decln.    FWriteLn(Str:strScreen);
  2497.  
  2498. Remarks   Str is the text to be displayed.
  2499.           
  2500.           The text is displayed in the FCol and Bcol colors, the same as
  2501.           ColWrite.
  2502.  
  2503. See Also  ColWrite, FWrite
  2504.  
  2505. Example   
  2506.  
  2507. BEGIN
  2508.     CLRSCR;
  2509.     FCOL := YELLOW;
  2510.     BCOL := BLACK;
  2511.     FWRITELN('REMEMBER TO TYPE EXIT TO RETURN');
  2512.     FWRITELN('TO THE SPREADSHEET.');
  2513. END;
  2514.  
  2515. ___________________________________________________________________________
  2516.  
  2517. FWrite                                                             FastTTT5
  2518.  
  2519.  
  2520. Purpose   Writes text at current cursor location and moves cursor to the
  2521.           end of the text.
  2522.  
  2523. Decln.    FWrite(Str:strscreen);
  2524.  
  2525. Remarks   Str is the text to be displayed.
  2526.           
  2527.           The text is displayed in the FCol and Bcol colors, the same as
  2528.           ColWrite.
  2529.  
  2530. See Also  ColWrite, FWriteLn
  2531.  
  2532. Example   
  2533.  
  2534. VAR
  2535.  
  2536.   CH : CHAR;
  2537. BEGIN
  2538.     FWRITE('DELETE THE FILE? (Y/N)');
  2539.     CH := GETKEY;
  2540.     .....
  2541. END;
  2542.  
  2543. ___________________________________________________________________________
  2544.  
  2545. GetKey                                                              KeyTTT5
  2546.  
  2547.  
  2548. Purpose   Reads a character from the keyboard or mouse.
  2549.  
  2550. Decln.    GetKey:char;
  2551.  
  2552. Returns   Char
  2553.  
  2554. Remarks   This is the main function in the KeyTTT5 unit and is used
  2555.           throughout the Toolkit.
  2556.           
  2557.           This is a fully functional replacement for Turbo's internal
  2558.           ReadKey command. Both typed characters and mouse activity are
  2559.           returned. Refer to the appendix for a full list of all the
  2560.           character codes that are returned.
  2561.  
  2562. See Also  DelayKey, FlushKeyBuffer
  2563.  
  2564. Example   
  2565.  
  2566. VAR
  2567.   CH : CHAR;
  2568. BEGIN
  2569.     WRITECENTER(25,LIGHTCYAN,BLUE,'PRESS F10 TO CONTINUE');
  2570.     CH := GETKEY;
  2571.     IF CH <> #196 THEN
  2572.        HALT;
  2573. END;
  2574.  
  2575. The character code for F10 is #196. (See Appendix.)
  2576.  
  2577. ___________________________________________________________________________
  2578.  
  2579. GetScreenAttr                                                       WinTTT5
  2580.  
  2581.  
  2582. Purpose   Returns the display attribute (colors) at a specific location on
  2583.           the screen.
  2584.  
  2585. Decln.    GetScreenAttr(X,Y:byte):byte;
  2586.  
  2587. Returns   Byte
  2588.  
  2589. Remarks   X, Y are the screen coordinates.
  2590.           
  2591.  
  2592.           The display color is returned as a combined foreground/background
  2593.           attribute.
  2594.  
  2595. See Also  GetScreenChar
  2596.  
  2597. Example   
  2598.  
  2599. VAR
  2600.   OLDATT:BYTE
  2601. BEGIN
  2602.     OLDATT := GETSCREENATTR(1,1);
  2603. END;
  2604.  
  2605. The variable OldAtt is assigned the color attribute of the top left corner
  2606. of the display.
  2607.  
  2608. ___________________________________________________________________________
  2609.  
  2610. GetScreenChar                                                       WinTTT5
  2611.  
  2612.  
  2613. Purpose   Returns the display character at a specific location on the
  2614.           display.
  2615.  
  2616. Decln.    GetScreenChar(X,Y:byte):char;
  2617.  
  2618. Returns   Char
  2619.  
  2620. Remarks   X, Y are the screen coordinates.
  2621.  
  2622. See Also  GetScreenAttr, GetScreenStr
  2623.  
  2624. Example   
  2625.  
  2626. VAR
  2627.   OLDCHAR;
  2628. BEGIN
  2629.     OLDCHAR := GETSCREENCHAR(20,5);
  2630. END;
  2631.  
  2632. The variable OldChar is assign the character that is displayed in column 20
  2633. on line 5.
  2634.  
  2635. ___________________________________________________________________________
  2636.  
  2637. GetScreenStr                                                        WinTTT5
  2638.  
  2639.  
  2640. Purpose   Updates a string with the characters displayed at a specific
  2641.           location on the monitor.
  2642.  
  2643. Decln.    GetScreenStr(X1,X2,Y:byte;var Str:StrScreen);
  2644.  
  2645. Remarks   X1, X2 are the leftmost and rightmost X coordinates.
  2646.           Y is the line number.
  2647.  
  2648.           Str is the string variable that will be updated with the screen
  2649.           string.
  2650.  
  2651. See Also  GetScreenAttr, GetScreenChar
  2652.  
  2653. Example   
  2654.  
  2655. VAR
  2656.   S : STRING;
  2657. BEGIN
  2658.     GETSCREENSTR(30,48,1,S);
  2659.     IF S <> 'TECHNOJOCK SOFTWARE' THEN
  2660.     BEGIN
  2661.         FWRITELN('ILLEGAL COPYRIGHT NOTICE - ABORTING');
  2662.         HALT;
  2663.     END;
  2664. END;
  2665.  
  2666. ___________________________________________________________________________
  2667.  
  2668. Get_Mouse_Action                                                    KeyTTT5
  2669.  
  2670.  
  2671. Purpose   Determines mouse activity, i.e. movement and button presses.
  2672.  
  2673. Decln.    Get_Mouse_Action(var But:button;var Hor,Ver:integer);
  2674.  
  2675. Remarks   But is updated with one of the following constants: NoB, LeftB,
  2676.           RightB, BothB.
  2677.           Hor, Ver are updated with the mouse movement in columns and rows
  2678.           (not pixels). The movement is returned relative to the last time
  2679.           the procedure was called.
  2680.  
  2681. See Also  Mouse_Installed
  2682.  
  2683. Example   
  2684.  
  2685. VAR
  2686.   B : BUTTON;
  2687.   X,Y : BYTE;
  2688. BEGIN
  2689.     REPEAT
  2690.          GET_MOUSE_ACTION(B,X,Y);
  2691.     UNTIL B = LEFTB;
  2692. END;
  2693.  
  2694. The program continues looping until the left button is pressed.
  2695.  
  2696. ___________________________________________________________________________
  2697.  
  2698. GrowFBox                                                           FastTTT5
  2699.  
  2700.  
  2701. Purpose   Draws an exploding box.
  2702.  
  2703.  
  2704. Decln.    GrowFBox(X1,Y1,X2,Y2,F,B,BoxType:Byte);
  2705.  
  2706. Remarks   X1, Y1 are the coordinates of the top left corner of the area to
  2707.           be changed.
  2708.           X2, Y2 are the lower right corner coordinates.
  2709.           F, B are the foreground and background colors.
  2710.           BoxType is a code to indicate the box type: 0 no box, 1 single
  2711.           line box, 2 double line box, 3 single top/bottom and double
  2712.           sides, 4 double top/bottom and single sides. If a box type in the
  2713.           range 5..255 is used, the box is drawn using the ASCII character
  2714.           represented by that number.
  2715.           
  2716.           The area of the display inside the Box border is cleared.
  2717.           
  2718.           If the box grows too quickly or too slowly, alter the global
  2719.           variable Speed. The default value is 200; increase the value to
  2720.           slow the speed (ugh!) or decrease it to speed the box up.
  2721.  
  2722. See Also  Box, FBox
  2723.  
  2724. Example   
  2725.  
  2726. BEGIN
  2727.     SPEED := 400;
  2728.     GROWFBOX(1,1,80,12,WHITE,RED,1);
  2729.     GROWFBOX(1,13,80,25,BLUE,LIGHTGRAY,2);
  2730. END;
  2731.  
  2732. ___________________________________________________________________________
  2733.  
  2734. GrowMkWin                                                           WinTTT5
  2735.  
  2736.  
  2737. Purpose   Creates a text window on the screen and saves the screen contents
  2738.           that have been overlayed. This procedure is the functional
  2739.           equivalent of MkWin, except that the window box explodes onto the
  2740.           screen.
  2741.  
  2742. Decln.    GrowMkWin(X1,Y1,X2,Y2,F,B,BoxType:byte);
  2743.  
  2744. Remarks   X1, Y1 are the top left coordinates of the window.
  2745.           X2, Y2 are the bottom right coordinates of the window.
  2746.           F, B are the foreground and background display colors.
  2747.           BoxType is the box code. The normal box codes are:
  2748.                0    Box
  2749.                1    Single line
  2750.                2    Double Line
  2751.                3    Single top/bottom and double sides
  2752.                4    Double top/bottom and double sides
  2753.                5    Same as code 0 plus a box shadow
  2754.                6    Same as code 1 plus a box shadow
  2755.                7    Same as code 2 plus a box shadow
  2756.                8    Same as code 3 plus a box shadow
  2757.                9    Same as code 4 plus a box shadow
  2758.           If any other code (i.e. 10..255) is used, the box is drawn using
  2759.  
  2760.           the ASCII character represented by the number.
  2761.           
  2762.           If the box grows too quickly or too slowly, alter the global
  2763.           variable Speed. The default value is 200; increase the value to
  2764.           slow the speed or decrease it to speed the box up.
  2765.  
  2766. See Also  MkWin, RmWin
  2767.  
  2768. Example   
  2769.  
  2770. BEGIN
  2771.     SPEED := 400;
  2772.     GROWMKWIN(1,1,80,12,WHITE,RED,1);
  2773. END;
  2774.  
  2775. ___________________________________________________________________________
  2776.  
  2777. HalfCursor                                                          WinTTT5
  2778.  
  2779.  
  2780. Purpose   Changes the cursor to a half block.
  2781.  
  2782. Decln.    HalfCursor;
  2783.  
  2784. Remarks   Sets the cursor on monochrome and color systems.
  2785.  
  2786. See Also  SizeCursor, FullCursor, OnCursor, OffCursor.
  2787.  
  2788. Example   
  2789.  
  2790. BEGIN
  2791.     IF INSERTMODE THEN
  2792.        HALFCURSOR;
  2793. END;
  2794.  
  2795. ___________________________________________________________________________
  2796.  
  2797. Hide_Mouse_Cursor                                                   KeyTTT5
  2798.  
  2799.  
  2800. Purpose   Makes the mouse cursor invisible.
  2801.  
  2802. Decln.    Hide_Mouse_Cursor;
  2803.  
  2804. Remarks   The mouse is still active, but will not be visible. The text
  2805.           cursor is not affected by this procedure.
  2806.  
  2807. See Also  Show_Mouse_Cursor;
  2808.  
  2809. Example   
  2810.  
  2811. BEGIN
  2812.     HIDE_MOUSE_CURSOR;
  2813. END;
  2814.  
  2815.  
  2816. ___________________________________________________________________________
  2817.  
  2818. HorizLine                                                          FastTTT5
  2819.  
  2820.  
  2821. Purpose   Draws a horizontal line on the screen.
  2822.  
  2823. Decln.    HorizLine(X1,X2,Y,F,B,LineType:byte);
  2824.  
  2825. Remarks   X1, X2 are the leftmost and rightmost X coordinates of the line.
  2826.           Y is the Y coordinate.
  2827.           F, B are the foreground and background display colors.
  2828.           LineType is 1 for a single line and 2 for a double line.
  2829.  
  2830. See Also  VertLine, Box
  2831.  
  2832. Example   
  2833.  
  2834. BEGIN
  2835.     HORIZLINE(10,70,13,LIGHTCYAN,BLUE,1);
  2836. END;
  2837.  
  2838. Draws a single line across the center of the display.
  2839.  
  2840. ___________________________________________________________________________
  2841.  
  2842. Initialize_Menu                                                    NestTTT5
  2843.  
  2844.  
  2845. Purpose   Initializes a menu variable in preparation for the addition of
  2846.           topics.
  2847.  
  2848. Decln.    Initialize_Menu(var M:Nest_menu;Tit:MenuStr;W:byte;L:word);
  2849.  
  2850. Remarks   M is the menu variable being initialized.
  2851.           Tit is an optional title for the menu.
  2852.           W is the width of the menu box. If a width 0 is used, the Toolkit
  2853.           will determine a suitable width.
  2854.           L is the number of visible menu lines (or topics) to display in
  2855.           the menu window. If L is set to 0, the Toolkit will determine a
  2856.           suitable value.
  2857.  
  2858. See Also  Add_Topic
  2859.  
  2860. Example   
  2861.  
  2862. VAR
  2863.   MAIN_MENU,
  2864.   FILE_MENU,
  2865.   MISC_MENU: NEST_MENU
  2866. BEGIN
  2867.     INITIALIZE_MENU(MAIN_MENU,'MAIN MENU',15,5);
  2868.     INITIALIZE_MENU(FILE_MENU,'FILE COMMANDS',0,0);
  2869.     INITIALIZE_MENU(MISC_MENU,'POT POURRI',0,20);
  2870. END;
  2871.  
  2872.  
  2873. ___________________________________________________________________________
  2874.  
  2875. Integer_Field                                                        IOTTT5
  2876.  
  2877.  
  2878. Purpose   Assigns an integer variable to an input field.
  2879.  
  2880. Decln.    Integer_Field(ID:byte;var
  2881.           IVar:integer;Fmt:string;Min,Max:integer);
  2882.  
  2883. Remarks   ID is the field ID number.
  2884.           Ivar is the name of the integer variable that will be updated
  2885.           with the user's input.
  2886.           Fmt is the format of the input field. Pass a null string '' for
  2887.           the default.
  2888.           Min, Max are the minimum and maximum values for range check. Set
  2889.           to 0 to accept any integer value.
  2890.           
  2891.           The field must be declared with Add_Field prior to calling this
  2892.           procedure.
  2893.  
  2894. See Also  Add_Field, Word_Field, Byte_Field, LongInt_Field, Real_Field,
  2895.           Date_Field, String_Field
  2896.  
  2897. Example   
  2898.  
  2899. BEGIN
  2900.     ACTIVATE_TABLE(3);
  2901.     INTEGER_FIELD(3, LENGTH, '', 0,0);
  2902.     INTEGER_FIELD(4, WIDTH, '', 1,5000);
  2903. END;
  2904.  
  2905. ___________________________________________________________________________
  2906.  
  2907. Int_to_Str                                                         StrnTTT5
  2908.  
  2909.  
  2910. Purpose   Converts a byte, word, integer or longint to a string.
  2911.  
  2912. Decln.    Int_to_Str(Number:longint):string;
  2913.  
  2914. Returns   String
  2915.  
  2916. Remarks   Number is the value to be converted.
  2917.  
  2918. See Also  Real_to_Str, Str_to_Int
  2919.  
  2920. Example   
  2921.  
  2922.  
  2923. VAR
  2924.   SALARY : STRING;
  2925. BEGIN
  2926.     SALARY := INT_TO_STR(50000);
  2927. END;
  2928.  
  2929.  
  2930. ___________________________________________________________________________
  2931.  
  2932. Julian_to_Date                                                     MiscTTT5
  2933.  
  2934.  
  2935. Purpose   Converts a Julian date into a string.
  2936.  
  2937. Decln.    Julian_to_Date(J:dates;Fmt:byte):string;
  2938.  
  2939. Returns   String
  2940.  
  2941. Remarks   J is the date in Julian form.
  2942.           Fmt is the date format code of the date. The valid date formats
  2943.           are declared as constants in the MISCTTT5 unit:
  2944.                DDMMYY
  2945.                MMDDYY
  2946.                MMYY
  2947.                MMYYYY
  2948.                DDMMYYYY
  2949.                MMDDYYYY
  2950.  
  2951. See Also  Date_to_Julian
  2952.  
  2953. Example   
  2954.  
  2955. BEGIN
  2956.     FWRITE(JULIAN_TO_DATE(TODAY_IN_JULIAN,MMDDYYYY));
  2957. END;
  2958.  
  2959. ___________________________________________________________________________
  2960.  
  2961. LastPos                                                            StrnTTT5
  2962.  
  2963.  
  2964. Purpose   Finds the last occurence of a character in a string.
  2965.  
  2966. Decln.    LastPos(C:char;Str:string):byte;
  2967.  
  2968. Returns   Byte
  2969.  
  2970. Remarks   C is the character.
  2971.           Str is the source string.
  2972.  
  2973. See Also  Pos (Internal Turbo function)
  2974.  
  2975. Example   
  2976.  
  2977. VAR
  2978.   B : BYTE;
  2979. BEGIN
  2980.     B := LASTPOS('J','TECHNOJOCK SOFTWARE!');
  2981. END;
  2982.  
  2983. The variable B is assigned the value 12.
  2984.  
  2985.  
  2986. ___________________________________________________________________________
  2987.  
  2988. Last                                                               StrnTTT5
  2989.  
  2990.  
  2991. Purpose   Extracts the last part of a string.
  2992.  
  2993. Decln.    Last(Count:byte; Str:string):string;
  2994.  
  2995. Returns   String
  2996.  
  2997. Remarks   Count is the number of characters to extract.
  2998.           Str is the source string.
  2999.  
  3000. See Also  First
  3001.  
  3002. Example   
  3003.  
  3004. VAR
  3005.   TTT : STRING;
  3006. BEGIN
  3007.     TTT := LAST(11,'NEVER TAKE DRUGS!');
  3008. END;
  3009.  
  3010.  The string TTT is assigned the value "Take Drugs!".
  3011.  
  3012. ___________________________________________________________________________
  3013.  
  3014. LeftShift_Pressed                                                   KeyTTT5
  3015.  
  3016.  
  3017. Purpose   Determines whether the Left shift key is being depressed.
  3018.  
  3019. Decln.    LeftShift_Pressed:boolean;
  3020.  
  3021. Returns   Boolean
  3022.  
  3023. Remarks   Returns true if the left shift key is being depressed.
  3024.  
  3025. See Also  RightShift_Pressed, Shift_Pressed
  3026.  
  3027. Example   
  3028.  
  3029. BEGIN
  3030.     IF LEFTSHIFT_PRESSED THEN
  3031.        WRITEAT(1,25,YELLOW,BLACK,CHR(24));
  3032. END;
  3033.  
  3034. ___________________________________________________________________________
  3035.  
  3036. LongInt_Field                                                        IOTTT5
  3037.  
  3038.  
  3039. Purpose   Assigns a longint variable to an input field.
  3040.  
  3041.  
  3042. Decln.    LongInt_Field(ID:byte;var
  3043.           LVar:longint;Fmt:string;Min,Max:longint);
  3044.  
  3045. Remarks   ID is the field ID number.
  3046.           Lvar is the name of the longint variable that will be updated
  3047.           with the user's input.
  3048.           Fmt is the format of the input field. Pass a null string '' for
  3049.           the default.
  3050.           Min, Max are the minimum and maximum values for range check. Set
  3051.           to 0 to accept any longint value.
  3052.           
  3053.           The field must be declared with Add_Field prior to calling this
  3054.           procedure.
  3055.  
  3056. See Also  Add_Field, Word_Field, Byte_Field, Integer_Field, Real_Field,
  3057.           Date_Field, String_Field
  3058.  
  3059. Example   
  3060.  
  3061. BEGIN
  3062.     ACTIVATE_TABLE(3);
  3063.     LONGINT_FIELD(5, AREA, '', 1000,60000);
  3064.     LONGINT_FIELD(6, VOLUME, '', 0,0);
  3065. END;
  3066.  
  3067. ___________________________________________________________________________
  3068.  
  3069. Lower                                                              StrnTTT5
  3070.  
  3071.  
  3072. Purpose   Converts a string to lower case.
  3073.  
  3074. Decln.    Lower(Str:string):string;
  3075.  
  3076. Returns   String
  3077.  
  3078. Remarks   Str is the source string.
  3079.           
  3080.           Only the upper case alphabet A to Z is affected.
  3081.  
  3082. See Also  Upper, Proper
  3083.  
  3084. Example   
  3085.  
  3086. VAR
  3087.   TTT : STRING
  3088. BEGIN
  3089.     TTT := LOWER('LEARNING TO TYPE');
  3090. END;
  3091.  
  3092. The variable TTT is assigned the value "learning to type".
  3093.  
  3094.  
  3095. ___________________________________________________________________________
  3096.  
  3097. Menu_Set                                                           MenuTTT5
  3098.  
  3099.  
  3100. Purpose   Sets a menu variable with the Toolkit default values.
  3101.  
  3102. Decln.    Menu_Set(var M:Menu_Record);
  3103.  
  3104. Remarks   M is the Menu_Record variable that will define the menu display
  3105.           characteristics.
  3106.  
  3107. See Also  DisplayMenu
  3108.  
  3109. Example   
  3110.  
  3111. VAR
  3112.   MAIN ; MENU_RECORD;
  3113. BEGIN
  3114.     MENU_SET(MAIN);
  3115. END;
  3116.  
  3117. The variable Main is set with the default menu settings.
  3118.  
  3119. ___________________________________________________________________________
  3120.  
  3121. MkWin                                                               WinTTT5
  3122.  
  3123.  
  3124. Purpose   Creates a text window on the screen and saves the screen contents
  3125.           that have been overlayed.
  3126.  
  3127. Decln.    MkWin(X1,Y1,X2,Y2,F,B,BoxType:byte);
  3128.  
  3129. Remarks   X1, Y1 are the top left coordinates of the window.
  3130.           X2, Y2 are the bottom right coordinates of the window.
  3131.           F, B are the foreground and background display colors.
  3132.           BoxType is the box code. The normal box codes are:
  3133.                0    Box
  3134.                1    Single line
  3135.                2    Double Line
  3136.                3    Single top/bottom and double sides
  3137.                4    Double top/bottom and double sides
  3138.                5    Same as code 0 plus a box shadow
  3139.                6    Same as code 1 plus a box shadow
  3140.                7    Same as code 2 plus a box shadow
  3141.                8    Same as code 3 plus a box shadow
  3142.                9    Same as code 4 plus a box shadow
  3143.           If any other code (i.e. 10..255) is used, the box is drawn using
  3144.           the ASCII character represented by the number.
  3145.  
  3146. See Also  GrowMkWin, RmWin
  3147.  
  3148. Example   
  3149.  
  3150.  
  3151. BEGIN
  3152.     MKWIN(1,1,40,7,WHITE,BLUE,4);
  3153. END;
  3154.  
  3155. A white on blue window is displayed in the top left area of the display.
  3156.  
  3157. ___________________________________________________________________________
  3158.  
  3159. Modify_Topic                                                       NestTTT5
  3160.  
  3161.  
  3162. Purpose   To change all the settings of a menu topic.
  3163.  
  3164. Decln.    Modify_Topic(var
  3165.           M:Nest_Menu;TopicNo:word;N:MenuStr;A:Boolean;Key:char;code:intege
  3166.           r;Sub:MenuPtr);
  3167.  
  3168. Remarks   M is the name of the menu variable that contains the topic.
  3169.           TopicNo is the number of the topic to be modified.
  3170.           N is the topic text, i.e. the string that will be displayed in
  3171.           the menu.
  3172.           A indicates if the topic is selectable or non-selectable. Set to
  3173.           true for normal selectable topics.
  3174.           Key is the character code of a hotkey that can be used to execute
  3175.           the topic. Set to #0 to disable the hotkey.
  3176.           Code is an integer code that will be passed to the despatcher
  3177.           procedure to indicate that the user selected this topic. Set the
  3178.           code to zero if a sub-menu is going to be called.
  3179.           Sub is the address of a sub-menu that is to be called if the
  3180.           topic is selected. Set to NIL if the topic executes a despatcher
  3181.           procedure rather than displaying a sub-menu.
  3182.  
  3183. See Also  Add_Topic, Modify_Topic_Name, Modify_Topic_Active,
  3184.           Modify_Topic_Hotkey, Modify_Topic_Retcode, Modify_Topic_Submenu
  3185.  
  3186. Example   
  3187.  
  3188. BEGIN
  3189.     MODIFY_TOPIC(BOBS_MENU,3,'FILE LOAD',TRUE,#166,300,NIL);
  3190. END;
  3191.  
  3192. ___________________________________________________________________________
  3193.  
  3194. Modify_Topic_Active                                                NestTTT5
  3195.  
  3196.  
  3197. Purpose   Modifies the activity status of a topic.
  3198.  
  3199. Decln.    Modify_Topic_Active(var M:Nest_Menu;TopicNo:word;Active:Boolean);
  3200.  
  3201. Remarks   M is the name of the menu variable that contains the topic.
  3202.           TopicNo is the number of the topic to be modified.
  3203.           Active indicates if the topic is selectable or non-selectable.
  3204.           Set to true for normal selectable topics.
  3205.           
  3206.  
  3207.  
  3208. See Also  Add_Topic, Modify_Topic_Name, Modify_Topic, Modify_Topic_Hotkey,
  3209.           Modify_Topic_Retcode, Modify_Topic_Submenu
  3210.  
  3211. Example   
  3212.  
  3213. BEGIN
  3214.     MODIFY_TOPIC_ACTIVE(BOBS_MENU,7,TRUE);
  3215. END;
  3216.  
  3217. ___________________________________________________________________________
  3218.  
  3219. Modify_Topic_HotKey                                                NestTTT5
  3220.  
  3221.  
  3222. Purpose   Modifies the hotkey selection code of a topic.
  3223.  
  3224. Decln.    Modify_Topic_Hotkey(var M:Nest_Menu;TopicNo:word;Key:char);
  3225.  
  3226. Remarks   M is the name of the menu variable that contains the topic.
  3227.           TopicNo is the number of the topic to be modified.
  3228.           Key is the character code of a hotkey that can be used to execute
  3229.           the topic. Set to #0 to disable the hotkey.
  3230.  
  3231. See Also  Add_Topic, Modify_Topic_Name, Modify_Topic_Active, Modify_Topic,
  3232.           Modify_Topic_Retcode, Modify_Topic_Submenu
  3233.  
  3234. Example   
  3235.  
  3236. BEGIN
  3237.     MODIFY_TOPIC_HOTKEY(BOBS_MENU,1,#146);
  3238. END;
  3239.  
  3240. ___________________________________________________________________________
  3241.  
  3242. Modify_Topic_Name                                                  NestTTT5
  3243.  
  3244.  
  3245. Purpose   Modifies the topic description.
  3246.  
  3247. Decln.    Modify_Topic_Name(var M:Nest_Menu;TopicNo:word;Txt:MenuStr);
  3248.  
  3249. Remarks   M is the name of the menu variable that contains the topic.
  3250.           TopicNo is the number of the topic to be modified.
  3251.           Txt is the topic text, i.e. the string that will be displayed in
  3252.           the menu.
  3253.  
  3254. See Also  Add_Topic, Modify_Topic, Modify_Topic_Active,
  3255.           Modify_Topic_HotKey, Modify_Topic_Retcode, Modify_Topic_Submenu
  3256.  
  3257. Example   
  3258.  
  3259. BEGIN
  3260.     MODIFY_TOPIC_NAME(BOBS_MENU,3,'INSERT OFF');
  3261. END;
  3262.  
  3263.  
  3264. ___________________________________________________________________________
  3265.  
  3266. Modify_Topic_Retcode                                               NestTTT5
  3267.  
  3268.  
  3269. Purpose   Modifies the topic code that is passed to the despatcher when the
  3270.           topic is selected.
  3271.  
  3272. Decln.    Modify_Topic_Retcode(var M:Nest_Menu;TopicNo:word;Retcode:char);
  3273.  
  3274. Remarks   M is the name of the menu variable that contains the topic.
  3275.           TopicNo is the number of the topic to be modified.
  3276.           RetCode is an integer code that will be passed to the despatcher
  3277.           procedure to indicate that the user selected this topic. Set the
  3278.           code to zero if a sub-menu is going to be called.
  3279.  
  3280. See Also  Add_Topic, Modify_Topic, Modify_Topic_Active,
  3281.           Modify_Topic_HotKey, Modify_Topic_Name, Modify_Topic_Submenu
  3282.  
  3283. Example   
  3284.  
  3285. BEGIN
  3286.     MODIFY_TOPIC_RETCODE(BOBS_MENU,11,400);
  3287. END;
  3288.  
  3289. ___________________________________________________________________________
  3290.  
  3291. Modify_Topic_Submenu                                               NestTTT5
  3292.  
  3293.  
  3294. Purpose   Modifies the Topic pointer to a sub-menu.
  3295.  
  3296. Decln.    Modify_Topic_SubMenu(var M:Nest_Menu;TopicNo:word;Sub:MenuPtr);
  3297.  
  3298. Remarks   M is the name of the menu variable that contains the topic.
  3299.           TopicNo is the number of the topic to be modified.
  3300.           Sub is the address of a sub-menu that is to be called if the
  3301.           topic is selected.  Use the '@' argument to pass the address of a
  3302.           menu, e.g. @Print_menu. Set to NIL if the topic executes a
  3303.           despatcher procedure rather than displaying a sub-menu.
  3304.  
  3305. See Also  Add_Topic, Modify_Topic, Modify_Topic_Active,
  3306.           Modify_Topic_HotKey, Modify_Topic_Retcode, Modify_Topic_Name
  3307.  
  3308. Example   
  3309.  
  3310. BEGIN
  3311.     MODIFY_TOPIC_SUBMENU(BOBS_MENU,3,@FILE_MENU);
  3312. END;
  3313.  
  3314.  
  3315. ___________________________________________________________________________
  3316.  
  3317. Mouse_Installed                                                     KeyTTT5
  3318.  
  3319.  
  3320. Purpose   Indicates if a Microsoft compatible mouse is installed.
  3321.  
  3322. Decln.    Mouse_Installed:boolean;
  3323.  
  3324. Returns   Boolean
  3325.  
  3326. Remarks   This procedure is automatically called when the program is loaded
  3327.           and updates the global boolean variable Moused. Check the
  3328.           variable Moused in preference to calling this procedure.
  3329.  
  3330. ___________________________________________________________________________
  3331.  
  3332. MoveScreenBlock                                                     WinTTT5
  3333.  
  3334.  
  3335. Purpose   Moves one part of the screen to another part of the display.
  3336.  
  3337. Decln.    MoveScreenBlock(X1,Y1,X2,Y2,X,Y:byte);
  3338.  
  3339. Remarks   X1, Y1 are the coordinates of the top left corner of the source
  3340.           area.
  3341.           X2, Y2 are the coordinates of the bottom right corner of the
  3342.           source area.
  3343.           X, Y are the coordinates of the top left corner of the target
  3344.           area.
  3345.           
  3346.           The source area of the screen is replaced with spaces, i.e.
  3347.           blanked out.
  3348.  
  3349. See Also  CopyScreenBlock
  3350.  
  3351. Example   
  3352.  
  3353. BEGIN
  3354.     MOVESCREENBLOCK(1,1,80,3,1,22)
  3355. END;
  3356.  
  3357. ___________________________________________________________________________
  3358.  
  3359. Move_Mouse                                                          KeyTTT5
  3360.  
  3361.  
  3362. Purpose   Repositions the mouse cursor.
  3363.  
  3364. Decln.    Move_Mouse(X,Y:byte);
  3365.  
  3366. Remarks   X, Y are the new mouse coordinates.
  3367.           
  3368.           This procedure is the functional equivalent of GotoXY for the
  3369.           text cursor.
  3370.  
  3371.  
  3372. See Also  Confine_Mouse_Horiz, Confine_Mouse_Vert
  3373.  
  3374. Example   
  3375.  
  3376. BEGIN
  3377.     MOVE_MOUSE(40,10);
  3378. END;
  3379.  
  3380. ___________________________________________________________________________
  3381.  
  3382. NumOn                                                               KeyTTT5
  3383.  
  3384.  
  3385. Purpose   Indicates if the Num Lock key is on.
  3386.  
  3387. Decln.    NumOn:boolean;
  3388.  
  3389. Returns   Boolean
  3390.  
  3391. Remarks   Returns true if the Num Lock key is "illuminated".
  3392.  
  3393. See Also  Set_Num, CapsOn, ScrollOn
  3394.  
  3395. Example   
  3396.  
  3397. BEGIN
  3398.     IF NUMON THEN
  3399.        WRITEAT(70,1,WHITE,BLACK,'NUM')
  3400.     ELSE
  3401.        WRITEAT(70,1,WHITE,BLACK,'   ')
  3402. END;
  3403.  
  3404. ___________________________________________________________________________
  3405.  
  3406. OffCursor                                                           WinTTT5
  3407.  
  3408.  
  3409. Purpose   Makes the text cursor disappear.
  3410.  
  3411. Decln.    OffCursor;
  3412.  
  3413. Remarks   This procedure turns the cursor off on monochrome and color
  3414.           systems.
  3415.  
  3416. See Also  SizeCursor, HalfCursor, OnCursor, FullCursor
  3417.  
  3418. Example   
  3419.  
  3420. BEGIN
  3421.     OFFCURSOR;
  3422. END;
  3423.  
  3424.  
  3425. ___________________________________________________________________________
  3426.  
  3427. OnCursor                                                            WinTTT5 
  3428.  
  3429.  
  3430. Purpose   Makes the text cursor appear in the default DOS shape, i.e. an
  3431.           underscore.
  3432.  
  3433. Decln.    OnCursor;
  3434.  
  3435. Remarks   This procedure resets the cursor on monochrome and color systems.
  3436.  
  3437. See Also  SizeCursor, HalfCursor, OffCursor, FullCursor
  3438.  
  3439. Example   
  3440.  
  3441. BEGIN
  3442.     ONCURSOR;
  3443. END;
  3444.  
  3445. ___________________________________________________________________________
  3446.  
  3447. OverType                                                           StrnTTT5
  3448.  
  3449.  
  3450. Purpose   Combines two overlapping strings.
  3451.  
  3452. Decln.    OverType(N:byte;Source,Target:string):string;
  3453.  
  3454. Returns   String
  3455.  
  3456. Remarks   N is the character position that string Source will be overlayed
  3457.           on string Target.
  3458.           
  3459.           Any characters after the Nth position in string Target will be
  3460.           overwritten by the characters in string Source.
  3461.  
  3462. Example   
  3463.  
  3464. VAR
  3465.    TTT:STRING
  3466. BEGIN
  3467.     TTT := OVERTYPE(5,'TECHNOJOCK','BOB AINSBURY');
  3468. END;
  3469.  
  3470. The string TTT is assigned the value "Bob TechnoJock".
  3471.  
  3472. ___________________________________________________________________________
  3473.  
  3474. PadCenter                                                          StrnTTT5
  3475.  
  3476.  
  3477. Purpose   Expands and centers a string.
  3478.  
  3479. Decln.    PadCenter(Str:String;Size:byte;Pad:Char);string;
  3480.  
  3481.  
  3482. Returns   String
  3483.  
  3484. Remarks   Str is the source string.
  3485.           Size is the new string length.
  3486.           Pad is the character to expand the string with.
  3487.  
  3488. See Also  PadLeft, PadRight
  3489.  
  3490. Example   
  3491.  
  3492. VAR
  3493.   TTT:STRING;
  3494. BEGIN
  3495.     TTT := PADCENTER(' ASTERISK ',20,'*');
  3496. END;
  3497.  
  3498. The string TTT is assigned the value "***** ASTERISK *****".
  3499.  
  3500. ___________________________________________________________________________
  3501.  
  3502. Padleft                                                            StrnTTT5
  3503.  
  3504.  
  3505. Purpose   Expands and left justifies a string.
  3506.  
  3507. Decln.    PadLeft(Str:String;Size:byte;Pad:Char);string;
  3508.  
  3509. Returns   String
  3510.  
  3511. Remarks   Str is the source string.
  3512.           Size is the new string length.
  3513.           Pad is the character to expand the string with.
  3514.  
  3515. See Also  PadCenter, PadRight
  3516.  
  3517. Example   
  3518.  
  3519. VAR
  3520.   TTT:STRING;
  3521. BEGIN
  3522.     TTT := PADLEFT(' ASTERISK ',20,'*');
  3523. END;
  3524.  
  3525. The string TTT is assigned the value " ASTERISK **********".
  3526.  
  3527. ___________________________________________________________________________
  3528.  
  3529. PadRight                                                           StrnTTT5
  3530.  
  3531.  
  3532. Purpose   Expands and right justifies a string.
  3533.  
  3534. Decln.    PadRight(Str:String;Size:byte;Pad:Char);string;
  3535.  
  3536.  
  3537. Returns   String
  3538.  
  3539. Remarks   Str is the source string.
  3540.           Size is the new string length.
  3541.           Pad is the character to expand the string with.
  3542.  
  3543. See Also  PadCenter, PadLeft
  3544.  
  3545. Example   
  3546.  
  3547. VAR
  3548.   TTT:STRING;
  3549. BEGIN
  3550.     TTT := PADRIGHT(' ASTERISK ',20,'*');
  3551. END;
  3552.  
  3553. The string TTT is assigned the value "********** ASTERISK ".
  3554.  
  3555. ___________________________________________________________________________
  3556.  
  3557. PartRestoreScreen                                                   WinTTT5
  3558.  
  3559.  
  3560. Purpose   Restores a portion of a saved/virtual screen to the display.
  3561.  
  3562. Decln.    PartRestoreScreen(Page,X1,Y1,X2,Y2,X,Y:byte);
  3563.  
  3564. Remarks   Page is the saved/virtual screen number of the stored image.
  3565.           X1, Y1 are the top left coordinates of the area to be restored.
  3566.           X2, Y2 are the lower right coordinates of the area to be
  3567.           restored.
  3568.           X, Y are the top left coordinates of the target location on the
  3569.           visible screen.
  3570.           
  3571.           The screen can either be a saved screen created with SaveScreen
  3572.           or a virtual screen created with CreateScreen.
  3573.  
  3574. See Also  RestoreScreen, PartSlideRestoreScreen, SlideRestoreScreen
  3575.  
  3576. Example   
  3577.  
  3578. BEGIN
  3579.     SAVESCREEN(3);
  3580.     ....
  3581.     ..   {SCREEN MODIFYING PROCEDURES}
  3582.     ....
  3583.     PARTRESTORESCREEN(3,1,1,80,12,1,13);
  3584.     DISPOSESCREEN(3);
  3585. END;
  3586.  
  3587. The screen is saved to page 3 and then some other procedures modify the
  3588. display. Finally, the top half of the saved screen is restored to the lower
  3589. half of the screen display.
  3590.  
  3591.  
  3592. ___________________________________________________________________________
  3593.  
  3594. PartSlideRestoreScreen                                              WinTTT5
  3595.  
  3596.  
  3597. Purpose   Restores a portion of a saved/virtual screen to the display with
  3598.           a sliding effect.
  3599.  
  3600. Decln.    PartSlideRestoreScreen(Page:byte;Way:direction;X1,Y1,X2,Y2:byte);
  3601.  
  3602. Remarks   Page is the saved/virtual screen number of the stored image.
  3603.           Way is the direction to slide the restored image. Valid
  3604.           directions are Up, Down, Left, Right.
  3605.           X1, Y1 are the top left coordinates of the area to be restored.
  3606.           X2, Y2 are the lower right coordinates of the area to be
  3607.           restored.
  3608.           
  3609.           The screen can either be a saved screen created with SaveScreen
  3610.           or a virtual screen created with CreateScreen.
  3611.  
  3612.  
  3613.  
  3614. See Also  SlideRestoreScreen, RestoreScreen, PartRestoreScreen
  3615.  
  3616. Example   
  3617.  
  3618. BEGIN
  3619.     SAVESCREEN(3);
  3620.     ....
  3621.     ..   {SCREEN MODIFYING PROCEDURES}
  3622.     ....
  3623.     PARTSLIDERESTORESCREEN(3,UP,1,1,40,25);
  3624.     DISPOSESCREEN(3);
  3625. END;
  3626.  
  3627. The screen is saved to page 3 and then some other procedures modify the
  3628. display. Finally, the left half of the saved screen is restored by sliding
  3629. it up the display.
  3630.  
  3631. ___________________________________________________________________________
  3632.  
  3633. PlainWrite                                                         FastTTT5
  3634.  
  3635.  
  3636. Purpose   To write text to the screen very quickly in the default color
  3637.           attribute.
  3638.  
  3639. Decln.    PlainWrite(X,Y:byte;Str:string);
  3640.  
  3641. Remarks   X, Y are the coordinates of the first character.
  3642.           Str is the text to display.
  3643.           
  3644.  
  3645. See Also  WriteAt, ColWrite, Fwrite, FwriteLn
  3646.  
  3647.  
  3648. Example   
  3649.  
  3650. BEGIN
  3651.     CLEARTEXT(1,1,80,25,WHITE,BLUE);
  3652.     PLAINWRITE(1,1,'TOP LEFT OF SCREEN');
  3653.     PLAINWRITE(59,25,'LOWER RIGHT OF SCREEN');
  3654. END;
  3655.  
  3656. ___________________________________________________________________________
  3657.  
  3658. PosCursor                                                           WinTTT5
  3659.  
  3660.  
  3661. Purpose   Moves text cursor.
  3662.  
  3663. Decln.    PosCursor(X,Y:byte);
  3664.  
  3665. Remarks   X, Y are the new cursor coordinates.
  3666.           
  3667.           This is similar to Turbo's GotoXY procedure, except the Turbo
  3668.           "window" coordinates are ignored.
  3669.  
  3670. See Also  OffCursor, OnCursor, SizeCursor, FindCursor
  3671.  
  3672. Example   
  3673.  
  3674. BEGIN
  3675.     POSCURSOR(10,15);
  3676. END;
  3677.  
  3678. ___________________________________________________________________________
  3679.  
  3680. PosWord                                                            StrnTTT5
  3681.  
  3682.  
  3683. Purpose   Determines the starting character position of a word.
  3684.  
  3685. Decln.    PosWord(WordNo:byte;Str:string):byte;
  3686.  
  3687. Returns   Byte
  3688.  
  3689. Remarks   WordNo is the number of the word to check.
  3690.           Str is the source string.
  3691.           
  3692.           If there are too few words in the source string, a 0 is returned.
  3693.  
  3694. See Also  WordCnt, ExtractWords
  3695.  
  3696. Example   
  3697.  
  3698. VAR
  3699.   B:BYTE;
  3700. BEGIN
  3701.     B := POSWORD(3,'THE QUICK BROWN LINEBACKER');
  3702. END;
  3703.  
  3704. The variable B is assigned the value 11.
  3705.  
  3706.  
  3707. ___________________________________________________________________________
  3708.  
  3709. Printer_Ready                                                      MiscTTT5
  3710.  
  3711.  
  3712. Purpose   Indicates if the printer is connected and online.
  3713.  
  3714. Decln.    Printer_Ready:boolean;
  3715.  
  3716. Returns   Boolean
  3717.  
  3718. Remarks   This function only returns true if the printer is fully operative
  3719.           and in the Ready state. If the printer is not ready, use the
  3720.           procedure Printer_Status to determine the cause of the problem.
  3721.  
  3722. See Also  
  3723.  
  3724. Example   
  3725.  
  3726. BEGIN
  3727.     IF PRINTER_READY THEN
  3728.        PRINTSCREEN;
  3729. END;
  3730.  
  3731. ___________________________________________________________________________
  3732.  
  3733. Printer_Status                                                     MiscTTT5
  3734.  
  3735.  
  3736. Purpose   Returns the detailed status of the printer.
  3737.  
  3738. Decln.    Printer_Status:byte;
  3739.  
  3740. Returns   Byte
  3741.  
  3742. Remarks   The values returned by this function are:
  3743.           
  3744.           0    All is well!
  3745.           1    No paper
  3746.           2    Off Line
  3747.           3    Busy
  3748.           4    Unknown problem
  3749.  
  3750. See Also  Printer_Ready
  3751.  
  3752. Example   
  3753.  
  3754. BEGIN
  3755.     CASE PRINTER_STATUS OF
  3756.     0 : PRINT_REPORT;
  3757.     1 : FWRITELN('ADD PAPER TO THE PRINTER, IDIOT');
  3758.     2 : FWRITELN('PRESS THE ONLINE BUTTON ON THE PRINTER');
  3759.     3 : FWRITELN('PRINTER IS BUSY, PLEASE WAIT');
  3760.     4 : FWRITELN('PRINTER ERROR. CHECK IT OUT!');
  3761.     END;
  3762.  
  3763.  
  3764. ___________________________________________________________________________
  3765.  
  3766. PrintScreen                                                        MiscTTT5
  3767.  
  3768.  
  3769. Purpose   Emulates the Print Scrn key.
  3770.  
  3771. Decln.    PrintScreen;
  3772.  
  3773. Example   
  3774.  
  3775. BEGIN
  3776.     IF PRINTER_READY THEN
  3777.        PRINTSCREEN;
  3778. END;
  3779.  
  3780. ___________________________________________________________________________
  3781.  
  3782. Process_Input                                                        IOTTT5
  3783.  
  3784.  
  3785. Purpose   Initiates the user's full screen edit session.
  3786.  
  3787. Decln.    Process_Input(StartField:byte);
  3788.  
  3789. Remarks   StartField is the field ID number of the field that should be
  3790.           highlighted at the start of the edit session.
  3791.           
  3792.           This procedure must only be called after all the fields have been
  3793.           defined. The procedure controls the user's edit session.
  3794.           
  3795.           Control is returned to the calling program when the user ends the
  3796.           update session. The session is ended by the user pressing the end
  3797.           key (default F10), the Esc key (if escape is enabled), a Hooked
  3798.           procedure that returns a refresh code of End_Input or trying to
  3799.           move to the next field when the next field has been defined as
  3800.           zero.
  3801.           
  3802.           The global variable I_Char is updated with the last key pressed
  3803.           by the user.
  3804.  
  3805. See Also  Display_All_Fields
  3806.  
  3807. Example   
  3808.  
  3809. BEGIN
  3810.     PROCESS_INPUT(1);
  3811. END;
  3812.  
  3813. ___________________________________________________________________________
  3814.  
  3815. Proper                                                             StrnTTT5
  3816.  
  3817.  
  3818. Purpose   Converts a string to proper case, i.e. the first character of
  3819.           each word is capitalized.
  3820.  
  3821.  
  3822. Decln.    Proper(Str:string):string;
  3823.  
  3824. Returns   String
  3825.  
  3826. Remarks   Str is the source string.
  3827.  
  3828. See Also  Upper, Lower
  3829.  
  3830. Example   
  3831.  
  3832. VAR
  3833.   TTT : STRING
  3834. BEGIN
  3835.     TTT := PROPER('TECHNOJOCK SOFTWARE INC.');
  3836. END;
  3837.  
  3838. The variable TTT is assigned the value "Technojock Software, Inc.".
  3839.  
  3840. ___________________________________________________________________________
  3841.  
  3842. Pull_Menu                                                          PullTTT5
  3843.  
  3844.  
  3845. Purpose   Displays a pull down menu.
  3846.  
  3847. Decln.    Pull_menu(Def:Pull_array;var PickM, PickS:byte);
  3848.  
  3849. Remarks   Def is the string array containing the menu description, i.e. all
  3850.           the topics.
  3851.           PickM is the main menu topic that should be highlighted
  3852.           initially. It is returned with the main menu of the user's
  3853.           selection. If the user ESCapes, PickM is set to 0.
  3854.           PickS is the sub menu topic that should be highlighted initially.
  3855.           It is returned with the sub-topic selected by the user.
  3856.           
  3857.           The global variable PTTT controls the display characteristics of
  3858.           the menu. Modify this variable to alter the look and feel of the
  3859.           menu.
  3860.  
  3861. Example   
  3862.  
  3863. VAR
  3864.   MAJOR,MINOR : BYTE;
  3865. BEGIN
  3866.     MAJOR := 1;
  3867.     MINOR := 1;
  3868.     PULL_MENU(MYMENU,MAJOR,MINOR);
  3869. END;
  3870.  
  3871.  
  3872. ___________________________________________________________________________
  3873.  
  3874. Read_Alpha                                                         ReadTTT5
  3875.  
  3876.  
  3877. Purpose   Provides single line input of alpha characters, offering full
  3878.           line editing features, optional prompt display and optional box
  3879.           drawing.
  3880.  
  3881. Decln.    Read_Alpha(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  3882.           Str:strscreen);
  3883.  
  3884. Remarks   X, Y are the coordinates of the first character of the prompt or
  3885.           the first character of the input field if the prompt is null.
  3886.           L is the length of the input line.
  3887.           Prompt is an optional prompt. The prompt is normally displayed to
  3888.           the left of the input field. If the prompt begins with a carat
  3889.           '^' and the box border is on, the prompt is drawn in the upper
  3890.           box border. If the prompt begins with an underscore '_' and the
  3891.           box border is on, the prompt is drawn in the lower box border.
  3892.           Set the prompt to a null '' if no prompt is required.
  3893.           Box is a box code. The codes are the same as for the Box
  3894.           procedure in FastTTT5. To suppress the box, use a code of zero.
  3895.           Str is the string that will be updated with the user's input.
  3896.           
  3897.           The user will only be able to input normal alphabetic characters
  3898.           and spaces.
  3899.           
  3900.           The display characteristics of the input line are contained in
  3901.           the global variable RTTT.
  3902.           
  3903.           The global variable R_Char is updated with the last character
  3904.           pressed by the user. This can be checked to see how the user
  3905.           terminated input, e.g. Esc, Up Arrow, etc.
  3906.  
  3907. See Also  Read_String, Read_String_Upper, Read_YN
  3908.  
  3909. Example   
  3910.  
  3911. VAR
  3912.   TTT : STRSCREEN;
  3913. BEGIN
  3914.     TTT := '';
  3915.     READ_ALPHA(5,10,40,'ENTER YOUR NAME > ',1,TTT);
  3916. END;
  3917.  
  3918. ___________________________________________________________________________
  3919.  
  3920. Read_Byte                                                          ReadTTT5
  3921.  
  3922.  
  3923. Purpose   Provides single line input of a number of type byte.
  3924.  
  3925. Decln.    Read_Byte(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  3926.           Bvar:byte;Min,Max:byte);
  3927.  
  3928.  
  3929. Remarks   X, Y are the coordinates of the first character of the prompt or
  3930.           the first character of the input field if the prompt is null.
  3931.           L is the length of the input line.
  3932.           Prompt is an optional prompt. The prompt is normally displayed to
  3933.           the left of the input field. If the prompt begins with a carat
  3934.           '^' and the box border is on, the prompt is drawn in the upper
  3935.           box border. If the prompt begins with an underscore '_' and the
  3936.           box border is on, the prompt is drawn in the lower box border.
  3937.           Set the prompt to a null '' if no prompt is required.
  3938.           Box is a box code. The codes are the same as for the Box
  3939.           procedure in FastTTT5. To suppress the box, use a code of zero.
  3940.           Bvar is the byte variable that will be updated with the user's
  3941.           input.
  3942.           Min, Max are the minimum and maximum acceptable values for
  3943.           automatic range checking. Set the values to 0 to accept any byte
  3944.           value.
  3945.           
  3946.           The user will only be able to input number characters, and the
  3947.           value will be automatically validated to ensure it lies within
  3948.           the Min, Max range.
  3949.           
  3950.           The display characteristics of the input line are contained in
  3951.           the global variable RTTT.
  3952.           
  3953.           The global variable R_Char is updated with the last character
  3954.           pressed by the user. This can be checked to see how the user
  3955.           terminated input, e.g. Esc, Up Arrow, etc.
  3956.  
  3957. See Also  Read_Int, Read_Word, Read_LongInt, Read_Real.
  3958.  
  3959. Example   
  3960.  
  3961. VAR
  3962.   B : BYTE;
  3963. BEGIN
  3964.     READ_BYTE(1,10,3,'HOW OLD ARE YOU',0,B,1,120);
  3965. END;
  3966.  
  3967. ___________________________________________________________________________
  3968.  
  3969. Read_Int                                                           ReadTTT5
  3970.  
  3971.  
  3972. Purpose   Provides single line input of a number of type integer.
  3973.  
  3974. Decln.    Read_Int(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  3975.           Ivar:integer;Min,Max:integer);
  3976.  
  3977. Remarks   X, Y are the coordinates of the first character of the prompt or
  3978.           the first character of the input field if the prompt is null.
  3979.           L is the length of the input line.
  3980.           Prompt is an optional prompt. The prompt is normally displayed to
  3981.           the left of the input field. If the prompt begins with a carat
  3982.           '^' and the box border is on, the prompt is drawn in the upper
  3983.  
  3984.           box border. If the prompt begins with an underscore '_' and the
  3985.           box border is on, the prompt is drawn in the lower box border.
  3986.           Set the prompt to a null '' if no prompt is required.
  3987.           Box is a box code. The codes are the same as for the Box
  3988.           procedure in FastTTT5. To suppress the box, use a code of zero.
  3989.           Ivar is the integer variable that will be updated with the user's
  3990.           input.
  3991.           Min, Max are the minimum and maximum acceptable values for
  3992.           automatic range checking. Set the values to 0 to accept any
  3993.           integer value.
  3994.           
  3995.           The user will only be able to input number characters, and the
  3996.           value will be automatically validated to ensure it lies within
  3997.           the Min Max range.
  3998.           
  3999.           The display characteristics of the input line are contained in
  4000.           the global variable RTTT.
  4001.           
  4002.           The global variable R_Char is updated with the last character
  4003.           pressed by the user. This can be checked to see how the user
  4004.           terminated input, e.g. Esc, Up Arrow, etc.
  4005.  
  4006. See Also  Read_Byte, Read_Word, Read_LongInt, Read_Real.
  4007.  
  4008. Example   
  4009.  
  4010. VAR
  4011.   I: INTEGER;
  4012. BEGIN
  4013.     READ_INT(1,10,6,'',2,I,0,0);
  4014. END;
  4015.  
  4016. ___________________________________________________________________________
  4017.  
  4018. Read_Longint                                                       ReadTTT5
  4019.  
  4020.  
  4021. Purpose   Provides single line input of a number of type longint.
  4022.  
  4023. Decln.    Read_LongInt(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  4024.           Lvar:longint;Min,Max:longint);
  4025.  
  4026. Remarks   X, Y are the coordinates of the first character of the prompt or
  4027.           the first character of the input field if the prompt is null.
  4028.           L is the length of the input line.
  4029.           Prompt is an optional prompt. The prompt is normally displayed to
  4030.           the left of the input field. If the prompt begins with a carat
  4031.           '^' and the box border is on, the prompt is drawn in the upper
  4032.           box border. If the prompt begins with an underscore '_' and the
  4033.           box border is on, the prompt is drawn in the lower box border.
  4034.           Set the prompt to a null '' if no prompt is required.
  4035.           Box is a box code. The codes are the same as for the Box
  4036.           procedure in FastTTT5. To suppress the box, use a code of zero.
  4037.           Lvar is the longint variable that will be updated with the user's
  4038.           input.
  4039.  
  4040.           Min, Max are the minimum and maximum acceptable values for
  4041.           automatic range checking. Set the values to 0 to accept any
  4042.           longint value.
  4043.           
  4044.           The user will only be able to input number characters, and the
  4045.           value will be automatically validated to ensure it lies within
  4046.           the Min, Max range.
  4047.           
  4048.           The display characteristics of the input line are contained in
  4049.           the global variable RTTT.
  4050.           
  4051.           The global variable R_Char is updated with the last character
  4052.           pressed by the user. This can be checked to see how the user
  4053.           terminated input, e.g. Esc, Up Arrow, etc.
  4054.  
  4055. See Also  Read_Byte, Read_Word, Read_Int, Read_Int, Read_Real.
  4056.  
  4057. Example   
  4058.  
  4059. VAR
  4060.   LONGI: LONGINT;
  4061. BEGIN
  4062.     READ_LONG(1,10,9,'PICK A NUMBER ',1,LONGI,0,0);
  4063. END;
  4064.  
  4065. ___________________________________________________________________________
  4066.  
  4067. Read_Password                                                      ReadTTT5
  4068.  
  4069.  
  4070. Purpose   Provides single line input of alpha characters without echoing
  4071.           the user's characters on the screen.
  4072.  
  4073. Decln.    Read_Password(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  4074.           Str:strScreen);
  4075.  
  4076. Remarks   X, Y are the coordinates of the first character of the prompt or
  4077.           the first character of the input field if the prompt is null.
  4078.           L is the length of the input line.
  4079.           Prompt is an optional prompt. The prompt is normally displayed to
  4080.           the left of the input field. If the prompt begins with a carat
  4081.           '^' and the box border is on, the prompt is drawn in the upper
  4082.           box border. If the prompt begins with an underscore '_' and the
  4083.           box border is on, the prompt is drawn in the lower box border.
  4084.           Set the prompt to a null '' if no prompt is required.
  4085.           Box is a box code. The codes are the same as for the Box
  4086.           procedure in FastTTT5. To suppress the box, use a code of zero.
  4087.           Str is the string that will be updated with the user's input.
  4088.           
  4089.           Every time a character is input, a '#' character is echoed on the
  4090.           screen. This procedure is designed for password input.
  4091.           
  4092.           The display characteristics of the input line are contained in
  4093.           the global variable RTTT.
  4094.           
  4095.  
  4096.           The global variable R_Char is updated with the last character
  4097.           pressed by the user. This can be checked to see how the user
  4098.           terminated input, e.g. Esc, Up Arrow, etc.
  4099.  
  4100. See Also  Read_String, Read_Alpha
  4101.  
  4102. Example   
  4103.  
  4104. VAR
  4105.   PSW : STRING;
  4106. BEGIN
  4107.     READ_PASSWORD(20,25,20,'^ ENTER YOUR PASSWORD ',1,PSW');
  4108. END;
  4109.  
  4110. ___________________________________________________________________________
  4111.  
  4112. Read_Real                                                          ReadTTT5
  4113.  
  4114.  
  4115. Purpose   Provides single line input of a number of type real.
  4116.  
  4117. Decln.    Read_Real(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  4118.           Rvar:real;Min,Max:real);
  4119.  
  4120. Remarks   X, Y are the coordinates of the first character of the prompt or
  4121.           the first character of the input field if the prompt is null.
  4122.           L is the length of the input line.
  4123.           Prompt is an optional prompt. The prompt is normally displayed to
  4124.           the left of the input field. If the prompt begins with a carat
  4125.           '^' and the box border is on, the prompt is drawn in the upper
  4126.           box border. If the prompt begins with an underscore '_' and the
  4127.           box border is on, the prompt is drawn in the lower box border.
  4128.           Set the prompt to a null '' if no prompt is required.
  4129.           Box is a box code. The codes are the same as for the Box
  4130.           procedure in FastTTT5. To suppress the box, use a code of zero.
  4131.           Rvar is the real variable that will be updated with the user's
  4132.           input.
  4133.           Min, Max are the minimum and maximum acceptable values for
  4134.           automatic range checking. Set the values to 0 to accept any real
  4135.           value.
  4136.           
  4137.           The user will only be able to input number characters, and the
  4138.           value will be automatically validated to ensure it lies within
  4139.           the Min, Max range.
  4140.           
  4141.           The display characteristics of the input line are contained in
  4142.           the global variable RTTT.
  4143.           
  4144.           The global variable R_Char is updated with the last character
  4145.           pressed by the user. This can be checked to see how the user
  4146.           terminated input, e.g. Esc, Up Arrow, etc.
  4147.  
  4148. See Also  Read_Byte, Read_Word, Read_Int, Read_Int, Read_LongInt.
  4149.  
  4150. Example   
  4151.  
  4152.  
  4153. VAR
  4154.   R: REAL;
  4155. BEGIN
  4156.     READ_REAL(1,10,9,'TICKET PRICE',1,R,0,1199.99);
  4157. END;
  4158.  
  4159. ___________________________________________________________________________
  4160.  
  4161. Read_Select                                                        ReadTTT5
  4162.  
  4163.  
  4164. Purpose   Displays a horizontal or vertical list of choices.
  4165.  
  4166. Decln.    Read_Select(X,Y:byte;Prompt,Txt:StrScreen;var Choice:byte);
  4167.  
  4168. Remarks   X, Y are the coordinates of the first character of the prompt or
  4169.           the first character of the input field if the prompt is null.
  4170.           Prompt is an optional prompt. The prompt is normally displayed to
  4171.           the left of the input field. If the prompt begins with a carat
  4172.           '^' and the box border is on, the prompt is drawn in the upper
  4173.           box border. If the prompt begins with an underscore '_' and the
  4174.           box border is on, the prompt is drawn in the lower box border.
  4175.           Set the prompt to a null '' if no prompt is required.
  4176.           Txt is a string containing the list of choices. Each choice is
  4177.           separated by a space. If a choice is composed of more than one
  4178.           word, the words must be connected with the underscore '_'
  4179.           character. By default, the choices list is displayed horizontally
  4180.           across the screen. However, if the first character in the choices
  4181.           string is a carat '^', the list is displayed vertically.
  4182.           Choice is a byte variable that is updated with the value of the
  4183.           user's selected choice.
  4184.           
  4185.           The display characteristics of the input line are contained in
  4186.           the global variable RTTT.
  4187.           
  4188.           The global variable R_Char is updated with the last character
  4189.           pressed by the user. This can be checked to see how the user
  4190.           terminated input, e.g. Esc, Up Arrow, etc.
  4191.  
  4192. Example   
  4193.  
  4194. VAR
  4195.    VAR PICK : BYTE;
  4196. BEGIN
  4197.     READ_SELECT(10,5,'HOW YA DOIN','COOL OK BAD WILD FOXY',PICK);
  4198. END;
  4199.  
  4200. ___________________________________________________________________________
  4201.  
  4202. Read_String                                                        ReadTTT5
  4203.  
  4204.  
  4205. Purpose   Provides single line input of any characters, offering full line
  4206.           editing features, optional prompt display and optional box
  4207.  
  4208.           drawing.
  4209.  
  4210. Decln.    Read_String(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  4211.           Str:strscreen);
  4212.  
  4213. Remarks   X, Y are the coordinates of the first character of the prompt or
  4214.           the first character of the input field if the prompt is null.
  4215.           L is the length of the input line.
  4216.           Prompt is an optional prompt. The prompt is normally displayed to
  4217.           the left of the input field. If the prompt begins with a carat
  4218.           '^' and the box border is on, the prompt is drawn in the upper
  4219.           box border. If the prompt begins with an underscore '_' and the
  4220.           box border is on, the prompt is drawn in the lower box border.
  4221.           Set the prompt to a null '' if no prompt is required.
  4222.           Box is a box code. The codes are the same as for the Box
  4223.           procedure in FastTTT5. To suppress the box, use a code of zero.
  4224.           Str is the string that will be updated with the user's input.
  4225.           
  4226.           The display characteristics of the input line are contained in
  4227.           the global variable RTTT.
  4228.           
  4229.           The global variable R_Char is updated with the last character
  4230.           pressed by the user. This can be checked to see how the user
  4231.           terminated input, e.g. Esc, Up Arrow, etc.
  4232.  
  4233. See Also  Read_Alpha, Read_String_Upper, Read_YN
  4234.  
  4235. Example   
  4236.  
  4237. VAR
  4238.   TTT : STRSCREEN;
  4239. BEGIN
  4240.     TTT := '';
  4241.     READ_STRING(5,10,40,'STREET ADDRESS ===> ',1,TTT);
  4242. END;
  4243.  
  4244. ___________________________________________________________________________
  4245.  
  4246. Read_String_Upper                                                  ReadTTT5
  4247.  
  4248.  
  4249. Purpose   This procedure is the functional equivalent of Read_String,
  4250.           except all the alpha characters are converted to upper case.
  4251.           Refer to the Read_String procedure for further information.
  4252.  
  4253. ___________________________________________________________________________
  4254.  
  4255. Read_Word                                                          ReadTTT5
  4256.  
  4257.  
  4258. Purpose   Provides single line input of a number of type word.
  4259.  
  4260. Decln.    Read_Word(X,Y,L:byte;Prompt:strScreen;Box:byte;Var
  4261.           Wvar:word;Min,Max:word);
  4262.  
  4263.  
  4264. Remarks   X, Y are the coordinates of the first character of the prompt or
  4265.           the first character of the input field if the prompt is null.
  4266.           L is the length of the input line.
  4267.           Prompt is an optional prompt. The prompt is normally displayed to
  4268.           the left of the input field. If the prompt begins with a carat
  4269.           '^' and the box border is on, the prompt is drawn in the upper
  4270.           box border. If the prompt begins with an underscore '_' and the
  4271.           box border is on, the prompt is drawn in the lower box border.
  4272.           Set the prompt to a null '' if no prompt is required.
  4273.           Box is a box code. The codes are the same as for the Box
  4274.           procedure in FastTTT5. To suppress the box, use a code of zero.
  4275.           Wvar is the word variable that will be updated with the user's
  4276.           input.
  4277.           Min, Max are the minimum and maximum acceptable values for
  4278.           automatic range checking. Set the values to 0 to accept any word
  4279.           value.
  4280.           
  4281.           The user will only be able to input number characters, and the
  4282.           value will be automatically validated to ensure it lies within
  4283.           the Min, Max range.
  4284.           
  4285.           The display characteristics of the input line are contained in
  4286.           the global variable RTTT.
  4287.           
  4288.           The global variable R_Char is updated with the last character
  4289.           pressed by the user. This can be checked to see how the user
  4290.           terminated input, e.g. Esc, Up Arrow, etc.
  4291.  
  4292. See Also  Read_Byte, Read_Real, Read_Int, Read_Int, Read_LongInt.
  4293.  
  4294. Example   
  4295.  
  4296. VAR
  4297.   W:WORD;
  4298. BEGIN
  4299.     READ_WORD(1,10,9,'ENTER THE VOLUME ===> ',1,W,0,0);
  4300. END;
  4301.  
  4302. ___________________________________________________________________________
  4303.  
  4304. Read_YN                                                            ReadTTT5
  4305.  
  4306.  
  4307. Purpose   Prompts user for 'Y' or 'N' response.
  4308.  
  4309. Decln.    Read_YN(X,Y:byte;Prompt:strscreen;Box:byte;var Yes:boolean);
  4310.  
  4311. Remarks   X, Y are the coordinates of the first character of the prompt or
  4312.           the first character of the input field if the prompt is null.
  4313.           Prompt is an optional prompt. The prompt is normally displayed to
  4314.           the left of the input field. If the prompt begins with a carat
  4315.           '^' and the box border is on, the prompt is drawn in the upper
  4316.           box border. If the prompt begins with an underscore '_' and the
  4317.           box border is on, the prompt is drawn in the lower box border.
  4318.           Set the prompt to a null '' if no prompt is required.
  4319.  
  4320.           Box is a box code. The codes are the same as for the Box
  4321.           procedure in FastTTT5. To suppress the box, use a code of zero.
  4322.           Yes is the boolean variable that will be updated with the user's
  4323.           input.
  4324.           
  4325.           Only a Y or N response is accepted.
  4326.           
  4327.           The display characteristics of the input line are contained in
  4328.           the global variable RTTT.
  4329.           
  4330.           The global variable R_Char is updated with the last character
  4331.           pressed by the user. This can be checked to see how the user
  4332.           terminated input, e.g. Esc, Up Arrow, etc.
  4333.  
  4334. Example   
  4335.  
  4336. VAR
  4337.   OK : BOOLEAN;
  4338. BEGIN
  4339.     OK := FALSE;
  4340.     READ_YN(45,15,'DELETE THE FILE?',1,OK);
  4341. END;
  4342.  
  4343. ___________________________________________________________________________
  4344.  
  4345. ReadLine                                                           ReadTTT5
  4346.  
  4347.  
  4348. Purpose   Provides single line input facility with full editing.
  4349.  
  4350. Decln.    ReadLine(X,Y,L,F,B:byte;var Txt:string;var retcode:integer);
  4351.  
  4352. Remarks   X, Y are the coordinates of the first input character.
  4353.           L is the length of the input field.
  4354.           F, B are the foreground and background display colors.
  4355.           Txt is returned with the user's input.
  4356.           Retcode is returned with a 1 if the user ESCaped or 0 for
  4357.           successful completion.
  4358.           
  4359.           This procedure is included for compatibility with version 4.0 of
  4360.           the Toolkit. Read_String now offers more features.
  4361.  
  4362. See Also  Read_String
  4363.  
  4364. Example   
  4365.  
  4366. VAR
  4367.   THEFILE : STRING;
  4368.   CODE : INTEGER;
  4369. BEGIN
  4370.     THEFILE := '';
  4371.     WRITEAT(10,5,WHITE,BLACK,'ENTER FILENAME ===> ');
  4372.     REPEAT
  4373.          READLINE(33,5,12,BLACK,LIGHTGRAY,THEFILE,CODE);
  4374.     UNTIL CODE = 0;
  4375. END;
  4376.  
  4377.  
  4378. ___________________________________________________________________________
  4379.  
  4380. Real_Field                                                           IOTTT5
  4381.  
  4382.  
  4383. Purpose   Assigns a real variable to an input field.
  4384.  
  4385. Decln.    Real_Field(ID:byte;var RVar:real;Fmt:string;Min,Max:real);
  4386.  
  4387. Remarks   ID is the field ID number.
  4388.           Rvar is the name of the real variable that will be updated with
  4389.           the user's input.
  4390.           Fmt is the format of the input field. Pass a null string '' for
  4391.           the default.
  4392.           Min, Max are the minimum and maximum values for range check. Set
  4393.           to 0 to accept any real value.
  4394.           
  4395.           The field must be declared with Add_Field prior to calling this
  4396.           procedure.
  4397.  
  4398. See Also  Add_Field, Word_Field, Byte_Field, LongInt_Field, Integer_Field,
  4399.           Date_Field, String_Field
  4400.  
  4401. Example   
  4402.  
  4403. VAR
  4404.   PRICE, DISCOUNT:REAL;
  4405. BEGIN
  4406.     PRICE := 49.99;
  4407.     DISCOUNT := 9.5;
  4408.     REAL_FIELD(3, PRICE, '', 0,79.99);
  4409.     REAL_FIELD(4, DISCOUNT, '', 0,50);
  4410. END;
  4411.  
  4412. ___________________________________________________________________________
  4413.  
  4414. Real_to_SciStr                                                     StrnTTT5
  4415.  
  4416.  
  4417. Purpose   Converts a real to a string using scientific notation.
  4418.  
  4419. Decln.    Real_to_SciStr(Number:real;D:byte):string;
  4420.  
  4421. Returns   String
  4422.  
  4423. Remarks   Number is the real value to be converted.
  4424.           D is the number of decimal places.
  4425.  
  4426. See Also  Real_to_Str
  4427.  
  4428. Example   
  4429.  
  4430. BEGIN
  4431.     FWRITELN(REAL_TO_SCISTR(3.54609,2));
  4432. END;
  4433.  
  4434.  
  4435. ___________________________________________________________________________
  4436.  
  4437. Real_to_Str                                                        StrnTTT5
  4438.  
  4439.  
  4440. Purpose   Converts a real number to a string.
  4441.  
  4442. Decln.    Real_to_Str(Number:real;D:byte):string;
  4443.  
  4444. Returns   String
  4445.  
  4446. Remarks   Number is the real to be converted.
  4447.           
  4448.           D is the number of decimal places. If D is set to Floating (a
  4449.           constant in the Toolkit), then the actual number of significant
  4450.           decimal places will be used.
  4451.  
  4452. See Also  Real_to_SciStr, Str_to_Real
  4453.  
  4454. Example   
  4455.  
  4456. VAR
  4457.   TTT : STRING;
  4458. BEGIN
  4459.     TTT := REAL_TO_STR(12345.789990,2);
  4460. END;
  4461.  
  4462. The variable TTT is assigned the value "12345.79".
  4463.  
  4464. ___________________________________________________________________________
  4465.  
  4466. Replicate                                                          FastTTT5
  4467.  
  4468.  
  4469. Purpose   Constructs a string of repeated characters.
  4470.  
  4471. Decln.    Replicate(N:byte; Ch:char):string;
  4472.  
  4473. Returns   String
  4474.  
  4475. Remarks   N is the length of the returned string.
  4476.           Ch is the character to repeat.
  4477.           
  4478.           This procedure uses memory moves and is much faster than a for
  4479.           loop.
  4480.  
  4481. Example   
  4482.  
  4483. BEGIN
  4484.     FWRITE(REPLICATE(80,'*'));
  4485. END;
  4486.  
  4487. A line of 80 asterisks is written to the display.
  4488.  
  4489.  
  4490. ___________________________________________________________________________
  4491.  
  4492. Reset_Printer                                                      MiscTTT5
  4493.  
  4494.  
  4495. Purpose   Clears a printer back to the default settings.
  4496.  
  4497. Decln.    Reset_Printer;
  4498.  
  4499. Remarks   This procedure uses a unique technique that will reset most
  4500.           contemporary PC printers.
  4501.  
  4502. Example   
  4503.  
  4504. BEGIN
  4505.     RESET_PRINTER;
  4506. END;
  4507.  
  4508. ___________________________________________________________________________
  4509.  
  4510. Reset_StartUp_Mode                                                  WinTTT5
  4511.  
  4512.  
  4513. Purpose   Resets the display mode and cursor style to the state they were
  4514.           in when the program started.
  4515.  
  4516. Decln.    Reset_StartUp_Mode;
  4517.  
  4518. Remarks   It is good practice to call this procedure at the end of a
  4519.           program. The user will get the same cursor shape and screen mode
  4520.           that he/she was using before he/she ran the program.
  4521.  
  4522. Example   
  4523.  
  4524. BEGIN
  4525.     RESET_STARTUP_MODE;
  4526.     HALT;
  4527. END;
  4528.  
  4529. ________________________________________________________
  4530.  
  4531. RestoreScreen                                                       WinTTT5
  4532.  
  4533.  
  4534. Purpose   Restores a virtual/saved screen to the visible display.
  4535.  
  4536. Decln.    RestoreScreen(Page:byte);
  4537.  
  4538. Remarks   Page is the saved/virtual screen number of the stored image.
  4539.           
  4540.           The screen can either be a saved screen created with SaveScreen
  4541.           or a virtual screen created with CreateScreen.
  4542.  
  4543. See Also  PartRestoreScreen, PartSlideRestoreScreen, SlideRestoreScreen
  4544.  
  4545.  
  4546. Example   
  4547.  
  4548. BEGIN
  4549.     SAVESCREEN(3);
  4550.     ....
  4551.     ..   {SCREEN MODIFYING PROCEDURES}
  4552.     ....
  4553.     RESTORESCREEN(3);
  4554.     DISPOSESCREEN(3);
  4555. END;
  4556.  
  4557. The screen is saved to page 3, and some other procedures modify the
  4558. display. The saved screen is then restored and the saved image is disposed.
  4559.  
  4560. ___________________________________________________________________________
  4561.  
  4562. RightShift_Pressed                                                  KeyTTT5
  4563.  
  4564.  
  4565. Purpose   Determines whether the Right shift key is being depressed.
  4566.  
  4567. Decln.    RightShift_Pressed:boolean;
  4568.  
  4569. Returns   Boolean
  4570.  
  4571. Remarks   Returns true if the right shift key is being depressed.
  4572.  
  4573. See Also  LeftShift_Pressed, Shift_Pressed
  4574.  
  4575. Example   
  4576.  
  4577. BEGIN
  4578.     IF RIGHTSHIFT_PRESSED THEN
  4579.        WRITEAT(80,25,YELLOW,BLACK,CHR(24));
  4580. END;
  4581.  
  4582. ___________________________________________________________________________
  4583.  
  4584. Rmwin                                                               WinTTT5
  4585.  
  4586.  
  4587. Purpose   Removes a window and restores the original screen contents.
  4588.  
  4589. Decln.    Rmwin;
  4590.  
  4591. Remarks   The RmWin procedure removes the last displayed window. Successive
  4592.           RmWin statements will remove the windows displayed earlier. If
  4593.           RmWin is called when there are no windows, no action is taken.
  4594.           
  4595.           The windows are always removed in reverse order, e.g. you cannot
  4596.           create three windows in succession and then try to remove the
  4597.           second window without first removing the third one.
  4598.  
  4599. See Also  MkWin
  4600.  
  4601.  
  4602. Example   
  4603.  
  4604. VAR
  4605.   CH : CHAR;
  4606. BEGIN
  4607.     MKWIN(25,20,65,25,WHITE,RED,1);
  4608.     WRITEBETWEEN(25,65,23,WHITE,RED,'END THE PROGRAM?');
  4609.     CH := GETKEY;
  4610.     IF UPCASE(CH) = 'Y' THEN
  4611.        HALT(0)
  4612.     ELSE
  4613.        RMWIN;
  4614. END;
  4615.  
  4616. The above program paints a red window with a white single line border on
  4617. the last five lines of the screen and displays a message in the center of
  4618. the box. If the user responds Y, the program terminates, otherwise the
  4619. window is removed and the program continues.
  4620.  
  4621. ___________________________________________________________________________
  4622.  
  4623. SaveScreen                                                          WinTTT5
  4624.  
  4625.  
  4626. Purpose   Saves the current display image.
  4627.  
  4628. Decln.    SaveScreen(Page:byte);
  4629.  
  4630. Remarks   Page is the number that the saved screen will be referenced by.
  4631.           The number must be in the range 1..Max_Screens. If a screen is
  4632.           already saved to that page, it will be overwritten. Up to
  4633.           Max_Screens screens can be saved for subsequent restoration.
  4634.           
  4635.           The Toolkit accommodates text screens of 25, 43 and 50 lines,
  4636.           i.e. the screen can be saved even if the display is in condensed
  4637.           mode.
  4638.           
  4639.           The cursor size and location is also saved with the saved image.
  4640.           The screen image can be restored with the RestoreScreen
  4641.           procedure.
  4642.  
  4643. See Also  CreateScreen, RestoreScreen, SlideRestoreScreen,
  4644.           PartSlideRestoreScreen, DisposeScreen
  4645.  
  4646. Example   
  4647.  
  4648. BEGIN
  4649.     SAVESCREEN(6);
  4650.     ....
  4651.     {SOME STATEMENTS THAT MODIFY THE CODE}
  4652.     ....
  4653.     RESTORESCREEN(6);
  4654.     DISPOSESCREEN(6);
  4655. END;
  4656.  
  4657.  
  4658. ___________________________________________________________________________
  4659.  
  4660. ScrollOn                                                            KeyTTT5
  4661.  
  4662.  
  4663. Purpose   Indicates whether the Scroll Lock key is on.
  4664.  
  4665. Decln.    ScrollOn:boolean;
  4666.  
  4667. Returns   Boolean
  4668.  
  4669. Remarks   Returns true if the Scroll Lock key is "illuminated".
  4670.  
  4671. See Also  CapsOn, NumOn, Set_Scroll
  4672.  
  4673. Example   
  4674.  
  4675. BEGIN
  4676.     IF SCROLLON THEN
  4677.        WRITEAT(70,1,WHITE,BLACK,'SCR')
  4678.     ELSE
  4679.        WRITEAT(70,1,WHITE,BLACK,'   ')
  4680. END;
  4681. ___________________________________________________________________________
  4682.  
  4683. Scroll                                                              WinTTT5
  4684.  
  4685.  
  4686. Purpose   Scrolls text on the screen in any of the four directions.
  4687.  
  4688. Decln.    Scroll(Way:direction;X1,Y1,X2,Y2:byte);
  4689.  
  4690. Remarks   Way is the direction to scroll the text. The valid directions are
  4691.           Up, Down, Left and Right.
  4692.           X1, Y1 are the coordinates of the top left corner of the region
  4693.           to be scrolled.
  4694.           X2, Y2 are the coordinates of the lower right corner of the
  4695.           region to be scrolled.
  4696.           
  4697.           One line or column of text is removed, and a new blank line is
  4698.           inserted.
  4699.  
  4700. See Also  MoveScreenBlock, CopyScreenBlock
  4701.  
  4702. Example   
  4703.  
  4704. BEGIN
  4705.     SCROLL(UP,1,1,40,25);
  4706. END;
  4707.  
  4708. The left side of the display screen is scrolled up one line. The top line
  4709. of the text disappears, and a new blank line is added at the bottom of the
  4710. screen.
  4711.  
  4712.  
  4713. ___________________________________________________________________________
  4714.  
  4715. Set25Lines                                                          WinTTT5
  4716.  
  4717.  
  4718. Purpose   Sets the screen into the normal 25 line textmode display.
  4719.  
  4720. Decln.    Set25Lines;
  4721.  
  4722. Remarks   Use this procedure to switch from a condensed line display (only
  4723.           available on systems equipped with EGA/VGA displays) to a 25 line
  4724.           display.
  4725.           
  4726.           The top 25 lines of the screen will remain on display.
  4727.           
  4728.           A global variable DisplayLines is automatically updated with the
  4729.           current number of display lines.
  4730.  
  4731. See Also  SetCondensedLines
  4732.  
  4733. Example   
  4734.  
  4735. BEGIN
  4736.     IF DISPLAYLINES <> 25 THEN
  4737.        SET25LINES.
  4738. END;
  4739.  
  4740. ___________________________________________________________________________
  4741.  
  4742. SetCondensedLines                                                   WinTTT5
  4743.  
  4744.  
  4745. Purpose   Sets the text display into 43/50 line mode on EGA/VGA systems.
  4746.  
  4747. Decln.    SetCondensedLines;
  4748.  
  4749. Remarks   Systems equipped with EGA/VGA displays can support the display of
  4750.           up to 43 or 50 lines of text. This procedure switches the display
  4751.           into the condensed mode.
  4752.           
  4753.           If the procedure is called on non EGA/VGA equipment, W_Error is
  4754.           set to 12, but it is a non-fatal error. The screen simply remains
  4755.           in 25 line mode.
  4756.           
  4757.           A global variable DisplayLines is automatically updated with the
  4758.           current number of display lines.
  4759.  
  4760. See Also  Set25Lines
  4761.  
  4762. Example   
  4763.  
  4764. BEGIN
  4765.     IF EGAVGASYSTEM AND (DISPLAYLINES = 25) THEN
  4766.        SETCONDENSEDLINES.
  4767. END;
  4768.  
  4769.  
  4770. ___________________________________________________________________________
  4771.  
  4772. Set_Caps                                                            WinTTT5
  4773.  
  4774.  
  4775. Purpose   Forces the Caps Lock key on or off.
  4776.  
  4777. Decln.    Set_Caps(On:Boolean);
  4778.  
  4779. Remarks   On is a boolean to indicate if the Caps lock should be set to on,
  4780.           i.e. pass true to set it on and false to set it off.
  4781.           
  4782.           This procedure will only function on IBM (Compaq!) machines and
  4783.           100% compatibles. Clone machines that have cheap keyboards or
  4784.           non-standard BIOS will not properly illuminate the Caps Lock key
  4785.           - some clones use a mechanical trigger to change the Caps Lock
  4786.           light and do not detect a software change.
  4787.  
  4788. See Also  CapsOn, Set_Num, Set_Scroll
  4789.  
  4790. Example   
  4791.  
  4792. BEGIN
  4793.     IF CAPSON THEN
  4794.     BEGIN
  4795.         FWRITE('TURNING OFF THE CAPS LOCK KEY');
  4796.         SET_CAPS(FALSE);
  4797.     END;
  4798. END;
  4799.  
  4800. ___________________________________________________________________________
  4801.  
  4802. Set_Default_Rules                                                    IOTTT5
  4803.  
  4804.  
  4805. Purpose   Changes the default display rules for input fields, e.g.
  4806.           rightjustified, suppresszero, etc.
  4807.  
  4808. Decln.    Set_Default_Rules(Rules:word);
  4809.  
  4810. Remarks   Rules is a word that indicates the display characteristics of the
  4811.           input fields. All subsequent fields created with Add_Field will
  4812.           be initialized with these rules.
  4813.           
  4814.           There are 5 different field Rules:
  4815.                ALLOWNULL
  4816.                SUPPRESSZERO
  4817.                RIGHTJUSTIFY
  4818.                ERASEDEFAULT
  4819.                JUMPIFFULL
  4820.           The desired attributes are summed to give the combined field
  4821.           Rules.
  4822.           
  4823.  
  4824. See Also  Field_Rules, Add_Field
  4825.  
  4826.  
  4827. Example   
  4828.  
  4829. BEGIN
  4830.     SET_DEFAULT_RULES(ALLOWNULL+SUPPRESSZERO);
  4831. END;
  4832.  
  4833. ___________________________________________________________________________
  4834.  
  4835. Set_Mouse_Cursor_Style                                              KeyTTT5
  4836.  
  4837.  
  4838. Purpose   Changes the appearance of the mouse cursor.
  4839.  
  4840. Decln.    Set_Mouse_Cursor_Style(ordChar:byte);
  4841.  
  4842. Remarks   OrdChar is the ASCII code for the desired character.
  4843.           
  4844.           In textmode, the shape of the mouse cursor can be any of the
  4845.           displayable ASCII characters.
  4846.           
  4847.           The default cursor is a small rectangle. Once the cursor style
  4848.           has been modified, it will assume the new style until the mouse
  4849.           is re-installed (usually from a reboot), or until this procedure
  4850.           changes it again.
  4851.  
  4852. See Also  Show_Mouse_Cursor
  4853.  
  4854. Example   
  4855.  
  4856. BEGIN
  4857.     SET_MOUSE_CURSOR_STYLE(29);
  4858. END;
  4859.  
  4860. ___________________________________________________________________________
  4861.  
  4862. Set_Num                                                             WinTTT5
  4863.  
  4864.  
  4865. Purpose   Forces the Num Lock key on or off.
  4866.  
  4867. Decln.    Set_Num(On:Boolean);
  4868.  
  4869. Remarks   On is a boolean to indicate if the Num lock should be set to on,
  4870.           i.e. true to set it on and false to set it off.
  4871.           
  4872.           This procedure will only function on IBM machines and 100%
  4873.           compatibles. Clone machines that have cheap keyboards or non-
  4874.           standard BIOS will not properly illuminate the Num Lock key -
  4875.           some clones use a mechanical trigger to change the Num Lock light
  4876.           and do not detect a software change.
  4877.  
  4878. See Also  NumOn, Set_Caps, Set_Scroll
  4879.  
  4880. Example   
  4881.  
  4882.  
  4883. BEGIN
  4884.     IF NUMON THEN
  4885.     BEGIN
  4886.         FWRITE('TURNING OFF THE NUM LOCK KEY');
  4887.         SET_NUM(FALSE);
  4888.     END;
  4889. END;
  4890.  
  4891. ___________________________________________________________________________
  4892.  
  4893. Set_Scroll                                                          WinTTT5
  4894.  
  4895.  
  4896. Purpose   Forces the Scroll Lock key on or off.
  4897.  
  4898. Decln.    Set_Scroll(On:Boolean);
  4899.  
  4900. Remarks   On is a boolean to indicate if the Scroll lock should be set to
  4901.           on, i.e. true to set it on and false to set it off.
  4902.           
  4903.           This procedure will only function on IBM  machines and 100%
  4904.           compatibles. Clone machines that have cheap keyboards or non-
  4905.           standard BIOS will not properly illuminate the Scroll Lock key -
  4906.           some clones use a mechanical trigger to change the Num Lock light
  4907.           and do not detect a software change.
  4908.  
  4909. See Also  ScrollOn, Set_Caps, Set_Num
  4910.  
  4911. Example   
  4912.  
  4913. BEGIN
  4914.     IF NOT SCROLLON THEN
  4915.     BEGIN
  4916.         FWRITE('TURNING ON THE SCROLL LOCK KEY');
  4917.         SET_SCROLL(TRUE);
  4918.     END;
  4919. END;
  4920.  
  4921. ___________________________________________________________________________
  4922.  
  4923. Shift_Pressed                                                       KeyTTT5
  4924.  
  4925.  
  4926. Purpose   Determines if either the Left or Right shift key is being
  4927.           depressed.
  4928.  
  4929. Decln.    Shift_Pressed:boolean;
  4930.  
  4931. Returns   Boolean
  4932.  
  4933. Remarks   Returns true if the left shift key is being depressed.
  4934.  
  4935. See Also  RightShift_Pressed, LeftShift_Pressed
  4936.  
  4937.  
  4938. Example   
  4939.  
  4940. BEGIN
  4941.     IF SHIFT_PRESSED THEN
  4942.        WRITEAT(40,25,YELLOW,BLACK,CHR(24));
  4943. END;
  4944.  
  4945. ___________________________________________________________________________
  4946.  
  4947. Show_List                                                          ListTTT5
  4948.  
  4949.  
  4950. Purpose   Displays a list of choices in a scrollable window.
  4951.  
  4952. Decln.    Show_List(var StrArray;Strlength:byte;TotalPicks:byte);
  4953.  
  4954. Remarks   StrArray is a variable that is defined as an array of strings.
  4955.           This array contains a list of all the topics that the user can
  4956.           select.
  4957.           Strlength is the maximum string length of each element of the
  4958.           array.
  4959.           TotalPicks is the total number of elements in the array.
  4960.           
  4961.           The global byte variable L_Pick is updated with the chosen topic.
  4962.           If multiple selections are allowed, the boolean array L_Picks
  4963.           indicates the user's selections.
  4964.           
  4965.           The LTTT variable controls the display characteristics of the
  4966.           list.
  4967.  
  4968. Example   
  4969.  
  4970. VAR
  4971.   NAME_ARRAY : ARRAY[1..5] OF STRING[20];
  4972. BEGIN
  4973.     NAME_ARRAY[1] := 'ROBERT';
  4974.     NAME_ARRAY[2] := 'DAVID';
  4975.     NAME_ARRAY[3] := 'MICHAEL';
  4976.     NAME_ARRAY[4] := 'JONATHAN';
  4977.     NAME_ARRAY[5] := 'DESMOND';
  4978.     SHOW_LIST(NAME_ARRAY,20,5);
  4979. END;
  4980.  
  4981. ___________________________________________________________________________
  4982.  
  4983. Show_Mouse_Cursor                                                   KeyTTT5
  4984.  
  4985.  
  4986. Purpose   Makes the mouse cursor visible.
  4987.  
  4988. Decln.    Show_Mouse_Cursor;
  4989.  
  4990. Remarks   The mouse cursor is not normally displayed. Use this procedure to
  4991.           display the mouse and Hide_Mouse_Cursor to turn it off.
  4992.  
  4993.  
  4994. See Also  Hide_Mouse_Cursor
  4995.  
  4996. Example   
  4997.  
  4998. BEGIN
  4999.     SHOW_MOUSE_CURSOR;
  5000. END;
  5001.  
  5002. ___________________________________________________________________________
  5003.  
  5004. Show_Nest                                                          NestTTT5
  5005.  
  5006.  
  5007. Purpose   Displays a NEST menu.
  5008.  
  5009. Decln.    Show_Nest(var menu:Nest_menu);
  5010.  
  5011. Remarks   Menu is the name of the menu variable that defines all the
  5012.           topics.
  5013.           
  5014.           This is the main procedure in the NestTTT5 unit.
  5015.  
  5016. See Also  Initialize_Menu
  5017.  
  5018. Example   
  5019.  
  5020. VAR
  5021.   MY_MENU : NEST_MENU;
  5022. BEGIN
  5023.     INITIALIZE_MENU(MY_MENU);
  5024.     ......
  5025.     ...    {MENU BUILDING PROCS ADD_TOPIC, ASSIGN_DESPATCHER ETC}
  5026.     ......
  5027.     SHOW_NEST(MY_MENU);
  5028. END;
  5029.  
  5030. ___________________________________________________________________________
  5031.  
  5032. SizeCursor                                                          WinTTT5
  5033.  
  5034.  
  5035. Purpose   Sets the cursor to any acceptable size.
  5036.  
  5037. Decln.    SizeCursor(Top,Bot:byte);
  5038.  
  5039. Remarks   Top, Bot are the top and bottom scan lines of the cursor.
  5040.           
  5041.           The top scan line is 0. The bottom scan line is 12 on monochrome
  5042.           systems and 7 on color systems.
  5043.  
  5044. See Also  OffCursor, OnCursor, HalfCursor, FullCursor
  5045.  
  5046. Example   
  5047.  
  5048. BEGIN
  5049.  
  5050.     IF COLORSCREEN
  5051.        SIZECURSOR(0,3)
  5052.     ELSE
  5053.        SIZECURSOR(0,6);
  5054. END;
  5055.  
  5056. ___________________________________________________________________________
  5057.  
  5058. SlideRestoreScreen                                                  WinTTT5
  5059.  
  5060.  
  5061. Purpose   Restores a previously saved screen. This procedure is the
  5062.           functional equivalent of RestoreScreen except that the text
  5063.           s.l..i...d....e.....s onto the screen.
  5064.  
  5065. Decln.    SlideRestoreScreen(Page:byte; Way:direction);
  5066.  
  5067. Remarks   Page is the screen number of the saved/virtual screen.
  5068.           Way is the direction to slide the screen. The valid directions
  5069.           are Up, Down, Left, Right.
  5070.           
  5071.           The cursor is returned to the exact positon it was in when the
  5072.           screen was saved.
  5073.           
  5074.           If the saved screen will no longer be needed, free up the memory
  5075.           with DisposeScreen.
  5076.  
  5077. See Also  SaveScreen, CreateScreen, RestoreScreen, PartSlideRestoreScreen
  5078.  
  5079. Example   
  5080.  
  5081. BEGIN
  5082.     SAVESCREEN(6);
  5083.     ....
  5084.     {SOME STATEMENTS THAT MODIFY THE CODE}
  5085.     ....
  5086.     SLIDERESTORESCREEN(6,DOWN);
  5087.     DISPOSESCREEN(6);
  5088. END;
  5089.  
  5090. ___________________________________________________________________________
  5091.  
  5092. Squeeze                                                            StrnTTT5
  5093.  
  5094.  
  5095. Purpose   Truncates a string and inserts a symbol in the string.
  5096.  
  5097. Decln.    Squeeze(LR:Char;Str:string;width:byte):string;
  5098.  
  5099. Returns   String
  5100.  
  5101. Remarks   LR is a character to indicate whether the left or the right of
  5102.           the string should be retained. 'L' for left and 'R' for right.
  5103.           Str is the source string.
  5104.           Width is the length of the returned string.
  5105.  
  5106.           
  5107.           An arrow is forced into the first or last character position to
  5108.           indicate that the string has been truncated.
  5109.  
  5110. See Also  Last, First
  5111.  
  5112. Example   
  5113.  
  5114. VAR
  5115.   TTT : STRING;
  5116. BEGIN
  5117.     TTT := SQUEEZE('R','C:\TURBO\WILLY.PAS',14);
  5118. END;
  5119.  
  5120. The string TTT will be assigned the value "->rbo\willy.pas".
  5121.  
  5122. ___________________________________________________________________________
  5123.  
  5124. String_Field                                                         IOTTT5
  5125.  
  5126.  
  5127. Purpose   Assigns a string variable to an input field.
  5128.  
  5129. Decln.    String_Field(ID:byte;var Svar:string;Fmt:string);
  5130.  
  5131. Remarks   ID is the field ID number.
  5132.           Save is the name of the string variable that will be updated with
  5133.           the user's input.
  5134.           Fmt is the format of the Input string. The following characters
  5135.           denote input characters:
  5136.           
  5137.           #    allow 0..9,'.',,'-', and 'e' for scientific.
  5138.           @    only letters of the alphabet and punctuation.
  5139.           *    any damn character the user can find.
  5140.           
  5141.           !    all letters converted to upper case.
  5142.           
  5143.           For example, a format for a telephone number might be "(###) ###-
  5144.           ####".
  5145.           
  5146.           The length of the field is dictated by the Fmt string.
  5147.  
  5148. See Also  Add_Field, Byte_Field, Word_Field, Integer_Field, LongInt_Field,
  5149.           Real_Field, Date_Field
  5150.  
  5151. Example   
  5152.  
  5153. VAR
  5154.   NAME, TEL : STRING;
  5155.   ZIP : LONGINT;
  5156. BEGIN
  5157.     NAME := '';
  5158.     TEL := '';
  5159.     ZIP := 0;
  5160.     STRING_FIELD(1,NAME,'!!!!!!!!!!!!!!!!!!!!');
  5161.  
  5162.     STRING_FIELD(2,TEL,'(###) ###-####');
  5163.     LONGINT_FIELD(3,ZIP,'',0,99999);
  5164. END;
  5165.  
  5166. The Name field will force all the user's input to upper case. The Telephone
  5167. field will only accept numbers and the cursor will jump between the #
  5168. characters (although they won't show as #'s on the display!!). The Zip
  5169. field will accept any number in the range 0 to 99999.
  5170.  
  5171. ___________________________________________________________________________
  5172.  
  5173. Strip                                                              StrnTTT5
  5174.  
  5175.  
  5176. Purpose   Removes a character from a string.
  5177.  
  5178. Decln.    Strip(L,C:char;Str:string):string;
  5179.  
  5180. Returns   String
  5181.  
  5182. Remarks   L is a character indicating which part of the string to strip:
  5183.           'L'  strip all leading characters
  5184.           'R'  strip all trailing characters
  5185.           'B'  strip both leading and trailing characters
  5186.           'A'  strip all occurrences of the character
  5187.           C    is the character to strip
  5188.           Str  is the source string
  5189.  
  5190. Example   
  5191.  
  5192. VAR
  5193.    TTT1, TTT2, TTT3, TTT4 : STRING;
  5194. BEGIN
  5195.     TTT1 := STRIP('L',' ','   THIS IS NEAT   ');
  5196.     TTT2 := STRIP('R',' ','   THIS IS NEAT   ');
  5197.     TTT3 := STRIP('B',' ','   THIS IS NEAT   ');
  5198.     TTT4 := STRIP('A',' ','   THIS IS NEAT   ');
  5199. END;
  5200.  
  5201. The strings will be assigned the following characters:
  5202. TTT1 "This is neat    "
  5203. TTT2 "    This is neat"
  5204. TTT3 "This is neat"
  5205. TTT4 "Thisisneat"
  5206.  
  5207. ___________________________________________________________________________
  5208.  
  5209. Str_to_Int                                                         StrnTTT5
  5210.  
  5211.  
  5212. Purpose   Converts a string to an integer.
  5213.  
  5214. Decln.    Str_to_Int(Str:string):integer;
  5215.  
  5216. Returns   Integer
  5217.  
  5218.  
  5219. Remarks   Str is the source string.
  5220.           
  5221.           If the string is null or cannot be successfully converted to an
  5222.           integer, the function returns a zero.
  5223.  
  5224. See Also  Int_to_Str, Str_to_Real, Str_to_Long
  5225.  
  5226. Example   
  5227.  
  5228. VAR
  5229.   I : INTEGER;
  5230. BEGIN
  5231.     I := STR_TO_INT('165');
  5232. END;
  5233.  
  5234. The variable I is assigned the value 165.
  5235.  
  5236. ___________________________________________________________________________
  5237.  
  5238. Str_to_Long                                                        StrnTTT5
  5239.  
  5240.  
  5241. Purpose   Converts a string to a longint.
  5242.  
  5243. Decln.    Str_to_Long(Str:string):longint;
  5244.  
  5245. Returns   Longint
  5246.  
  5247. Remarks   Str is the source string.
  5248.           
  5249.           If the string is null or cannot be successfully converted to a
  5250.           longint, the function returns a zero.
  5251.  
  5252. See Also  Int_to_Str, Str_to_Real, Str_to_Int
  5253.  
  5254. Example   
  5255.  
  5256. VAR
  5257.   L : LONGINT;
  5258. BEGIN
  5259.     L := STR_TO_LONG('99165');
  5260. END;
  5261.  
  5262. The variable L is assigned the value 99165.
  5263.  
  5264. ___________________________________________________________________________
  5265.  
  5266. Str_to_Real                                                        StrnTTT5
  5267.  
  5268.  
  5269. Purpose   Converts a string to a real.
  5270.  
  5271. Decln.    Str_to_Real(Str:string):real;
  5272.  
  5273.  
  5274. Returns   Real
  5275.  
  5276. Remarks   Str is the source string.
  5277.           
  5278.           If the string is null or cannot be successfully converted to a
  5279.           real, the function returns a zero.
  5280.  
  5281. See Also  Int_to_Str, Str_to_Long, Str_to_Int
  5282.  
  5283. Example   
  5284.  
  5285. VAR
  5286.   R : REAL;
  5287. BEGIN
  5288.     R := STR_TO_REAL('59.99');
  5289. END;
  5290.  
  5291. The variable R is assigned the value 59.99.
  5292.  
  5293. ___________________________________________________________________________
  5294.  
  5295. TempMessage                                                         WinTTT5
  5296.  
  5297.  
  5298. Purpose   Displays a message on the screen, waits for a keypress (or mouse
  5299.           activity), and then restores the original screen contents.
  5300.  
  5301. Decln.    TempMessage(X,Y,F,B:byte;Str:StrScreen);
  5302.  
  5303. Remarks   X, Y are the coordinates of the first character of the message.
  5304.           F, B are the foreground and background display colors.
  5305.           Str is the message to display.
  5306.  
  5307. See Also  TempMessageCh, TempMessageBox, TempMessageBoxCh
  5308.  
  5309. Example   
  5310.  
  5311. BEGIN
  5312.     TEMPMESSAGE(1,1,YELLOW,RED,'YOU CANNOT REFORMAT THE FILESERVER');
  5313. END;
  5314.  
  5315. ___________________________________________________________________________
  5316.  
  5317. TempMessageBox                                                      WinTTT5
  5318.  
  5319.  
  5320. Purpose   Displays a temporary message on the screen inside a box.
  5321.  
  5322. Decln.    TempMessageBox(X,Y,F,B,BoxType:byte;Str:StrScreen);
  5323.  
  5324. Remarks   X, Y are the coordinates of the first character of the message.
  5325.           F, B are the foreground and background display colors.
  5326.           BoxType is the box border code. Use the same codes as for Box in
  5327.           FastTTT5.
  5328.           Str is the message to display.
  5329.  
  5330.  
  5331. See Also  TempMessageCh, TempMessage, TempMessageBoxCh
  5332.  
  5333. Example   
  5334.  
  5335. BEGIN
  5336.     TEMPMESSAGEBOX(10,13,YELLOW,RED,2,'REMOVE THE DISKETTE FROM DRIVE A');
  5337. END;
  5338.  
  5339. ___________________________________________________________________________
  5340.  
  5341. TempMessageBoxCh                                                    WinTTT5
  5342.  
  5343.  
  5344. Purpose   Displays a temporary message in a box screen and returns the
  5345.           character pressed by the user. This procedure is a combination of
  5346.           TempMessageCh and TempMessageBox.
  5347.  
  5348. Decln.    TempMessageBoxCh(X,Y,F,B,Boxtype:byte;Str:StrScreen;var Ch:char);
  5349.  
  5350. Remarks   X, Y are the coordinates of the first character of the message.
  5351.           F, B are the foreground and background display colors.
  5352.           BoxType is the box border code. Use the same codes as for Box in
  5353.           FastTTT5.
  5354.           Str is the message to display.
  5355.           Ch is a character variable that will be updated with the
  5356.           character pressed by the user.
  5357.  
  5358. See Also  TempMessage, TempMessageBox, TempMessageBoxCh
  5359.  
  5360. Example   
  5361.  
  5362. VAR
  5363.   CH : CHAR;
  5364. BEGIN
  5365.     TEMPMESSAGEBOXCH(1,1,YELLOW,RED,1,'REFORMAT THE FILESERVER? (Y/N)',CH);
  5366. END;
  5367.  
  5368. ___________________________________________________________________________
  5369.  
  5370. TempMessageCh                                                       WinTTT5
  5371.  
  5372.  
  5373. Purpose   Displays a temporary message on the screen. This procedure is the
  5374.           functional equivalent of the TempMessage procedure, except that
  5375.           it identifies the character pressed by the user.
  5376.  
  5377. Decln.    TempMessageCh(X,Y,F,B:byte;Str:StrScreen;var Ch:char);
  5378.  
  5379. Remarks   X, Y are the coordinates of the first character of the message.
  5380.           F, B are the foreground and background display colors.
  5381.           Str is the message to display.
  5382.           Ch is a character variable that will be updated with the
  5383.           character the user pressed.
  5384.  
  5385.  
  5386. See Also  TempMessage, TempMessageBox, TempMessageBoxCh
  5387.  
  5388. Example   
  5389.  
  5390. VAR
  5391.   CH : CHAR;
  5392. BEGIN
  5393.     TEMPMESSAGECH(1,1,YELLOW,RED,'REFORMAT THE FILESERVER? (Y/N)',CH);
  5394.     IF UPCASE(CH) = 'Y' THEN
  5395.     TEMPMESSAGE(1,1,WHITE,BLUE,'DO I LOOK STUPID?');
  5396. END;
  5397.  
  5398. ___________________________________________________________________________
  5399.  
  5400. Time                                                               MiscTTT5
  5401.  
  5402.  
  5403. Purpose   Returns the system time nicely formatted.
  5404.  
  5405. Decln.    Time:string;
  5406.  
  5407. Returns   String
  5408.  
  5409. Remarks   The format of the returned string is hour:min:sec a.m.
  5410.           
  5411.           The same format is used in the Clock procedure.
  5412.  
  5413. See Also  Clock, Date
  5414.  
  5415. Example   
  5416.  
  5417. BEGIN
  5418.     FWRITELN(TIME);
  5419. END;
  5420.  
  5421. ___________________________________________________________________________
  5422.  
  5423. Today_In_Julian                                                    MiscTTT5
  5424.  
  5425.  
  5426. Purpose   Returns the current system date in Julian form.
  5427.  
  5428. Decln.    Today_in_Julian:dates;
  5429.  
  5430. Returns   Dates
  5431.  
  5432. See Also  Date_To_Julian, Julian_to_Date
  5433.  
  5434. Example   
  5435.  
  5436. VAR
  5437.   NOW : DATES;
  5438. BEGIN
  5439.     NOW := TODAY_IN_JULIAN;
  5440. END;
  5441.  
  5442.  
  5443. ___________________________________________________________________________
  5444.  
  5445. Upper                                                              StrnTTT5
  5446.  
  5447.  
  5448. Purpose   Converts a string to upper case.
  5449.  
  5450. Decln.    Upper(Str:string):string;
  5451.  
  5452. Returns   String
  5453.  
  5454. Remarks   Str is the source string.
  5455.           
  5456.           Only the upper case alphabet A to Z is affected.
  5457.  
  5458. See Also  Lower, Proper
  5459.  
  5460. Example   
  5461.  
  5462. VAR
  5463.   TTT : STRING
  5464. BEGIN
  5465.     TTT := UPPER('TECHNOJOCK SOFTWARE');
  5466. END;
  5467.  
  5468. The variable TTT is assigned the value "TECHNOJOCK SOFTWARE".
  5469.  
  5470. ___________________________________________________________________________
  5471.  
  5472. Valid_Date                                                         MiscTTT5
  5473.  
  5474.  
  5475. Purpose   Validates a date string.
  5476.  
  5477. Decln.    Valid_date(Indate:string;format:byte):boolean;
  5478.  
  5479. Returns   Boolean
  5480.  
  5481. Remarks   Indate is the string to be validated.
  5482.           Format is the format code to indicate the format of the string.
  5483.           The valid date formats are declared as constants in the MiscTTT5
  5484.           unit:
  5485.                DDMMYY
  5486.                MMDDYY
  5487.                MMYY
  5488.                MMYYYY
  5489.                DDMMYYYY
  5490.                MMDDYYYY
  5491.           
  5492.           The procedure checks that the month is valid (i.e. in the range
  5493.           1..12) and that the day is within the valid range for the month.
  5494.           Leap years are accounted for.
  5495.  
  5496. See Also  Date_to_Julian
  5497.  
  5498.  
  5499. Example   
  5500.  
  5501. VAR
  5502.   OK : BOOLEAN;
  5503. BEGIN
  5504.     OK := VALID_DATE('02/31/90',MMDDYY);
  5505. END;
  5506.  
  5507. The variable OK is assigned the value FALSE because there are not 31 days
  5508. in February 1990.
  5509.  
  5510. ___________________________________________________________________________
  5511.  
  5512. VertLine                                                           FastTTT5
  5513.  
  5514.  
  5515. Purpose   Draws a vertical line on the screen.
  5516.  
  5517. Decln.    VertLine(X,Y1,Y2,F,B,LineType:integer);
  5518.  
  5519. Remarks   X is the X coordinate of the line.
  5520.           Y1, Y2 are the upper and lower Y coordinates of the line.
  5521.           F, B are the foreground and background display colors.
  5522.           LineType is a code to indicate the linestyle - 1 for a single
  5523.           line and 2 for a double line.
  5524.  
  5525. See Also  HorizLine, Box
  5526.  
  5527. Example   
  5528.  
  5529. BEGIN
  5530.     VERTLINE(40,1,25,WHITE,BLACK,2);
  5531. END;
  5532.  
  5533. A double white line is drawn down the center of the screen.
  5534.  
  5535. ___________________________________________________________________________
  5536.  
  5537. WordCnt                                                            StrnTTT5
  5538.  
  5539.  
  5540. Purpose   Counts the number of words in a string.
  5541.  
  5542. Decln.    WordCnt(Str:string):string;
  5543.  
  5544. Returns   String
  5545.  
  5546. Remarks   Str is the source string.
  5547.  
  5548. See Also  ExtractWords, PosWord
  5549.  
  5550. Example   
  5551.  
  5552. VAR
  5553.   B : BYTE;
  5554.  
  5555. BEGIN
  5556.     B := WORDCNT('WHAT A SUPERB PRODUCT, REGARDS PHILLIPE');
  5557. END;
  5558.  
  5559. The variable B is assigned the value 6.
  5560.  
  5561. ___________________________________________________________________________
  5562.  
  5563. Word_Field                                                           IOTTT5
  5564.  
  5565.  
  5566. Purpose   Assigns a word variable to an input field.
  5567.  
  5568. Decln.    Word_Field(ID:byte;var WVar:word;Fmt:Lstring;Min,Max:word);
  5569.  
  5570. Remarks   ID is the field ID number.
  5571.           Wvar is the name of the word variable that will be updated with
  5572.           the user's input.
  5573.           Fmt is the format of the input field. Pass a null string '' for
  5574.           the default.
  5575.           Min, Max are the minimum and maximum values for range check. Set
  5576.           to 0 to accept any word value.
  5577.           
  5578.           The field must be declared with Add_Field prior to calling this
  5579.           procedure.
  5580.  
  5581. See Also  Add_Field, Byte_Field, Integer_Field, LongInt_Field, Real_Field,
  5582.           Date_Field, String_Field
  5583.  
  5584. Example   
  5585.  
  5586. BEGIN
  5587.     ACTIVATE_TABLE(3);
  5588.     WORD_FIELD(1, AREA, '', 0,120);
  5589.     WORD_FIELD(2, VOLUME, '', 1,31);
  5590. END;
  5591.  
  5592. ___________________________________________________________________________
  5593.  
  5594. WriteAT                                                            FastTTT5
  5595.  
  5596.  
  5597. Purpose   Writes to the screen el quicko.
  5598.  
  5599. Decln.    WriteAT(X,Y,F,B:byte;Str:StrScreen);
  5600.  
  5601. Remarks   X, Y are the coordinates of the first character.
  5602.           F, B are the foreground and background display colors.
  5603.           Str is the string to be written.
  5604.  
  5605. See Also  Fastwrite, Plainwrite, Colwrite
  5606.  
  5607. Example   
  5608.  
  5609. CONST
  5610.  
  5611.     HEADING = 'TOOLKIT';
  5612. VAR
  5613.   NAME : STRING;
  5614. BEGIN
  5615.     NAME := "BOBBO";
  5616.     WRITEAT(1,1,WHITE,BLACK,'WELCOME');
  5617.     WRITEAT(10,10,CYAN,RED,HEADING');
  5618.     WRITEAT(40,3,LIGHTCYAN,LIGHTGRAY,'TO'+'THE SHOW');
  5619.     WRITEAT(70,20,GREEN,BLACK,NAME);
  5620. END;
  5621.  
  5622. The example writes various strings to the screen and illustrates that
  5623. strings, constants, variables and concatenated strings are valid.
  5624.  
  5625. ___________________________________________________________________________
  5626.  
  5627. WriteBetween                                                       FastTTT5
  5628.  
  5629.  
  5630. Purpose   Writes text centered between two points.
  5631.  
  5632. Decln.    WriteBetween(X1,X2,Y,F,B:byte;Str:strscreen);
  5633.  
  5634. Remarks   X1, X2 are the two X coordinates that the string will be centered
  5635.           between.
  5636.           Y is the Y coordinate.
  5637.           F, B are the foreground and background display colors.
  5638.           Str is the display string.
  5639.  
  5640. See Also  WriteAt, WriteCenter
  5641.  
  5642. Example   
  5643.  
  5644. BEGIN
  5645.     WRITEBETWEEN(1,40,15,WHITE,BLACK,'LEFT SIDE');
  5646.     WRITEBETWEEN(41,80,15,WHITE,BLACK,'RIGHT SIDE');
  5647. END;
  5648.  
  5649. ___________________________________________________________________________
  5650.  
  5651. WriteCenter                                                        FastTTT5
  5652.  
  5653.  
  5654. Purpose   Writes text on the center of a line.
  5655.  
  5656. Decln.    WriteCenter(Y,F,B:byte;Str:string);
  5657.  
  5658. Remarks   Y is the Y coordinate or line number.
  5659.           F, B are the foreground and background display colors.
  5660.           Str is the display string.
  5661.  
  5662. See Also  WriteBetween, WriteAt
  5663.  
  5664. Example   
  5665.  
  5666.  
  5667. BEGIN
  5668.     WRITECENTER(1,YELLOW,BLACK,'MAJOR HEADING');
  5669. END;
  5670.  
  5671. ___________________________________________________________________________
  5672.  
  5673. WriteVert                                                          FastTTT5
  5674.  
  5675.  
  5676. Purpose   Writes text in a vertical column.
  5677.  
  5678. Decln.    WriteVert(X,Y,F,B:byte;Str:string);
  5679.  
  5680. Remarks   X, Y are the coordinates of the top character.
  5681.           F, B are the foreground and background display colors.
  5682.           Str is the display string.
  5683.  
  5684. See Also  WriteAt
  5685.  
  5686. Example   
  5687.  
  5688. BEGIN
  5689.     WRITEVERT(20,5,WHITE,BLUE,'Y AXIS');
  5690. END;
  5691.  
  5692.