home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / tttdoc51.zip / MANUAL.DOC < prev    next >
Text File  |  1993-05-12  |  167KB  |  5,690 lines

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