home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / EDITORES / TSCREDD2.ZIP / SCRDISK3.EXE / MANUAL.PT1 next >
Encoding:
Text File  |  1990-04-29  |  210.0 KB  |  4,781 lines

  1.                                    Page  I-1
  2.       
  3.       
  4.                    Turbo ScrEdit procedures reference guide
  5.                        <C>opyright 1989 by iHn Systems
  6.       
  7.       
  8.       
  9.       -----------------------------------------------------------------
  10.       Disclaimer..................................................    1
  11.       
  12.       CONFIG.SYS requirments......................................    2
  13.       
  14.       If Turbo ScrEdit does not work..............................    2
  15.       
  16.       Preparing Turbo ScrEdit Interface for use in a program:  
  17.              Setting the compiler directives before compiling.....    2
  18.                  COLORCHANGE......................................    3
  19.                  MOUSE............................................    3
  20.                  VALIDATE.........................................    4
  21.              Creating the Turbo Pascal Unit.......................    4
  22.              Creating the Turbo C Libraries.......................    5
  23.       
  24.       How to include Turbo Scredit in your program:
  25.              Turbo Pascal.........................................    6
  26.              Turbo C..............................................    6
  27.       
  28.       Using Turbo ScrEdit from within your program................    7
  29.              An example of the smallest possible working program
  30.              to use a Turbo ScrEdit screen........................    7
  31.              Initialization:
  32.                  Initializing Turbo ScrEdit interface:
  33.                      S_Init.......................................    8
  34.                  Initializing screens.............................    8
  35.              Opening a screen file for use:
  36.                  S_OpenScreenFile.................................   10
  37.              Loading a screen and displaying it:
  38.                  S_DelayScreen....................................   10
  39.                  S_LoadScreen.....................................   10
  40.              Closing a screen file:
  41.                  S_CloseScreen....................................   11
  42.              Activating/Deactivating special fetures:
  43.                  The INSERT,CAPS,NUM LOCK,SCROLL LOCK status line
  44.                      S_ShowStatus.................................   13
  45.                      Changing Status Line Colors:
  46.                          S_StBg...................................   13
  47.                          S_StFg...................................   13
  48.                          S_StLabelBg..............................   13
  49.                          S_StLabelFg..............................   13
  50.                  Continuous field help messages:
  51.                      S_AutoHelp...................................   14
  52.                  Instant field value validation:
  53.                      S_AutoValidate...............................   15
  54.                  Message line sound:
  55.                      S_UserSound..................................   16
  56.                      S_ErrorSound.................................   16
  57.                      S_HelpSound..................................   16
  58.                  Turning the system cursor on and off:
  59.                         S_SetCursor...............................   16
  60.                  Selecting Turbo ScrEdits cursor type:     
  61.                      S_Cursor.....................................   18
  62.                      Turbo ScrEdits regular inverted cursor.......   18
  63.                         S_Off.....................................   18
  64.       
  65.       
  66.       
  67.                                    Page I-2
  68.       
  69.       
  70.       
  71.                      Blinking system cursor.......................   18
  72.                         S_Normal..................................   18
  73.                      Blinking block cursor........................   18
  74.                         S_Bold....................................   18
  75.                  Changing how the ENTER key is used:
  76.                      S_EnterAsTab.................................   19
  77.              Displaying data on the screen........................   21
  78.                  Displaying values in screen fields...............   21
  79.                  Using The Message Line:
  80.                      Displaying messages.
  81.                          S_AutoHelpMsg............................   22
  82.                          S_ErrorMsg...............................   22
  83.                          S_UserMsg................................   22
  84.                      Message sounds:
  85.                          S_HelpSound..............................   23
  86.                          S_HelpFreq...............................   23
  87.                          S_HelpDur................................   23
  88.                          S_ErrorSound.............................   23
  89.                          S_ErrorFreq..............................   23
  90.                          S_ErrorDur...............................   23
  91.                          S_UserSound..............................   23
  92.                          S_UserFreq...............................   23
  93.                          S_UserDur................................   23
  94.                      Messages colors:
  95.                          S_ErrorBg................................   24
  96.                          S_ErrorFg................................   24
  97.                          S_HelpBg.................................   24
  98.                          S_HelpFg.................................   24
  99.                          S_UserBg.................................   24
  100.                          S_UserFg.................................   24
  101.              Clearing the screen form:
  102.                  S_ClearScreen....................................   25
  103.              Refreshing or re-displaying a screen form:
  104.                  S_RefreshScreen..................................   26
  105.              Editing and accepting data in screen fields:
  106.                  Reading an entire screen:
  107.                      S_ReadScreen.................................   27
  108.                  Reading a single field:
  109.                      S_ReadField..................................   29
  110.                  Reading a single keystroke:
  111.                      S_ReadKey....................................   31
  112.                      S_NextKey....................................   32
  113.                  Field editing features...........................   33
  114.                      Enter key
  115.                          S_EnterAsTab.............................   19
  116.                      TAB key:
  117.                          Move to Next field (TAB).................   33
  118.                          Move to Previous field (SHIFT TAB).......   34
  119.                      DELETE key:
  120.                          Deleting single characters.(DEL).........   34
  121.                          Deleting right of cursor (SHIFT DEL).....   34
  122.                      INSERT key...................................   34
  123.                      BACK SPACE key...............................   35
  124.                      LEFT ARROW key...............................   35
  125.                      RIGHT ARROW key..............................   35
  126.       
  127.       
  128.       
  129.       
  130.       
  131.       
  132.       
  133.                                   Page I-3
  134.       
  135.       
  136.       
  137.              Detecting Special keys:
  138.                  Special Considerations:
  139.                      For S_ReadScreen and S_ReadField.............   36
  140.                      For S_ReadKey    and S_NextKey...............   36
  141.                  Function keys (F1 though F12)....................   37
  142.                      S_F1.........................................   37
  143.                      S_F2.........................................   37
  144.                      S_F3.........................................   37
  145.                      S_F4.........................................   37
  146.                      S_F5.........................................   37
  147.                      S_F6.........................................   37
  148.                      S_F7.........................................   37
  149.                      S_F8.........................................   37
  150.                      S_F9.........................................   37
  151.                      S_F10........................................   37
  152.                      S_F11........................................   37
  153.                      S_F12........................................   37
  154.                  Curosr control keys (key pad)....................   37
  155.                      S_Home.......................................   37
  156.                      S_End........................................   38
  157.                      S_PgUp.......................................   38
  158.                      S_PgDn.......................................   38
  159.                      S_Up.........................................   38
  160.                      S_Down.......................................   38
  161.                      S_Left.......................................   38
  162.                      S_Right......................................   38
  163.                      S_Ins........................................   38
  164.                      S_Del........................................   38
  165.                  Alt and Ctrl key combinations:
  166.                      S_Alt........................................   38
  167.                      S_Ctrl.......................................   38
  168.                      S_Ch.........................................   38
  169.                  Shift Keys:
  170.                      S_Shift......................................   40
  171.                      S_LeftShift..................................   40
  172.                      S_RightShift.................................   40
  173.                  Other Keys:
  174.                      S_Enter......................................   40
  175.                      S_Esc........................................   40
  176.                      S_Tab........................................   40
  177.                      S_BkSp.......................................   40
  178.                  Toggle key status indicators:
  179.                      S_Caps.......................................   41
  180.                      S_InsertMode.................................   41
  181.                      S_NumLock....................................   41
  182.                      S_ScrollLock.................................   41
  183.                  Resetting the key indicators:
  184.                      S_ResetKeyFlags..............................   42
  185.              Duplicating fields or repeating fields:
  186.                  Testing a fields dupe status.
  187.                      S_IsDupe.....................................   43
  188.                  Defining a dupe field:
  189.                      S_SetDupe....................................   44
  190.                  Resetting a dupe field back to its original 
  191.                  status.
  192.                      S_ResetDupe...................................  46
  193.                  Clearing all dupe fields:
  194.                      S_ClearDupes.................................   47
  195.       
  196.       
  197.       
  198.       
  199.                                   Page I-4
  200.       
  201.       
  202.              Validating field values:
  203.                  Validating the entire screens contents:
  204.                      S_ValidateScreen.............................   48
  205.                      S_ScreenValid................................   48
  206.                  Validating a single fields contents:
  207.                      S_ValidateField..............................   49
  208.                      S_ScreenValid................................   49
  209.              Changing DISPLAY only fields to DATA ENTRY Fields:
  210.                  S_SetDisplayOff..................................   51
  211.              Changing DATA ENTRY fields to DISPLAY only fields:
  212.                  S_SetDisplayOn...................................   52
  213.              Customizing Turbo ScrEdit Screens programmaticly:
  214.                  Changing the colors of a screen:
  215.                      S_ChangeScreenColor..........................   53
  216.                  Changing field colors:
  217.                      S_ChangeFieldColor...........................   55
  218.                  Displaying the color changes:
  219.                      S_RefreshScreen..............................   59
  220.                  Makeing color changes permanent:
  221.                      S_StoreColorChanges..........................   60
  222.       
  223.       
  224.       
  225.       
  226.       
  227.       
  228.       
  229.       
  230.       
  231.       
  232.       
  233.       
  234.       
  235.       
  236.       
  237.       
  238.       
  239.       
  240.       
  241.       
  242.       
  243.       
  244.       
  245.       
  246.       
  247.       
  248.       
  249.       
  250.       
  251.       
  252.       
  253.       
  254.       
  255.       
  256.       
  257.       
  258.       
  259.       
  260.       
  261.       
  262.       
  263.       
  264.       
  265.                                    Page I-5
  266.       
  267.       
  268.       Alphabetical list of user global variables:
  269.          S_Alt....................................................   38
  270.          S_AutoHelp...............................................   14
  271.          S_AutoHelpMsg............................................   22
  272.          S_AutoValidate...........................................   15
  273.          S_BkSp...................................................   41
  274.          S_Caps...................................................   42
  275.          S_Ch.....................................................   38
  276.          S_Cursor.................................................   18
  277.          S_Ctrl...................................................   38
  278.          S_Del....................................................   38
  279.          S_DelayScreen............................................   10
  280.          S_Down...................................................   38
  281.          S_End....................................................   38
  282.          S_Enter..................................................   19
  283.          S_EnterAsTab.............................................   19
  284.          S_ErrorBg................................................   24
  285.          S_ErrorDur...............................................   23 
  286.          S_ErrorFg................................................   24
  287.          S_ErrorFreq..............................................   23
  288.          S_ErrorMsg...............................................   22
  289.          S_ErrorSound.............................................   23
  290.          S_Esc....................................................   41
  291.          S_HelpBg.................................................   24
  292.          S_HelpDur................................................   23
  293.          S_HelpFg.................................................   25
  294.          S_HelpFreq...............................................   23
  295.          S_HelpSound..............................................   23
  296.          S_Home...................................................   38
  297.          S_InsertMode.............................................   42
  298.          S_Ins....................................................   38
  299.          S_Left...................................................   38
  300.          S_F1.....................................................   37
  301.          S_F2.....................................................   37
  302.          S_F3.....................................................   37
  303.          S_F4.....................................................   37
  304.          S_F5.....................................................   37
  305.          S_F6.....................................................   37
  306.          S_F7.....................................................   37
  307.          S_F8.....................................................   37
  308.          S_F9.....................................................   37
  309.          S_F10....................................................   37
  310.          S_F11....................................................   37
  311.          S_F12....................................................   37
  312.          S_NumLock................................................   42
  313.          S_PgUp...................................................   38
  314.          S_PgDn...................................................   38
  315.          S_Point..................................................   27,29,31,32
  316.          S_Right..................................................   38
  317.          S_ScreenValid............................................   48,49
  318.          S_ScrollLock.............................................   42
  319.          S_FirstField.............................................   27,29
  320.          S_Shift..................................................   40
  321.          S_ShiftLeft..............................................   40
  322.          S_ShiftRight.............................................   340
  323.          S_ShowStatus.............................................   13
  324.          S_StBg...................................................   13
  325.          S_StFb...................................................   13
  326.       
  327.       
  328.       
  329.       
  330.                                    Page I-6
  331.       
  332.        
  333.          S_StLabelBg..............................................   13
  334.          S_StLabelFg..............................................   13
  335.          S_Tab....................................................   41
  336.          S_Up.....................................................   38
  337.          S_UserBg.................................................   24
  338.          S_UserDur................................................   23
  339.          S_UserFg.................................................   24
  340.          S_UserFreq...............................................   23
  341.          S_UserMsg................................................   22
  342.          S_UserSound..............................................   23
  343.          S_ValidateField..........................................   49
  344.       
  345.       Alphabetical list of user procedures:
  346.          S_ChangeFieldColor.......................................   56
  347.          S_ChangeScreenColor......................................   53
  348.          S_ClearDupes.............................................   47
  349.          S_ClearScreen............................................   25
  350.          S_CloseScreenFile........................................   11
  351.          S_LoadScreen.............................................   10
  352.          S_Init.(Turbo C only)....................................    8
  353.          S_IsDupe.................................................   43 
  354.          S_NextKey................................................   32
  355.          S_OpenScreenFile.........................................    9
  356.          S_ReadField..............................................   29
  357.          S_ReadKey................................................   31
  358.          S_ReadScreen.............................................   27
  359.          S_RefreshScreen..........................................   58
  360.          S_ResetKeyFlags..........................................   42
  361.          S_ResetDupe..............................................   46
  362.          S_SetCursor..............................................   17
  363.          S_SetDisplayOn...........................................   52
  364.          S_SetDisplayOff..........................................   51
  365.          S_SetDupe................................................   44
  366.          S_StoreColorChanges......................................   60
  367.          S_ValidateScreen.........................................   48
  368.       
  369.       
  370.       
  371.       
  372.       
  373.       
  374.       
  375.       
  376.       
  377.       
  378.       
  379.       
  380.       
  381.       
  382.       
  383.       
  384.       
  385.       
  386.       
  387.       
  388.       
  389.       
  390.       
  391.       
  392.       
  393.       
  394.       
  395.       
  396.       
  397.                                   Page I-7
  398.       
  399.       
  400.       
  401.       MOUSE SUPPORT........................................(Section M)
  402.          How to use the Mouse section of the manual............... M-1
  403.          A word to the wise about using Turbo ScrEdit mouse....... M-1
  404.          How Turbo ScrEdit Mouse Support Works.................... M-2
  405.          Compiler Directives to include/exclude mouse procedures.. M-2
  406.          Example Programs:
  407.             Pascal................................................ M-3
  408.             C......................................................M-4
  409.          Global Variables and Constants........................... M-5
  410.          Initializing the mouse procedures........................ M-6  
  411.          S_ActivateMouse.......................................... M-6
  412.          S_AnalizeMouse........................................... M-7
  413.          S_DisableMouse........................................... M-8
  414.          S_HideMouse.............................................. M-9
  415.          S_RemoveMouse............................................ M-9 
  416.          S_ResetMouse............................................. M-10
  417.          S_ResetMouseFlags........................................ M-10
  418.          S_RestoreMouse........................................... M-11
  419.          S_SetMouseCursor......................................... M-12
  420.          S_SetMouseEvent.......................................... M-13
  421.          S_SetMouseRange.......................................... M-14
  422.          S_ShowMouse.............................................. M-15
  423.       
  424.       
  425.       Alphabetical listing of Mouse System global variables:
  426.          S_Buttons...........................................3 4 5    
  427.          S_MouseInstalled....................................3 4 5     
  428.          S_MouseEvent..(Pascal)..............................3 4 5 7  
  429.          S_Ms-MouseEvent (C).................................3 4 5 7 10
  430.          S_MsLeftPressed.....................................3 4 5 7 10 
  431.          S_MsLeftReleased....................................3 4 5 7 10
  432.          S_MsMiddlePressed...................................3 4 5 7 10
  433.          S_MsMiddleReleased..................................3 4 5 7 10
  434.          S_MsRightPressed....................................3 4 5 7 10
  435.          S_MsRightReleased...................................3 4 5 7 10
  436.          S_MsRow.............................................4 5 7      
  437.          S_MsColumn..........................................3 4 5 7   
  438.       
  439.       
  440.       
  441.       
  442.       
  443.       
  444.       
  445.       
  446.       
  447.       
  448.       
  449.       
  450.       
  451.       
  452.       
  453.       
  454.       
  455.       
  456.       
  457.       
  458.       
  459.       
  460.       
  461.       
  462.       
  463.                                   Page I-8
  464.       
  465.       
  466.       POP UP WINDOW SUPPORT (registered version only).......(Section W)
  467.          Introduction to Turbo ScrEdit Windows (TSW).............. W-1
  468.          Including Turbo ScrEdit Windows in your porgrams......... W-1 
  469.          Intializing Turbo ScrEdit Windows........................ W-3   
  470.          Memory usage and fragmentation considerations............ W-4 
  471.          How many windows can you use............................. M-4
  472.          How the screen memory is used............................ M-4
  473.          Terms used in this document.............................. M-5
  474.          Access a window by name or number........................ M-5
  475.          MAXWINDOWS............................................... W-6
  476.          USERWINDOW............................................... W-6
  477.          ChangeWindow............................................. W-7
  478.          ChgWindowBackGround...................................... W-9
  479.          ClearWindow.............................................. W-11
  480.          DefineWindow............................................. W-12
  481.          EraseWindow.............................................. W-15
  482.          MoveWindow............................................... W-15
  483.          OpenWindow............................................... W-17
  484.          PopWindow................................................ W-17
  485.          PauseWindowUpdates....................................... W-19
  486.          PushWindow............................................... W-18
  487.          ReadWindowField.......................................... W-21
  488.          ReadWindowLine........................................... W-24   
  489.          SaveWindow............................................... W-25
  490.          ShutWindow............................................... W-26
  491.          WindowsEnd............................................... W-27
  492.          WindowsInit.............................................. W-28
  493.          WriteWindowField......................................... W-29
  494.          WriteWindowLine.......................................... W-32
  495.       
  496.       
  497.       
  498.       
  499.       
  500.       
  501.       
  502.       
  503.       
  504.       
  505.       
  506.       
  507.       
  508.       
  509.       
  510.       
  511.       
  512.       
  513.       
  514.       
  515.       
  516.       
  517.       
  518.       
  519.       
  520.       
  521.       
  522.       
  523.       
  524.       
  525.       
  526.       
  527.       
  528.       
  529.                                   Page I-9
  530.            
  531.       TURBO SCREDIT TUTOR PART I..(The Screen Editor).....(Section T-1)
  532.           Introduction to Turbo ScrEdit Tutor....................T-1.1
  533.           Getting Started........................................T-1.1
  534.           Using the on-line user manual (help system).(F7).......T-1.2
  535.               Scrolling up and down in the on-line index.........T-1.2
  536.               Selecting topics fro the index screen..............T-1.3
  537.               Using the string search............................T-1.3
  538.               Printing all or part of the manual.................T-1.4
  539.               Using the manual index listing.....................T-1.4
  540.               Exiting the on-line help system....................T-1.5
  541.           Exiting the Turbo ScrEdit environment.(ESC)............T-1.5
  542.           Viewing disk directories.(F5)..........................T-1.5
  543.           Description of a screen file...........................T-1.6
  544.           Selecting a screen file to create or edit.(F1).........T-1.6
  545.               Field editing features.............................T-1.6
  546.           Working with screen files..............................T-1.8
  547.               Adding screen to a screen file.(INS)...............T-1.8
  548.               Renaming a screen.(TAB)............................T-1.9   
  549.               Scrolling screen names (HOME) (END)................T-1.9
  550.               Deleting screens from the screen file.(DEL)........T-1.10
  551.               Automatic screen file backups......................T-1.10
  552.           Editing a screen record................................T-1.11     
  553.               Starting the screen editor.(F2)....................T-1.11
  554.               The editor status line.............................T-1.11
  555.               Cursor movement....................................T-1.11
  556.               Changing the direction that the cursor travels.....T-1.11.2
  557.               Insert and overtype mode...........................T-1.12
  558.               Keyboard Graphics character mode...................T-1.12
  559.               The Quick reference editor help screen.............T-1.12
  560.               Switching between graphics and character mode......T-1.13
  561.               Changing character colors..........................T-1.13
  562.               Inserting blank lines..............................T-1.14
  563.               Deleting screen lines..............................T-1.14
  564.               Saving and Undoing screen changes..................T-1.14
  565.               Cutting and pasting screen text....................T-1.15
  566.                   Copying a block of text........................T-1.15
  567.                   Copying a line of text.........................T-1.17
  568.                   Moving a block of text.........................T-1.18
  569.               Drawing lines and boxes............................T-1.18
  570.               Typing any ASCII...................................T-1.20
  571.           Compiling the screen.(F4)..............................T-1.22
  572.               Selecting the compiler you are using...............T-1.23
  573.               Setting the default field data type................T-1.23
  574.               Defining field types and processing specs..........T-1.24
  575.           Testing a screen.(F10).................................T-1.27
  576.           Changing a screens field order.(F6)....................T-1.28
  577.           Changing the field attribute colors.(F8)...............T-1.28
  578.           Printing a screen listing.(F5).........................T-1.30
  579.           Copying text from other screens.(F3)...................T-1.30
  580.           Generating source code (G).............................T-1.32
  581.              Selecting the compiler language for source code.....T-1.32
  582.              Suppressing skeleton file comments..................T-1.32
  583.              Options for using screen buffers....................T-1.32
  584.              Controlling character case in the new source file...T-1.33
  585.              Specifying the skeleton file location...............T-1.33
  586.              Selecting the screens to be included in generation..T-1.33
  587.       
  588.       
  589.       
  590.       
  591.       
  592.       
  593.       
  594.       
  595.                                  Page I-10
  596.       
  597.       
  598.       TURBO SCREDIT TUTOR PART II.(Field Processing stmts).(Section T-2)
  599.       
  600.       Introduction to Turbo ScrEdit Tutor Part II.....T-2.1
  601.       Using the processing specifications editor......T-2.2
  602.       SET.............................................T-2.5
  603.       REQUIRED........................................T-2.5,6,11,14
  604.       HELP............................................T-2.6
  605.       REM.............................................T-2.7
  606.       IN..............................................T-2.7,8,11,12,14
  607.       UP SHIFT ON/OFF.................................T-2.7,9,11
  608.       IF [AND,OR] THEN/ENDIF..........................T-2.8,9,10,11,12,
  609.                                                           13,
  610.       ERROR...........................................T-2.10
  611.       SKIP............................................T-2.8
  612.       SKIP IF BLANK...................................T-2.10
  613.       EDIT............................................T-2.14
  614.       
  615.       
  616.       
  617.       
  618.       
  619.       
  620.       
  621.       
  622.       
  623.       
  624.       
  625.       
  626.       
  627.       
  628.       
  629.       
  630.       
  631.       
  632.       
  633.       
  634.       
  635.       
  636.       
  637.       
  638.       
  639.       
  640.       
  641.       
  642.       
  643.       
  644.       
  645.       
  646.       
  647.       
  648.       
  649.       
  650.       
  651.       
  652.       
  653.       
  654.       
  655.       
  656.       
  657.       
  658.       
  659.       
  660.       
  661.                                   Page I-11
  662.       
  663.        TURBO SCREDIT TUTOR PART III - Programming with Turbo ScrEdit.
  664.           Introduction to Turbo ScrEdit Tutor Part III.........T-3.1  
  665.           What you need before you get started.................T-3.1
  666.           A MINIMUM coding example.............................T-3.3
  667.           Programs generated by Turbo ScrEdit (G Menu Option)..T-3.5
  668.              Generating a source code file.....................T-3.6
  669.              Understanding the source code generated...........T-3.7
  670.              Compiling and running the generated programs......T-3.14
  671.           A look at ScrDemo.Exe................................T-3.15
  672.              Option 1 - A data entry example...................T-3.20
  673.                  S_ClearScreen and the SET command.............T-3.21
  674.                  S_EnterAsTab..................................T-3.24
  675.                  S_IsDupe, S_SetDupe, S_ClearDupes.............T-3.25
  676.                  Changing the value of a DUPE field............T-3.26
  677.                  Sound ON/OFF..................................T-3.27
  678.                  Auto Help ON/OFF..............................T-3.28
  679.                  Auto Validate ON/OFF..........................T-3.28
  680.                  Changing message line colors..................T-3.29
  681.              Option 2 - Demo of MOUSE functions................T-3.30
  682.                  S_MouseInstalled..............................T-3.30
  683.                  S_ActivateMouse...............................T-3.30
  684.                  S_SetMouseEvent...............................T-3.30
  685.                  S_SetMouseRange...............................T-3.31
  686.                  S_MsRow & S_MsCol.............................T-3.31
  687.                  S_ShowMouse...................................T-3.31
  688.                  S_ResetMouseFlags.............................T-3.32
  689.                  S_MouseEvent (S_Ms->MouseEvent for C).........T-3.32
  690.                  S_AnalizeMouse................................T-3.32
  691.                  S_HideMouse...................................T-3.38
  692.                  S_DisableMouse................................T-3.38
  693.              Option 3 - Customizing screen colors..............T-3.38     
  694.                  S_ChangeScreenColors..........................T-3.39
  695.                  S_ChangeFieldColors...........................T-3.40
  696.                  S_StoreColorChanges...........................T-3.41
  697.              Options 4 through 9...............................T-3.42
  698.       
  699.       
  700.       
  701.       
  702.       
  703.       
  704.       
  705.       
  706.       
  707.       
  708.       
  709.       
  710.       
  711.       
  712.       
  713.       
  714.       
  715.       
  716.       
  717.       
  718.       
  719.       
  720.       
  721.       
  722.       
  723.       
  724.       
  725.       
  726.       
  727.                                    Page 1
  728.       
  729.       
  730.       
  731.       -----------------------------------------------------------------
  732.                               ** DISCLAIMER **
  733.       -----------------------------------------------------------------
  734.       
  735.       Turbo   ScrEdit  diskettes,  programs,  and   documentation   are 
  736.       distributed  AS IS, with no guarantee it will work  correctly  in 
  737.       any or all situations.
  738.       
  739.       The   manual  may contain errors and/or omissions.  In  no  event  
  740.       will iHn Systems  be  liable for  any damages  or  losses  of any 
  741.       type.  YOU  USE Turbo ScrEdit and Turbo ScrEdit Windows  AT  YOUR 
  742.       OWN   RISK.   Further,  all   offers   for   technical   support, 
  743.       notification of updated versions, including the stated  fees  for
  744.       updated versions, are subject to  withdrawal  or increase without 
  745.       prior notice.
  746.       
  747.       IF   YOU  USE THIS SOFTWARE, YOU ARE ACCEPTING   ALL   CONDITIONS  
  748.       AS STATED  ABOVE  AND  AGREE  TO COMPLY  WITH  THE  LEGAL   TERMS  
  749.       AND   CONDITIONS AS STATED IN THE NOTES TO USERS SECTIONS of  the 
  750.       field  PRINTME.1ST. If  you do not accept  these  conditions  and 
  751.       terms, delete the Turbo ScrEdit files from your system!
  752.       
  753.       No    refunds  will  be  granted  under  any   conditions.    The  
  754.       evaluation  version  is provided to allow potential customers  to 
  755.       determine   the  suitability  of  the software   for  thier  needs 
  756.       before you purchasing a license.
  757.       
  758.       -----------------------------------------------------------------
  759.                               ** DISCLAIMER **
  760.       -----------------------------------------------------------------
  761.       
  762.       
  763.       
  764.       
  765.       
  766.       
  767.       
  768.       
  769.       
  770.       
  771.       
  772.       
  773.       
  774.       
  775.       
  776.       
  777.       
  778.       
  779.       
  780.       
  781.       
  782.       
  783.       
  784.       
  785.       
  786.       
  787.       
  788.       
  789.       
  790.       
  791.       
  792.       
  793.                                    Page 2                  
  794.       
  795.       
  796.       
  797.       CONFIG.SYS requirements:                      
  798.       -----------------------------------------------------------------
  799.       Before using Turbo ScrEdit to create screens you should place the 
  800.       following lines in your CONFIG.SYS file on the root directory  of 
  801.       the disk that you will use to boot your system.
  802.                                                                 
  803.       Required lines: FILES=20
  804.                       BUFFERS=20
  805.       
  806.       
  807.       
  808.       If Turbo ScrEdit does not work:
  809.       -----------------------------------------------------------------
  810.       We  have had only two users call that were having problems  using 
  811.       Turbo ScrEdit.  In this section I will describe the problem  that 
  812.       was  reported  and the solutions that were worked  out  over  the 
  813.       phone. 
  814.       
  815.       Problem:
  816.           Using  Turbo C, ScrDemo.C would compile correctly,  but  when      
  817.           the .exe file was executed the system would hang.
  818.       
  819.       Solution:
  820.           We found that the compilers OPTIONS/LINKER/DEFAULT  LIBRARIES 
  821.           switch was set to OFF and had to be set to ON.
  822.       
  823.       Problem:
  824.           The  user  had  used Turbo ScrEdit to create a  screen  in  a 
  825.           screen  file. When he selected the "G" option from  the  main 
  826.           menu  to  generated the skeleton file for his  screen,  Turbo 
  827.           ScrEdit "bombed" issuing a RUN TIME ERROR 4. 
  828.       
  829.       Solution:
  830.           We  had to add a CONFIG.SYS file to his boot  root  directory 
  831.           with the lines FILES=20 and BUFFERS=20 in it. See  CONFIG.SYS 
  832.           requirements in this manual.
  833.       
  834.       
  835.       
  836.       Preparing Turbo ScrEdit Interface for use in programs.
  837.       -----------------------------------------------------------------
  838.       Setting  the compiler directives before compiling  the  interface 
  839.       source code.
  840.       
  841.          The  following compiler directives can be found in  the  first 
  842.          few lines of the interface source code listings  "ScrEdit.Pas" 
  843.          and C include file "#defines.C".
  844.       
  845.              MOUSE
  846.              VALIDATE
  847.              COLORCHANGE
  848.       
  849.          These  compiler directives have been supplied to allow you  to 
  850.          control  the size of the object code that is linked into  your 
  851.          program.  IF  YOU  ARE NOT CONCERNED ABOUT THE  SIZE  OF  YOUR 
  852.          PROGRAM  AND  YOU WISH TO HAVE ALL  TURBO  SCREDIT  PROCEDURES 
  853.          AVAILABLE  TO YOU AT ALL TIMES,  do not change these  compiler 
  854.       
  855.       
  856.       
  857.       
  858.       
  859.                                    Page 3
  860.       
  861.       
  862.       
  863.          directives.  By default these directives are defined and  will 
  864.          compile all procedures into the units and library files.
  865.          If  either  of the compiler directives MOUSE or  VALIDATE  are 
  866.          defined  when the source code is compiled, the object code  is 
  867.          generated to perform the various validation and mouse  control 
  868.          functions.  Because of the way that the mouse  and  validation 
  869.          procedures are used by the Turbo ScrEdit interface module, the 
  870.          smart  linker  will  not  be able  to  exclude  any  of  these 
  871.          procedures  when it is linking the program.
  872.       
  873.          COLORCHANGE - (Default is Defined)
  874.              Turbo ScrEdit has a set of procedures that can dynamically 
  875.              change  the  color attributes of any portion  of  a  Turbo 
  876.              ScrEdit screen or it's fields.
  877.       
  878.              When  COLORCHANGE  is defined  the procedures  for  making 
  879.              color changes will be compiled into the object module  and 
  880.              stored in the resulting ".TPU" or "Library"  file.
  881.       
  882.              When   COLORCHANGE  is  not  defined  the   color   change 
  883.              procedures are excluded during the compile.
  884.       
  885.              The  procedures for making color changes WILL BE  EXCLUDED 
  886.              from your executable programs by the smart linker if  they 
  887.              are not referenced by your program. 
  888.       
  889.        
  890.          MOUSE - (Default is Defined) 
  891.              This directive determines if the procedures for detecting 
  892.              and controlling mouse activities will be available to your 
  893.              program.
  894.       
  895.              When MOUSE (is) defined during compile:
  896.       
  897.              Pascal:  
  898.                 With  the MOUSE directive defined when  ScrEdit.Pas  is 
  899.                 compiled two units will be created, (ScrMouse.Tpu,  and 
  900.                 ScrEdit.Tpu).  To use Turbo ScrEdit and mouse  in  your 
  901.                 programs  you  will have to include  a  uses  statement 
  902.                 like:
  903.       
  904.                 Uses ScrMouse,ScrEdit;
  905.       
  906.              C: 
  907.                 The  C  version is a little different than  the  pascal 
  908.                 version.   The  mouse  procedures  source   code   file 
  909.                 "ScrMouse.C"  is included with the  "ScrEdit.C"  source 
  910.                 code  when  it is compiled. The library  files  created 
  911.                 will  include  all of the mouse procedures.  The  mouse 
  912.                 procedures are prototyped in ScrEdit.H. See the section 
  913.                 "How to include Turbo ScrEdit in you program" for  more 
  914.                 information on using mouse procedures. 
  915.       
  916.              When MOUSE (is not) defined during compile: 
  917.       
  918.                 With this compiler directive disabled, you will not  be 
  919.                 able  to  access  or  use  mouse  procedures  in   your 
  920.                 programs.
  921.       
  922.       
  923.       
  924.       
  925.                                    Page 4
  926.       
  927.       
  928.       
  929.          VALIDATE - (Default is Defined) 
  930.              This directive determines if the procedures that are  used 
  931.              for processing  field  validation  statements  are  to  be 
  932.              included in the resulting ".TPU" or "library" file.
  933.       
  934.              When VALIDATE (IS) defined during compile:
  935.       
  936.                  With  the VALIDATE directive defined when  ScrEdit.Pas 
  937.                  or  ScrEdit.C is compiled, the  validation  procedures 
  938.                  will  be  generated into the unit  and  library  files 
  939.                  created. The smart linker will not be able to link out 
  940.                  any of the procedures. 
  941.                 
  942.              When VALIDATE (IS NOT) defined during compile:
  943.       
  944.                  No  validation  procedures  are  generated,  and   any 
  945.                  validation  statements that have been defined for  the 
  946.                  fields on a screen will be ignored.
  947.       
  948.              IMPORTANT NOTE -
  949.       
  950.                 If   the  fields  of  your  screens  are   using   HELP 
  951.                 statements,  EDIT MASKS, or SET statements,  they  will 
  952.                 still  be recognized and will have the  desired  effect 
  953.                 whether or not validation procedures are generated. 
  954.       
  955.       
  956.       
  957.       Creating the Turbo Pascal Unit file:
  958.       -----------------------------------------------------------------
  959.       There  are  two  ways  to create  the  Turbo  Pascal  unit  files 
  960.       "ScrMouse.Tpu" and "ScrEdit.Tpu", and "Windows.Tpu":
  961.       
  962.       Before  you  begin make sure that the pascal  source  code  files 
  963.       "ScrMouse.Pas",   "Validate.Pas",  and "ScrEdit.Pas" are  in  the 
  964.       current  directory or diskette. If you installing the  registered 
  965.       version  also  copy  "Windows.Pas" into  the  same  directory  or 
  966.       diskette.
  967.       
  968.       
  969.       Method 1 - Using TPUBUILD.BAT
  970.          --------------------------------------------------------------
  971.          TpuBuild.Bat will accept 3 parameters in the format of:
  972.       
  973.          C:>TpuBuild A [B] [C]
  974.       
  975.          Where:      A : can be 4 for Turbo Pascal 4.0
  976.                                 5 for Turbo Pascal 5.0 or 5.5
  977.                      B : Is  the drive and directory where  the  command 
  978.                          line  compiler  TPC.EXE is  located.  
  979.                      C : Is the drive and directory where you wish  the 
  980.                          unit files to be stored as they are created. 
  981.                              
  982.          Example:
  983.              TpuBuild 5 C:\Tp C:\Tp\Units
  984.       
  985.       
  986.       
  987.       
  988.       
  989.       
  990.       
  991.                                     Page 4.5
  992.       
  993.       
  994.       
  995.       
  996.          The  above example will use the 5.0 5.5 command line  compiler 
  997.          format.  It  will  expect to find the  command  line  compiler 
  998.          TPC.EXE  in  the directory  "C:\Tp". The unit  files  will  be 
  999.          created and stored in the directory "C:\Tp\Units".
  1000.       
  1001.          If  you are working on a dual floppy system you would   put  a 
  1002.          system  disk in drive A: with a copy of the Turbo Compiler  on 
  1003.          it.
  1004.       
  1005.          In  drive  B: you have the diskette that  contains  the  above 
  1006.          listed files.
  1007.       
  1008.          You would make drive B: the current drive and type:
  1009.       
  1010.          TpuBuild 5 A:
  1011.       
  1012.          This  format  would  use the  5.0/5.5  command  line  compiler 
  1013.          format.  It will execute TPC.EXE from drive A:. It will  place 
  1014.          the unit or ".TPU" files on drive B:.
  1015.       
  1016.       
  1017.          After  you  have  created the unit files make  sure  that  the 
  1018.          directory  where you have stored them is included in the  list 
  1019.          of  directories in the OPTION/DIRECTORY/UNITS menu  option  of 
  1020.          you pascal programming environment.
  1021.       
  1022.        
  1023.       
  1024.       
  1025.       Method 2 - Using your programming editor environment.
  1026.          --------------------------------------------------------------
  1027.          - Load the Turbo Pascal programming environment.
  1028.          - Set the OPTION/COMPILER/LOCAL SYMBOLS to OFF
  1029.               (Alt O C L)
  1030.          - Set the OPTION/COMPILER/DEBUG INFORMATION to OFF
  1031.               (Alt O C D)
  1032.          - Set  the OPTION/DIRECTORIES/EXE & TPU  line to  specify  the 
  1033.            same   directory   path  that  you  have   listed   on   the    
  1034.            OPTION/DIRECTORY/UNIT line.
  1035.               (Alt O D E type in your unit directory)
  1036.          - Set the COMPILE/DESTINATION switch to DISK.
  1037.               (Alt C D Memory)
  1038.          - Set the OPTION/LINKER/LINK BUFFER switch to DISK.
  1039.               (Alt O L L) 
  1040.          - Set the COMPILE/PRIMARY FILE switch to "ScrEdit.Pas"
  1041.               (Alt C P ScrEdit.Pas)
  1042.          - Select COMPILE/COMPILE to compile the source code and create 
  1043.            the unit files.
  1044.               (Alt C C)
  1045.          - Reset  OPTION/DIRECTORIES/EXE  &  TPU back to  what  it  was   
  1046.            before.
  1047.               (Alt O D E Delete all characters)
  1048.             
  1049.       
  1050.       
  1051.       
  1052.       
  1053.       
  1054.       
  1055.       
  1056.       
  1057.                                    Page 5
  1058.       
  1059.       
  1060.       
  1061.       After  following  the  above steps Turbo ScrEdit  and  the  mouse 
  1062.       features  are ready to be used in your programs. See the "How  to 
  1063.       include Turbo ScrEdit in your program" section of this manual for 
  1064.       more information on how to use Turbo ScrEdit in your program.
  1065.       
  1066.       You   may   now  delete   "Validate.Pas",   "ScrMouse.Pas",   and 
  1067.       "ScrEdit.Pas"  from  your  system.  Only  the  ".Tpu"  files  are 
  1068.       required for using Turbo ScrEdit in your programs. 
  1069.       
  1070.       
  1071.       Creating the Turbo C library files:
  1072.       -----------------------------------------------------------------
  1073.       The  batch  file  LIBBUILD.BAT is used to  create  Turbo  Scredit 
  1074.       library files for MEDIUM, COMPACT, LARGE, and HUGE memory models. 
  1075.       To  use  this  batch file, load it into  your  Turbo  Programming 
  1076.       environment  and change the INCLUDE and LIBRARY  directories  for 
  1077.       your systems.
  1078.       
  1079.       One of the four compile lines looks like this now:
  1080.       
  1081.       tcc -mm -v- -c -d -oScrEdit.ObJ 
  1082.           -IC:\B\TC20\INCLUDE -LC:\B\TC20\LIB Scredit.c
  1083.             ^^^^^^^^^^^^^^^     ^^^^^^^^^^^
  1084.       You might change it to look like this:
  1085.       tcc -mm -v- -c -d -oScrEdit.ObJ 
  1086.           -IC:\TC\INCLUDE -LC:\TC\LIB Scredit.c 
  1087.             ^^^^^^^^^^^^^   ^^^^^^^^^  
  1088.       Make  these  changes on all four of the lines  that  execute  the 
  1089.       Turbo  C Command line compiler "TCC". Notice that the above  line 
  1090.       was  changed  to use the default directories established  by  the 
  1091.       Turbo C installation program.
  1092.       
  1093.       Next - Make sure that the Turbo C Command line compiler (TCC) and 
  1094.       the  Turbo  Librarian utility (TLIB) are either  in  the  current 
  1095.       directory  where you are going to initiate LIBBUILD.BAT  or  that 
  1096.       there  is  a  system PATH statement  defined  that  includes  the 
  1097.       directory where these files reside.
  1098.       
  1099.       Next - Make sure that you have copied "Validate.C", "ScrMouse.C", 
  1100.       and "ScrEdit.C" source code files into the current directory.
  1101.       
  1102.       Before  launching  LIBBUILD.BAT you need to decide  which  memory 
  1103.       model  libraries you will want to use. If you have adequate  disk 
  1104.       space you may just want to use the ALL option.
  1105.       
  1106.       Next - Type: LIBBUILD Option
  1107.       
  1108.              Options: M = generate the MEDIUM   memory model library.
  1109.                       C = generate the COMPACT  memory model library.
  1110.                       L = generate the LARGE    memory model library.
  1111.                       H = generate the HUGE     memory model library.
  1112.                     ALL = generate the All Four memory model libraries.
  1113.               
  1114.       
  1115.       
  1116.       
  1117.       
  1118.       
  1119.       
  1120.       
  1121.       
  1122.       
  1123.                                    Page 6
  1124.       
  1125.       
  1126.       
  1127.       When  LIBBUILD.BAT  finishes you will have at least  one  of  the 
  1128.       following library files created: 
  1129.       
  1130.       ScrEditM.Lib  (for MEDIUM memory model programming)
  1131.            ScrEditC.Lib  (for COMPACT memory model programming)
  1132.            ScrEditL.Lib  (for LARGE memory model programming)
  1133.            ScrEditH.Lib  (for HUGE memory model programming)
  1134.            
  1135.       Copy  the  library files to your library directory. You  may  now 
  1136.       delete    "LibBuild.Bat",   "Validate.C",    "ScrMouse.C",    and 
  1137.       "ScrEdit.C". 
  1138.       
  1139.       You are now ready to use Turbo ScrEdit procedures in your Turbo C 
  1140.       programs.  For more details on using the Turbo C  libraries,  see 
  1141.       the Turbo C instructions that follow in the "How to include Turbo 
  1142.       ScrEdit in your program" section of this manual. 
  1143.       
  1144.       
  1145.       
  1146.       How to include Turbo Scredit in your program.
  1147.       -----------------------------------------------------------------
  1148.       Pascal:
  1149.          To make Turbo Scredit procedures available to your programs you 
  1150.          must  include a reference to "ScrEdit.TPU" and  "ScrMouse.Tpu" 
  1151.          in your programs "USES" statement.
  1152.       
  1153.          Example:
  1154.              Uses Crt,Dos,Printer,ScrMouse,ScrEdit.
  1155.                                   ^^^^^^^^ ^^^^^^^
  1156.          Be  sure that the unit files "ScrEdit.Tpu" and  "ScrMouse.Tpu" 
  1157.          reside  in  one  of  the directory  paths  referenced  in  the 
  1158.          OPTION/DIRECTORIES/UNIT  line of the Turbo Pascal  programming 
  1159.          environment, or that they are copied to the  current  directory 
  1160.          that you are going to be compiling in.
  1161.        
  1162.       C:
  1163.          Step 1: Turbo  ScrEdit  supports MEDIUM, COMPACT,  LARGE,  and 
  1164.                  HUGE  memory models. Set your programming  environment 
  1165.                  OPTIONS/COMPILER/MODEL switch to the memory model that 
  1166.                  you wish to work with. 
  1167.       
  1168.          Step 2: Include  Turbo  ScrEdit's header file  (ScrEdit.H)  in 
  1169.                  your programs list of #include statements.
  1170.       
  1171.                  Example:
  1172.                     #include <stdlib.h>
  1173.                     #include <math.h>
  1174.                     #include <conio.h>
  1175.                     #include "scredit.h"    <== this include statement
  1176.       
  1177.       
  1178.       
  1179.       
  1180.       
  1181.       
  1182.       
  1183.       
  1184.       
  1185.       
  1186.       
  1187.       
  1188.       
  1189.                                    Page 7
  1190.       
  1191.       
  1192.       
  1193.          Step 3: Prepare a project file for the program you are working 
  1194.                  with.  The  first  line of  the  project  file  should 
  1195.                  contain  your  program name, the  second  line  should 
  1196.                  contain  the  drive, path and library file  name  that 
  1197.                  agrees with the memory model selected in Step 1.
  1198.       
  1199.                  Example Project file for MEDIUM memory model: 
  1200.                    YourProg
  1201.                    C:\TC\LIB\ScrEditM.Lib
  1202.       
  1203.          If the above lines were stored in a file named "YourProg.Prj", 
  1204.          you  would  set the PROJECT/PROJECT NAME line of the  Turbo  C 
  1205.          programming environment to read "YOURPROG.PRJ".
  1206.       
  1207.          Now each time you RUN, BUILD, or MAKE YourProg.C, Turbo C will 
  1208.          link in the object code of the Turbo Scredit library file.
  1209.       
  1210.       
  1211.       
  1212.       Using Turbo ScrEdit from within your program.
  1213.       -----------------------------------------------------------------
  1214.       Turbo ScrEdit can seem a little intimidating when you first begin 
  1215.       using  it,  but, it is really quite simple to use.  You  can  use 
  1216.       Turbo ScrEdit's "G" menu option to generate a complete, ready  to 
  1217.       compile  and  run,  skeleton program that can  use  one  or  more 
  1218.       screens in a screen file. You can then use the skeleton file as a 
  1219.       starting  point for creating your custom application. Or, if  you 
  1220.       prefer,  you can easily write your own programs  from  "scratch." 
  1221.       
  1222.       Below  is  a  listing of the MINIMUM coding required  to  open  a 
  1223.       screen file, display a screen, and begin doing data entry in  the 
  1224.       screen form.
  1225.       
  1226.          An  example of the smallest possible working program to use  a 
  1227.          Turbo ScrEdit screen.
  1228.          -------------------------------------------------------------- 
  1229.              Pascal                         C
  1230.              -----------------------------  ---------------------------
  1231.              Uses ScrEdit;                  #include "ScrEdit.H"
  1232.       ==1>   {$I YourFile.001}               #include "YourFile.001"
  1233.                                             void main()
  1234.                                             {
  1235.              Begin                          S_Init();
  1236.       ==2>   S_OpenScreenFile('YourFile');  S_OpenScreenFile("YourFile");
  1237.       ==3>   Initialize_YourScreen_Buf;     Initialize_YourScreen_buf;  
  1238.       ==4>   S_LoadScreen('YourScreen');    S_LoadScreen("YourScreen");
  1239.              Repeat                         do{
  1240.                S_ReadScreen;                  S_ReadScreen();
  1241.                If S_Enter Then                if (S_Enter)
  1242.                   S_UserMsg :=                   strcpy(S_UserMsg,
  1243.                     ' PROCESS SCREEN ';             " PROCESS SCREEN ");
  1244.              Until S_Esc;                     }
  1245.                                             while (!S_Esc);
  1246.              S_CloseScreenFile;             S_CloseScreenFile();
  1247.              End.                           }  
  1248.              ------------------------------ ---------------------------
  1249.              
  1250.       
  1251.       
  1252.       
  1253.       
  1254.       
  1255.                                    Page 8
  1256.       
  1257.       
  1258.       
  1259.       As  you can see, it does not take much to get started. Either  of 
  1260.       the  above programs can be keyed into a file, compiled, and  ran. 
  1261.       To use a screen that you have created, make the following changes 
  1262.       to the lines with that are marked:
  1263.       
  1264.            ==1>  Change "YourFile" to the name of the screen file  that 
  1265.                  have  creatd.  You  can  use  drive:\path\fileName.SCR 
  1266.                  format.
  1267.                  
  1268.                  Also  change  the ".001" to reference the  the  screen 
  1269.                  record  definitions  file genreated by  Turbo  ScrEdit 
  1270.                  when  you  compiled your screen.  The  screen  listing 
  1271.                  generated  by  the  main menu option  "F5"  lists  the 
  1272.                  screen definitions file name.
  1273.                   
  1274.            ==2>  Change "YourFile" to the name of the screen file  that 
  1275.                  you have created.
  1276.       
  1277.            ==3> 
  1278.            ==4>  On these lines change "YourScreen" to the name of  the 
  1279.                  screen that you created.
  1280.               
  1281.       From  this point forward you would add your logic to make a  menu 
  1282.       that can call other programs, or perhaps a data entry program  to 
  1283.       add,  delete,  change,  inquire,  and  otherwise  manipulate  the 
  1284.       records in a file or files. 
  1285.       
  1286.       The  files "Smallest.Pas" and "Smallest.C" have been included  in 
  1287.       your  Turbo ScrEdit  package,  and  contain  the  above   example 
  1288.       programs.
  1289.       
  1290.       See ScrEdit.Tut for an explanation of how to compile and run  the 
  1291.       examples.
  1292.       
  1293.       
  1294.       Initializing the interface unit.
  1295.       -----------------------------------------------------------------
  1296.       Pascal:
  1297.           Initialization is automatic.
  1298.       
  1299.       C:
  1300.           Before  calling  any  of the Turbo  ScrEdit  procedures  call 
  1301.           S_Init().  
  1302.       
  1303.           Example:
  1304.       
  1305.              #include "ScrEdit.H"
  1306.              #include "YourFile.001"
  1307.              .
  1308.              .
  1309.              void main()
  1310.              {
  1311.       ===>   S_Init();
  1312.              S_OpenScreenFile("YourFile");
  1313.              .
  1314.              .
  1315.              }
  1316.       
  1317.       
  1318.       
  1319.       
  1320.       
  1321.                                    Page 9
  1322.       
  1323.       
  1324.       
  1325.       Initializing Screens.
  1326.       -----------------------------------------------------------------
  1327.       When  Turbo ScrEdit compiles the screen (using main  menu  option 
  1328.       F4), it creates a file that contains the source code that defines 
  1329.       the  screen fields as data elements of a  record. The  same  file 
  1330.       contains the routine that initializes the screen record.
  1331.       
  1332.       If  you use the source code generation facility of Turbo  ScrEdit 
  1333.       (the 'G' option on the main menu), Turbo ScrEdit will include all 
  1334.       the  necessary screen records in the skeleton file. It will  also 
  1335.       create  calls  to the initialization routines. 
  1336.       
  1337.       If you decide to code your own programs from "scratch",  you must 
  1338.       be  sure  to include the screen record definitions  generated  by 
  1339.       Turbo  ScrEdit  into your program. You must also code a  call  to 
  1340.       each of the screens initialization routines. 
  1341.       
  1342.       ** IMPORTANT NOTE **
  1343.       
  1344.       -  The screen initialization routine  (Initialize_YourScreen_buf) 
  1345.          must be called AFTER the screen file is opened.
  1346.       -  If you use more than one SCREEN FILE you must reinitialize the
  1347.          screens of the files each time the SCREEN FILES are opened. 
  1348.       
  1349.       Turbo  ScrEdit  names the screen definition record by  using  the 
  1350.       screen  file name and appending a dot (".") to it followed  by  a 
  1351.       three digit number generated according to the screens postion  in 
  1352.       the  screen file index. Thus, "YourScr.001" would be  the  screen 
  1353.       record  definitions  for  the first screen  in  the  screen  file 
  1354.       "YourScr.Scr".  If you are not sure what a screens number is  you 
  1355.       can  find  it on the top of the screen listing gererated  by  the 
  1356.       main menu F5 option.
  1357.       
  1358.       It  is  important  that  the records  be  properly  included  and 
  1359.       initialized before you attempt to use them. Failure to do so will 
  1360.       cause unpredictable results.
  1361.       
  1362.       Example:
  1363.              Pascal                         C
  1364.              -----------------------------  ---------------------------
  1365.              Uses ScrEdit;                  #include "ScrEdit.H"
  1366.       ===>   {$I Yourfile.001}              #include "YourFile.001"
  1367.                                             void main()
  1368.                                             {
  1369.              Begin                          S_Init();
  1370.              S_OpenScreenFile('YourFile');  S_OpenScreenFile("YourFile");
  1371.       ===>   Initialize_YourScreen_Buf;     Initialize_YourScreen_buf;  
  1372.              .                              .
  1373.              .                              .
  1374.              ------------------------------ --------------------------- 
  1375.              In the above examples the first pointer is pointing to the 
  1376.              include statement that includes the record definitions for 
  1377.              screen 1 of YourFile.Scr.
  1378.       
  1379.              The   second   pointer  points  out  the   call   to   the 
  1380.              initialization routine for the screen record.
  1381.       
  1382.       
  1383.       
  1384.       
  1385.       
  1386.       
  1387.                                    Page 10
  1388.       
  1389.       
  1390.       
  1391.       Opening a screen file for use.
  1392.       -----------------------------------------------------------------
  1393.       Procedure: S_OpenScreenFile(FileName)
  1394.       Function:  Opens a screen file and prepares it to be accessed.
  1395.       Remarks:   If  the  screen file specified by  FileName  does  not 
  1396.                  exist,  or  does  not contain any  records,  an  error 
  1397.                  message is displayed on the bottom line of the  screen 
  1398.                  and the program halts.
  1399.       
  1400.       Defined in C:
  1401.                  void S_OpenScreenFile(char * ScrFileName)
  1402.         
  1403.       Defined in Pascal:
  1404.                  Procedure S_OpenScreenFile(ScrFileName:S_Str80);
  1405.       
  1406.       Example:
  1407.              Pascal                         C
  1408.              -----------------------------  ---------------------------
  1409.              Uses ScrEdit;                  #include "ScrEdit.H"
  1410.              {$I Yourfile.001}              #include "YourFile.001"
  1411.                                             void main()
  1412.                                             {
  1413.              Begin                          S_Init();
  1414.       ===>   S_OpenScreenFile('YourFile');  S_OpenScreenFile("YourFile");
  1415.              Initialize_YourScreen_Buf;     Initialize_YourScreen_buf;  
  1416.              .                              .
  1417.              .                              .
  1418.              ------------------------------ --------------------------- 
  1419.       
  1420.       Parameters: 
  1421.             FileName = The  name  of a Turbo ScrEdit screen  file.  The 
  1422.                        name  may include drive, path, and extension  of 
  1423.                        ".SCR". 
  1424.                        -  If  drive  and  path are  omitted,  only  the 
  1425.                           current  directory is searched. 
  1426.                        -  If extension is omitted ".SCR" is assumed.
  1427.                            
  1428.                            
  1429.       
  1430.       
  1431.       Loading a screen and displaying it.
  1432.       -----------------------------------------------------------------
  1433.       Procedure: S_LoadScreen(ScreenName)
  1434.       Function:  This procedure searches the screen file directory  for 
  1435.                  the  specified screen name. If the screen is found  it 
  1436.                  is loaded into memory, prepared for use, and displayed 
  1437.                  on the crt screen.
  1438.       Variable:  S_DelayScreen  (Type:Boolean, Default:False)
  1439.       Function:  When  S_DelayScreen is set to FALSE (default  setting) 
  1440.                  the  screen  loaded  by  S_LoadScreen  is  immediately 
  1441.                  displayed on the video.
  1442.       
  1443.                  When S_DelayScreen is set to TRUE the screen loaded by 
  1444.                  S_LoadScreen  is  not  displayed on  the  video.  This 
  1445.                  switch is used to allow the screens color  assignments 
  1446.                  to be changed before it is displayed. See the  section 
  1447.                  "Customizing Turbo ScrEdit Screens Programmatically".
  1448.       
  1449.       
  1450.       
  1451.       
  1452.       
  1453.                                    Page 11
  1454.       
  1455.       
  1456.                  When  the screen is delayed, it will automatically  be 
  1457.                  displayed   by   the  next   call   to   S_ReadScreen, 
  1458.                  S_ReadField,  S_ReadKey, Or it can be displayed  by  a 
  1459.                  call to S_RefreshScreen.
  1460.        
  1461.       Remarks:   This  procedure will issue a error message  and  halt 
  1462.                  your program if:
  1463.                  1 - The screen requested is not found in the screen 
  1464.                      file index.
  1465.                  2 - The screen record has not  been  initialized.
  1466.                  3 - The  screen  in the screen  file  has  not  been'
  1467.                      compiled using the main menu option 4.
  1468.            
  1469.       Defined in C:
  1470.                  void S_LoadScreen(char * ScrName)
  1471.       
  1472.       Defined in Pascal:
  1473.                  Procedure S_LoadScreen(ScrName:S_Str80);
  1474.       
  1475.       
  1476.       Example:
  1477.              Pascal                         C
  1478.              -----------------------------  ---------------------------
  1479.              Uses ScrEdit;                  #include "ScrEdit.H"
  1480.              {$I Yourfile.001}              #include "YourFile.001"
  1481.                                             void main()
  1482.                                             {
  1483.              Begin                          S_Init();
  1484.              S_OpenScreenFile('YourFile');  S_OpenScreenFile("YourFile");
  1485.              Initialize_YourScreen_Buf;     Initialize_YourScreen_buf;  
  1486.       ===>   S_LoadScreen('YourScreen');    S_LoadScreen("YourScreen");
  1487.              .                              .
  1488.              ------------------------------ --------------------------- 
  1489.       
  1490.       Parameters: 
  1491.                 ScrName - The  name  of a screen stored in  the  screen 
  1492.                           file.
  1493.       
  1494.       
  1495.       
  1496.       
  1497.       Closing a screen file.
  1498.       -----------------------------------------------------------------
  1499.       Procedure: S_CloseScreenFile                                         
  1500.       Function:  Closes the current screen file and restores the system 
  1501.                  cursor  to it`s original status at the time  that  the 
  1502.                  screen was opened.
  1503.       Remarks:   None.
  1504.            
  1505.       Defined in C:
  1506.                  void S_CloseScreenFile()
  1507.         
  1508.       Defined in Pascal:
  1509.                  Procedure S_CloseScreenFile;
  1510.       
  1511.       Example: (see next page)  
  1512.       
  1513.       
  1514.       
  1515.       
  1516.       
  1517.       
  1518.       
  1519.                                    Page 12
  1520.       
  1521.       
  1522.       Example:
  1523.              Pascal                         C
  1524.              -----------------------------  ---------------------------
  1525.              Uses ScrEdit;                  #include "ScrEdit.H"
  1526.              {$I Yourfile.001}              #include "YourFile.001"
  1527.                                             void main()
  1528.                                             {
  1529.              Begin                          S_Init();
  1530.              S_OpenScreenFile('YourFile');  S_OpenScreenFile("YourFile");
  1531.              Initialize_YourScreen_Buf;     Initialize_YourScreen_buf;  
  1532.              S_LoadScreen('YourScreen');    S_LoadScreen("YourScreen");
  1533.              .                              .
  1534.              .                              .
  1535.       ===>   S_CloseScreen;                 S_CloseScreen();  
  1536.              End.                           } 
  1537.              ------------------------------ --------------------------- 
  1538.       Parameters: 
  1539.                  None
  1540.       
  1541.       
  1542.       
  1543.       
  1544.       
  1545.       
  1546.       
  1547.       
  1548.       
  1549.       
  1550.       
  1551.       
  1552.       
  1553.       
  1554.       
  1555.       
  1556.       
  1557.       
  1558.       
  1559.       
  1560.       
  1561.       
  1562.       
  1563.       
  1564.       
  1565.       
  1566.       
  1567.       
  1568.       
  1569.       
  1570.       
  1571.       
  1572.       
  1573.       
  1574.       
  1575.       
  1576.       
  1577.       
  1578.       
  1579.       
  1580.       
  1581.       
  1582.       
  1583.       
  1584.       
  1585.                                    Page 13
  1586.       
  1587.       
  1588.       Activating and Deactivating special features.
  1589.       -----------------------------------------------------------------
  1590.       Turbo ScrEdit has a number of special features and functions that 
  1591.       may  be  activated  or deactivated in  your  program  by  setting 
  1592.       boolean switches to TRUE or FALSE (1 or 0 in 'C'.)
  1593.       
  1594.          The "[INSERT] [CAPS] [NUM LOCK] [SCROLL LOCK]" Status line.
  1595.          --------------------------------------------------------------
  1596.          S_ShowStatus...(type: boolean, default:TRUE)
  1597.              Turbo  ScrEdit monitors the BIOS to determine  the  status 
  1598.              of the system toggle keys.
  1599.       
  1600.              The value of S_ShowStatus determines if the toggle  switch 
  1601.              status  line will be displayed on the bottom line  of  the 
  1602.              screen  when there is no help, error, or user messages  to 
  1603.              be displayed.
  1604.       
  1605.              TRUE   = Causes   the  toggle  key  status  line   to   be 
  1606.                       displayed.  The status of the insert, caps  lock, 
  1607.                       scroll  lock, and num lock keys are displayed  in 
  1608.                       inverse  when active and normal text  color  when 
  1609.                       inactive. 
  1610.              FALSE  = Suppresses the toggle key status line. 
  1611.       
  1612.       
  1613.       
  1614.       
  1615.          Changing the status lines colors.
  1616.          --------------------------------------------------------------
  1617.          The  status  lines colors can be changed  programmatically  by 
  1618.          assigning new color codes to the following variables:
  1619.       
  1620.          Defined in Pascal as: Var S_StBg       : Byte;
  1621.                                    S_StFg       : Byte;
  1622.                                    S_StLabelBg  : Byte;
  1623.                                    S_StLabelFg  : Byte;
  1624.       
  1625.          Defined in C as     : unsigned char S_StBg;   
  1626.                                unsigned char S_StFg;   
  1627.                                unsigned char S_StLabelBg;
  1628.                                unsigned char S_StLabelFg;
  1629.       
  1630.          In the above list of variables, S_StBg and S_StFg specify  the 
  1631.          color  codes used for the text portion of the status line  and 
  1632.          the color that the toggle key labels will be displayed in when 
  1633.          they are set to an OFF state.
  1634.       
  1635.          The  variables S_StLabelBg and S_StLabelFg specify  the  color 
  1636.          that  the  text  portion  of the toggle  key  labels  will  be 
  1637.          highlighted with when the toggle key status is set to ON.
  1638.       
  1639.          See example on next page.
  1640.       
  1641.       
  1642.       
  1643.       
  1644.       
  1645.       
  1646.       
  1647.       
  1648.       
  1649.       
  1650.       
  1651.                                    Page 14
  1652.       
  1653.       
  1654.          Example of Usage: 
  1655.          Pascal                            C
  1656.          --------------------------------  ----------------------------
  1657.          .                                 .
  1658.          S_OpenScreenFile('YourFile');     S_OpenScreenFile("YourFile");
  1659.          S_LoadScreen('YourScreen');       S_LoadScreen("YourScreen");
  1660.       
  1661.       => S_StBg  := Black;                 S_StBg   = BLACK;
  1662.       => S_StFg  := Green;                 S_StFg   = GREEN;
  1663.           
  1664.       => S_StLabelBg := White;             S_StLabelBg = WHITE;
  1665.       => S_StLabelFG := Black;             S_StLabelFg = BLACK;
  1666.       
  1667.          While Not S_Esc do                while (!S_Esc) 
  1668.             Begin                             {
  1669.             S_ReadScreen;                     S_ReadScreen();
  1670.          .                                 .
  1671.          --------------------------------  ----------------------------
  1672.          In the above code segment we see a screen file has been opened 
  1673.          and a screen loaded.
  1674.       
  1675.          Next  we  see the status line's color  control  variables  are 
  1676.          being  assigned  new values.  With the new values  the  status 
  1677.          line  will  be  displayed  as  green  characters  on  a  black 
  1678.          background, and the active toggle key labels will be displayed 
  1679.          as black characters on a white background.
  1680.       
  1681.       
  1682.       
  1683.          Continuous field help messages.
  1684.          --------------------------------------------------------------
  1685.          S_AutoHelp.....(type: boolean, default:FALSE)
  1686.       
  1687.              Turbo ScrEdit allows each data entry field on a screen  to 
  1688.              have  a  HELP message assigned to it.  Normally  the  help 
  1689.              messages  are displayed by keying a question mark  in  the 
  1690.              first  character of the field. Using this switch  you  can 
  1691.              have  field HELP messages displayed automatically  as  the 
  1692.              cursor moves from field to field.  
  1693.       
  1694.              TRUE  = Field   help   messages  are   to   be   displayed 
  1695.                      automaticaly  when the cursor moves from field  to 
  1696.                      field.
  1697.       
  1698.                      S_AutoHelp has no effect for  fields that have  no 
  1699.                      HELP message defined.
  1700.        
  1701.              FALSE = HELP  messages are only displayed when a  question 
  1702.                      mark  is  keyed  as the  first  character  of  the 
  1703.                      field.
  1704.       
  1705.              See the manual sections "Changing Message Line Colors" and 
  1706.              "Changing  Message  Line Sounds" for more  information  on 
  1707.              customizing and useing the auto help feature.
  1708.       
  1709.               
  1710.       
  1711.       
  1712.       
  1713.       
  1714.       
  1715.       
  1716.       
  1717.                                    Page 15
  1718.       
  1719.       
  1720.       
  1721.          Instant field value validation.
  1722.          --------------------------------------------------------------
  1723.          S_AutoValidate....(type: boolean, default:FALSE)
  1724.       
  1725.              Automatic validation is designed to be used in  conjunction 
  1726.              with S_ReadScreen only. 
  1727.       
  1728.              Turbo  ScrEdit allows each data entry field to have up  to 
  1729.              50  lines of validation statements assigned to  it.  Using 
  1730.              this  option  you can control when  the  field  validation 
  1731.              statements are used to check the data entered into a field.
  1732.       
  1733.              TRUE  = When  this  switch is set to TRUE,  Turbo  ScrEdit 
  1734.                      will  process  the current  fields  contents  just 
  1735.                      before  the cursor exits the field. 
  1736.                      - If the value keyed into the field fails to  pass 
  1737.                        the  edit  test, the assigned error  message  is 
  1738.                        displayed  and  the cursor will  remain  in  the 
  1739.                        field.
  1740.       
  1741.                      - If  the value keyed passes the validation  test, 
  1742.                        the  cursor  advances  to the  next  data  entry 
  1743.                        field.
  1744.       
  1745.              FALSE = By  default this switch is set to  FALSE,  meaning 
  1746.                      Turbo  ScrEdit accepts data entry into all  screen 
  1747.                      fields  until the ENTER key is pressed.  When  the 
  1748.                      ENTER  key is pressed, Turbo ScrEdit  begins  with 
  1749.                      the  first  screen field and compares  each fields 
  1750.                      values against any validation statements that have 
  1751.                      been  assigned. If an error is detected the  error 
  1752.                      message is displayed and the cursor is  positioned 
  1753.                      on the offending field. 
  1754.       
  1755.              See  the manual sections "Message line  sound",  "Changing 
  1756.              Message  Line Colors" and "Changing Message  Line  Sounds" 
  1757.              for  more  information  on customizing  and  using  screen 
  1758.              validation messages.
  1759.       
  1760.               
  1761.       
  1762.       
  1763.       
  1764.       
  1765.       
  1766.       
  1767.       
  1768.       
  1769.       
  1770.       
  1771.       
  1772.       
  1773.       
  1774.       
  1775.       
  1776.       
  1777.       
  1778.       
  1779.       
  1780.       
  1781.       
  1782.       
  1783.                                    Page 16
  1784.       
  1785.       
  1786.       
  1787.          Message line sound.             
  1788.          -------------------------------------------------------------
  1789.          S_ErrorSound......(type: boolean, default:TRUE)
  1790.          S_HelpSound.......(type: boolean, default:TRUE)
  1791.          S_UserSound.......(type: boolean, default:TRUE)
  1792.       
  1793.              Turbo ScrEdit allows you to use sound to alert the user of 
  1794.              your program that a message has been issued that needs his 
  1795.              attention.  There  are three different types  of  messages 
  1796.              that can be issued to your user and each type can have its 
  1797.              sound function turned on or off.
  1798.       
  1799.              S_ErrorSound:
  1800.                    TRUE  = The  audio  alert is sounded  each  time  an 
  1801.                            ERROR  message  is displayed on  the  bottom 
  1802.                            line of the screen.  
  1803.                    FALSE = No sound for ERROR messages.
  1804.       
  1805.       
  1806.              S_HelpSound:
  1807.                    TRUE  = The  audio  alert  is sounded  when  a  HELP 
  1808.                            message  is displayed on the bottom line  of 
  1809.                            the screen.
  1810.                    FALSE = No sound for HELP messages.
  1811.       
  1812.       
  1813.              S_UserSound:  
  1814.                    TRUE  = The  audio  alert  is  sounded  when  a  USER  
  1815.                            (programmers)  message  is displayed  on  the 
  1816.                            bottom line of the screen.
  1817.                    FALSE = No sound for USER messages.
  1818.       
  1819.              For  a more detailed discussion on using the message  line 
  1820.              see  the  manual  sections  "Displaying  Messages",   "The 
  1821.              message line sounds", and "The message line colors".
  1822.       
  1823.       
  1824.       
  1825.       
  1826.       
  1827.          Turning the system cursor on and off. 
  1828.          -------------------------------------------------------------
  1829.          Procedure:  S_SetCursor(Cursor)
  1830.          Function:   To  turn  the  system cursor on and  off,  and  to 
  1831.                      select  the type of cursor that is used  when  the 
  1832.                      user is keying data into a screen field.
  1833.          Remarks:    This  procedure  is intended to be used  when  the 
  1834.                      programmer  is  going to suspend using  the  Turbo 
  1835.                      ScrEdit  procedures and wishes to resort to  using 
  1836.                      the  standard I/O functions of his language  (such 
  1837.                      as gotoxy, readln or scanf, writeln or printf).
  1838.       
  1839.                      Normally Turbo ScrEdit will handle the cursor  for 
  1840.                      you. See the next manual section "Selecting  Turbo 
  1841.                      ScrEdit cursor types."
  1842.                      
  1843.          Continued on next page.     
  1844.       
  1845.       
  1846.       
  1847.       
  1848.       
  1849.                                    Page 17
  1850.       
  1851.       
  1852.       
  1853.          Defined in C:
  1854.                enum S_Cursors 
  1855.                   {S_OFF,S_BOLD,S_NORMAL,S_INVERTEDBOLD,S_INVERTEDNORMAL}
  1856.       
  1857.                void S_SetCursor(char);
  1858.       
  1859.                Example:             
  1860.                      /* Set system cursor off */
  1861.                      S_SetCursor(S_OFF);
  1862.          
  1863.                      /* Set system cursor back to normal */
  1864.                      S_SetCursor(S_NORMAL);
  1865.       
  1866.                      /* Set system cursor to a bold blinking block */
  1867.                      S_SetCursor(S_BLOCK);
  1868.       
  1869.         Defined in Pascal:
  1870.                     S_Cursors = (S_Off,S_Bold,S_Normal,
  1871.                                  S_InvertedBold,S_InvertedNormal);
  1872.       
  1873.                     Procedure S_SetCursor(Switch:S_Cursors);
  1874.       
  1875.                     Example:             
  1876.                          {* Set system cursor off *}
  1877.                          S_SetCursor(S_Off);
  1878.          
  1879.                          {* Set system cursor back to normal *}
  1880.                          S_SetCursor(S_Normal);
  1881.       
  1882.                          {* Set system cursor to a bold blinking  block *}
  1883.                          S_SetCursor(S_Block);
  1884.       
  1885.          Parameters:
  1886.              Cursor.... An integer value 0 thru 4. Turbo  ScrEdit 
  1887.                         recognizes the values as:
  1888.                         0 = S_OFF    (system cursor is off)
  1889.                         1 = S_NORMAL (restore original system cursor)
  1890.                         2 = S_BOLD   (blinking block system cursor)
  1891.                 
  1892.                         The   cursor  types  3   (S_INVERTEDBOLD)   and 
  1893.                         4  (S_INVERTEDNORMAL)  will be  considered  the 
  1894.                         same  as  S_NORMAL and S_BOLD  when  using  you 
  1895.                         programming language's I/O statements.
  1896.       
  1897.       
  1898.       
  1899.       
  1900.       
  1901.       
  1902.       
  1903.       
  1904.       
  1905.       
  1906.       
  1907.       
  1908.       
  1909.       
  1910.       
  1911.       
  1912.       
  1913.       
  1914.       
  1915.                                    Page 18
  1916.       
  1917.       
  1918.          Selecting Turbo ScrEdits data entry cursor type.
  1919.          --------------------------------------------------------------
  1920.          S_Cursor.......(type: Enumerated)
  1921.       
  1922.              For Pascal - S_Off, S_Normal, S_Bold,
  1923.                           S_InvertedBold, S_InvertedNormal.
  1924.              For C      - S_OFF, S_NORMAL, S_BOLD,
  1925.                           S_INVERTEDBOLD, S_INVERTEDNORMAL.
  1926.       
  1927.       
  1928.              When  Turbo  ScrEdit is initialized the system  cursor  is 
  1929.              read and the current value is stored by Turbo ScrEdit. The 
  1930.              system cursor is then turned off and S_Cursor is  assigned 
  1931.              a value of S_Off. 
  1932.       
  1933.              Each  time a field is edited by Turbo ScrEdit, the  system 
  1934.              cursor is set ON depending on the value of S_Cursor.  When 
  1935.              the  cursor leaves the data entry field the system  cursor 
  1936.              is reset to OFF.
  1937.        
  1938.              You  can  assign  S_Cursor any one of  the  five  possible 
  1939.              cursors  switch values to select the type of cursor to  be 
  1940.              used when data is being keyed into a field. 
  1941.       
  1942.              In  the  descriptions of cursors that  follows,  the  term 
  1943.              "inverted" means that the character postion where the next 
  1944.              character will be keyed will be inverted in regards to the 
  1945.              current background color of the current feild:
  1946.              -  If the current data entry field is defined as having  a 
  1947.                 black background, then the inverted cursor will have  a 
  1948.                 white (color code 7) background. 
  1949.              -  If the the field has been defined as having a non-black 
  1950.                 background,  then the inverse cursor  background  color 
  1951.                 will be black (color code 0.)
  1952.               
  1953.       
  1954.              The five cursor types are:
  1955.              
  1956.              1 - (S_OFF)  An  inverted non-blinking block  cursor.  
  1957.              2 - (S_BOLD)   The  blinking  system  cursor  set   to   a 
  1958.                  transparent full character sized block.
  1959.              3 - (S_NORMAL) The system cursor that was defined when the 
  1960.                  application  was started from the DOS prompt  (usually 
  1961.                  an underscore character.)
  1962.              4 - (S_INVERSEBOLD) An inverted non-blinking block cursor, 
  1963.                  the  same  as  option 1, with a  full  character  size 
  1964.                  transparent blinking system cursor, the same as option 
  1965.                  2. 
  1966.              5 - (S_INVERSENORMAL)   An  inverted  non-blinking   block 
  1967.                  cursor, the same as option 1,  with the systems normal 
  1968.                  blinking  cursor  (usually a  underscore)  inside  the 
  1969.                  inverted block cursor.
  1970.               
  1971.              In  the  examples that follow, the inverse  normal  cursor 
  1972.              will be used when keying data into fields on the screen.
  1973.       
  1974.       
  1975.       
  1976.       
  1977.       
  1978.       
  1979.       
  1980.       
  1981.                                    Page 19
  1982.       
  1983.       
  1984.              Pascal                         C
  1985.              ------------------------------ ---------------------------
  1986.              Uses ScrEdit;                  #include "ScrEdit.H"
  1987.              {$I YourFile.001}              #include "YourFile.001"
  1988.                                             void main()
  1989.                                             {
  1990.              Begin                          S_Init();
  1991.              S_OpenScreenFile('YourFile');  S_OpenScreenFile("YourFile");
  1992.              Initialize_YourScreen_Buf;     Initialize_YourScreen_buf;  
  1993.              S_LoadScreen('YourScreen');    S_LoadScreen("YourScreen");
  1994.       ===>   S_Cursor := S_INVERSENORMAL;   S_Cursor = S_INVERSENORMAL;
  1995.              Repeat                         do{
  1996.                S_ReadScreen;                  S_ReadScreen();
  1997.                If S_Enter Then                if (S_Enter)
  1998.                   S_ProcessScreen;               S_ProcessScreen();
  1999.              Until S_Esc;                     }
  2000.                                             while (!S_Esc);
  2001.              S_CloseScreenFile;             S_CloseScreenFile();
  2002.              End.                           }  
  2003.              ------------------------------ ---------------------------
  2004.       
  2005.              If  you  were  to  key  in  one  of  the  above  programs,
  2006.              substituting  one of your screen file names, and the  name 
  2007.              of  one  of the screens stored in your  screen  file,  you 
  2008.              could  compile and run the program and see that  the  data 
  2009.              entry cursor is the inversed block with the systems normal 
  2010.              cursor blinking in it. 
  2011.       
  2012.       
  2013.       
  2014.          Changing how the ENTER key is used.
  2015.          --------------------------------------------------------------
  2016.          S_EnterAsTab......(type: boolean, default:FALSE)
  2017.       
  2018.              This   switch  is  designed  primarily  to  be   used   in 
  2019.              conjunction with S_ReadScreen. 
  2020.       
  2021.              By  DEFAULT,  Turbo ScrEdit uses the TAB key to  move  the 
  2022.              cursor left to the next field on the screen, and SHIFT TAB 
  2023.              to  move  the cursor right to the previous  field  on  the 
  2024.              screen.  Data entry continues on a screen until  the  user 
  2025.              presses the ENTER key. When the ENTER key is pressed Turbo 
  2026.              ScrEdit   performs  field  validation  according  to   any 
  2027.              validation  statements  that  have been  defined  for  the 
  2028.              screen  and,  if  no  errors  are  detected,  the  screens 
  2029.              contents  are  returned  to your  program  in  the  screen 
  2030.              record.
  2031.       
  2032.              Using  the  S_EnterAsTab  switch you  can  instruct  Turbo 
  2033.              ScrEdit to translate the ENTER key into a tab key. 
  2034.       
  2035.              TRUE  = When  S_EnterAsTab is set to TRUE, the  enter  key 
  2036.                      will act exactly the same as the TAB key. Pressing 
  2037.                      the ENTER key will cause the cursor to move to the 
  2038.       
  2039.       
  2040.       
  2041.       
  2042.       
  2043.       
  2044.       
  2045.       
  2046.       
  2047.                                    Page 20
  2048.       
  2049.       
  2050.                      next field, pressing a SHIFT key and the ENTER key 
  2051.                      will  cause  the cursor to move  to  the  previous 
  2052.                      field.
  2053.                      Data entry will continue until one of the function 
  2054.                      keys or one of the keypad keys is presed, or until 
  2055.                      the ALT or CTRL key is pressed in conjunction with 
  2056.                      another keyboard character.
  2057.       
  2058.              FALSE = When  S_EnterAsTab is set to FALSE,  pressing  the 
  2059.                      ENTER key causes field validation to occur and the 
  2060.                      screen's contents are returned to your program.
  2061.       
  2062.              Special considerations for using S_EnterAsTab.
  2063.              ----------------------------------------------------------
  2064.              The  most  important  consideration  when  you  are  using 
  2065.              S_EnterAsTab set to TRUE is that FIELD VALIDATION WILL NOT 
  2066.              AUTOMATICALLY  OCCUR  WHEN THE ENTER KEY IS  PRESSED.  You 
  2067.              will  have  to code a call to S_ValidateScreen  to  ensure 
  2068.              that  the  field validation procedures are  used.  In  the 
  2069.              example that follows, S_EnterAsTab is set to TRUE and  the 
  2070.              programmer  has  defined the F10 key as the key  the  user 
  2071.              will press to signal that he/she is finished entering data 
  2072.              and wants the screen processed.
  2073.               
  2074.              Pascal                        C
  2075.              ----------------------------  ----------------------------
  2076.              .                             .
  2077.              .                             .
  2078.       ===>   S_EnterAsTab := True;         S_EnterAsTab = 1;
  2079.       
  2080.              While Not S_Esc Do            while (!S_Esc) 
  2081.                Begin                         {
  2082.                S_ReadScreen;                 S_ReadScreen();
  2083.                If  S_F10 Then                if (S_F10)
  2084.                  Begin                         {
  2085.       ===>       S_ValidateScreen;             S_ValidateScreen();
  2086.                  If  S_ScreenValid Then        if (S_ScreenValid)
  2087.                      Process_Screen_Data          Process_Screen_Data();
  2088.                  End;                          }
  2089.                End;                           }
  2090.              .                             .
  2091.              .                             .
  2092.              -----------------------------  ---------------------------
  2093.              In the above code segments, the ENTER key will be used  as 
  2094.              the  TAB  key.  When any of the  other  special  keys  are 
  2095.              pressed,  Turbo  ScrEdit interrupts what it is  doing  and 
  2096.              control  returns  to the IF statement after  the  call  to 
  2097.              S_ReadScreen. 
  2098.       
  2099.              If  the special key that was pressed is the F10  key,  the 
  2100.              validation procedure is called. 
  2101.              -  If  the screen contents are not valid S_Point  will  be 
  2102.                 pointing  to  the field with the bad data in  it.  When 
  2103.                 S_ReadScreen is called again the cursor will be  placed 
  2104.                 in the offending field and the error message displayed.
  2105.              -  If the data is valid then S_ScreenValid will test  TRUE 
  2106.                 and the program can process the screens contents.
  2107.       
  2108.       
  2109.       
  2110.       
  2111.       
  2112.       
  2113.                                    Page 21
  2114.       
  2115.       
  2116.              For   more  information  on  using  the   S_ValidateScreen 
  2117.              procedure read the detailed section of the manual on using 
  2118.              S_ValidateScreen.
  2119.       
  2120.              
  2121.       
  2122.       Displaying data on the screen.
  2123.       -----------------------------------------------------------------
  2124.       There  is basically two ways to display data to the user of  your 
  2125.       program.  The first is to move values to screen fields,  and  the 
  2126.       second is to display messages on the message line. First we  will 
  2127.       examine how to display data using screen fields.
  2128.       
  2129.          Displaying values in screen fields.
  2130.          --------------------------------------------------------------
  2131.          When  your screens are compiled using the F4 option  from  the 
  2132.          Turbo  ScrEdit main menu, a file is created that contains  the 
  2133.          source code statements that define a record to accommodate the 
  2134.          fields on the screen. The record may look something like:
  2135.       
  2136.          Pascal                         C
  2137.          -----------------------------  -------------------------------
  2138.          Type      
  2139.          ScreenRecord = Record          typedef struct {
  2140.             Name    : String[30];          char    name[31];
  2141.             Address : String[30];          char address[31];
  2142.             City    : String[20];          char    city[31];
  2143.             State   : String[2];           char   state[2];
  2144.             Zip     : Real;                double zip;
  2145.             End;                           } screenrecord;
  2146.          Var
  2147.          S_Rec : ScreenRecord;          screenrecord s_rec;
  2148.          -----------------------------  -------------------------------
  2149.          Turbo  ScrEdit knows the length and type of each field in  the 
  2150.          record.  When  you  call  the  screen  record   initialization 
  2151.          procedures  at the beginning of your program,   Turbo  ScrEdit 
  2152.          stores the memory address of the record. With this information 
  2153.          Turbo ScrEdit knows where to find the values that it must move 
  2154.          to  the  screen to be edited, and where to  store  the  values 
  2155.          keyed in by the user of your program. 
  2156.       
  2157.          Thus,  to  display data on the screen you move values  to  the 
  2158.          record  fields  just  as you would any other  record  in  your 
  2159.          language.
  2160.       
  2161.          Pascal                            C
  2162.          --------------------------------  -------------------------------
  2163.          With S_Rec Do      Begin  
  2164.             Name    := 'Mr.  Dave';        strcpy(s_rec.name,"Mr. Dave");
  2165.             Addr    := '111  Alpine';      strcpy(s_rec.addr,"111 Alpine";
  2166.             City    := 'TinBuckTwo';       strcpy(s_rec.city,"TinBuckTwo");
  2167.             State   := 'CA';               strcpy(s_rec.state,"CA");
  2168.             Zip     := 93221.0;            zip = 93221; 
  2169.             End;                         
  2170.          --------------------------------  -------------------------------
  2171.          When  you call S_ReadField, S_ReadScreen, or S_ReadKey,  Turbo 
  2172.          ScrEdit will display the contents of the screen record on  the 
  2173.          screen.
  2174.       
  2175.       
  2176.       
  2177.       
  2178.       
  2179.                                    Page 22
  2180.       
  2181.       
  2182.       
  2183.          Using the Message line.
  2184.          --------------------------------------------------------------
  2185.          Turbo  ScrEdit reserves the bottom (25th) line of the  display 
  2186.          as  the  message  line.  From time to time you  will  want  to 
  2187.          display a message of some sort from your program to the  user. 
  2188.          Turbo  ScrEdit  allows you to accomplish this by  assigning  a 
  2189.          string of up to 78 characters to one or more of three possible 
  2190.          global  variables.  You  can also select the  color  that  the 
  2191.          message will be displayed in as well as the tone and  duration 
  2192.          of an audio alarm to draw the users attention to the message.
  2193.       
  2194.          Displaying messages.
  2195.          -------------------------------------------------------------- 
  2196.          Each   time  your  program  calls   one  of  the   procedures: 
  2197.          S_ReadScreen,   S_ReadField,  or  S_ReadKey,   Turbo   ScrEdit 
  2198.          examines  the message fields and issues the message that  they 
  2199.          may contain. 
  2200.       
  2201.          The message fields are defined as:
  2202.       
  2203.              Pascal: Var S_UserMsg     : S_Str80;
  2204.                          S_ErrorMsg    : S_Str80;
  2205.                          S_AutoHelpMsg : S_Str80;
  2206.       
  2207.              C     :     unsigned char S_UserMsg[81];
  2208.                          unsigned char S_ErrorMsg[81];
  2209.                          unsigned char S_AutoHelpMsg[81];
  2210.       
  2211.          The  name  of  the field indicates how it  is  used  by  Turbo 
  2212.          ScrEdit. 
  2213.       
  2214.             S_UserMsg     - is  reserved for the programmer to  use  to 
  2215.                             send messages to the user of the program. 
  2216.             S_ErrorMsg    - is  used  by Turbo ScrEdit to  issue  error 
  2217.                             messages generated when various errors  are 
  2218.                             detected.  Usually this field will be  used 
  2219.                             by  the  field  validation  part  of  Turbo 
  2220.                             ScrEdit  to issue error message for  fields 
  2221.                             that   have  not  passed   the   validation 
  2222.                             process.
  2223.             S_AutoHelpMsg - is used by Turbo ScrEdit for issuing  help 
  2224.                             messages to the user.
  2225.       
  2226.          You  may use any of these fields at your discretion.  However, 
  2227.          it  is recommend that you use only S_UserMsg to send  messages 
  2228.          to  your  user.  This will insure  that  no  system  generated 
  2229.          messages will be lost. 
  2230.       
  2231.          If more that one message is sent to the user at a time,  there 
  2232.          is  a hierarchy that is used by Turbo ScrEdit for  determining 
  2233.          which message to display first. 
  2234.            1st priority - S_ErrorMsg
  2235.            2nd priority - S_UserMsg
  2236.            3rd priority - S_AutoHelpMsg
  2237.       
  2238.          ONCE A MESSAGE IS DISPLAYED, TURBO SCREDIT ERASES THE  MESSAGE 
  2239.          FROM THE MESSAGE FIELD.
  2240.       
  2241.       
  2242.       
  2243.       
  2244.       
  2245.                                    Page 23
  2246.       
  2247.       
  2248.          If all three message areas contained messages:
  2249.          -  First S_ErrorMsg would be displayed on the message line and 
  2250.             erased  from S_ErrorMsg. When a key is pressed,  the  error 
  2251.             message will disappear. 
  2252.          -  Second the S_UserMsg will be displayed on the message  line 
  2253.             and erased from S_UserMsg. Again when a key is pressed  the 
  2254.             user  message will disappear.
  2255.          -  Third  the S_AutoHelpMsg will be displayed on  the  message 
  2256.             line and erased from S_AutoHelpMsg. Again when another  key 
  2257.             is  pressed  the auto help message will disappear.
  2258.          -  Fourth,  if  S_ShowStatus is set to TRUE,  the  toggle  key 
  2259.             status line will be displayed.
  2260.       
  2261.       
  2262.          Message line sound.    
  2263.          --------------------------------------------------------------
  2264.          Each of the three message types can be assigned a unique sound 
  2265.          that  is issued when the message is displayed.  Turbo  ScrEdit 
  2266.          defines three sound control variables for each message area:
  2267.       
  2268.          Defined in Pascal as: Var S_ErrorSound : Boolean;
  2269.                                    S_ErrorFreq  : Integer;
  2270.                                    S_ErrorDur   : Integer;
  2271.                                    S_UserSound  : Boolean;
  2272.                                    S_UserFreq   : Integer;
  2273.                                    S_UserDur    : Integer;
  2274.                                    S_HelpSound  : Boolean;
  2275.                                    S_HelpFreq   : Integer;
  2276.                                    S_HelpDur    : Integer;
  2277.       
  2278.          Defined in C as     : unsigned char S_ErrorSound;
  2279.                                int S_ErrorFreq;
  2280.                                int S_ErrorDur;
  2281.                                unsigned char S_UserSound;
  2282.                                int S_UserFreq;
  2283.                                int S_UserDur;
  2284.                                unsigned char S_HelpSound;
  2285.                                int S_HelpFreq;
  2286.                                int S_HelpDur;
  2287.       
  2288.          You  will notice in the above listing of variables, that  each 
  2289.          of  the three message areas has a corresponding boolean  sound 
  2290.          switch (S_xxSound), and two integer variables that control the 
  2291.          frequency  (S_xxFreq) and duration (S_xxDur) of the sound.  In 
  2292.          the coding examples that follow we will issue a "user" message 
  2293.          and a short high pitched beep.
  2294.           
  2295.          Pascal                            C
  2296.          --------------------------------  ----------------------------
  2297.          .                                 .
  2298.          S_UserMsg := 'Beep';              strcpy(S_UserMsg,"Beep");
  2299.          S_UserSound := True;              S_UserSound = 1;
  2300.          S_UserFreq  := 150;               S_UserFreq  = 150;
  2301.          S_UserDur   := 100;               S_UserDur   = 100;
  2302.           
  2303.          S_ReadKey;                        S_ReadKey();
  2304.          .                                 .  
  2305.          --------------------------------  ----------------------------
  2306.       
  2307.       
  2308.       
  2309.       
  2310.       
  2311.                                    Page 24
  2312.       
  2313.       
  2314.       
  2315.          The  message  sound  variables  need only be  set  once  in  a 
  2316.          program. They will not change until new values are assigned to 
  2317.          them.  
  2318.         
  2319.       
  2320.          Message line Colors.
  2321.          --------------------------------------------------------------
  2322.          Turbo ScrEdit allows the programmer to assign unique colors to 
  2323.          to the different types of message lines to make it easier  for 
  2324.          the user of the program to determine the type and severity  of 
  2325.          the message that is being issued to him. Turbo ScrEdit defines 
  2326.          two color variables for each of the message areas.
  2327.       
  2328.          Defined in Pascal as: Var S_ErrorFg    : Byte;
  2329.                                    S_ErrorBg    : Byte;
  2330.                                    S_UserFg     : Byte;
  2331.                                    S_UserBg     : Byte;
  2332.                                    S_HelpFg     : Byte;
  2333.                                    S_HelpBg     : Byte;
  2334.       
  2335.          Defined in C as     : unsigned char S_ErrorFg;
  2336.                                unsigned char S_ErrorBg;
  2337.                                unsigned char S_UserFg;
  2338.                                unsigned char S_UserBg;
  2339.                                unsigned char S_HelpFg;
  2340.                                unsigned char S_HelpBg;
  2341.       
  2342.          You  will notice in the above listing of variables, that  each 
  2343.          of  the  three  message areas has  two  corresponding  integer 
  2344.          variables   that  control  the  foreground   (S_xxxxxFg)   and 
  2345.          background  (S_xxxxxBg)  color  assignments.  In  the   coding 
  2346.          examples that follow we will issue a "user message" that reads
  2347.          "BEEP"  and  is displayed with a RED background and  a  bright 
  2348.          yellow foreground color. 
  2349.       
  2350.          Pascal                            C
  2351.          --------------------------------  ----------------------------
  2352.          .                                 . 
  2353.          .                                 .
  2354.          S_UserMsg := 'BEEP';              strcpy(S_UserMsg,"BEEP");
  2355.          S_UserBg  := Red;                 S_UserFg   = RED;
  2356.          S_UserFg  := Yellow;              S_UserBg   = YELLOW;
  2357.           
  2358.          S_ReadKey;                        S_ReadKey();
  2359.          .                                 .
  2360.          .                                 .  
  2361.          --------------------------------  ----------------------------
  2362.       
  2363.          The  message  color  variables  need only be  set  once  in  a 
  2364.          program. They will not change until new values are assigned to 
  2365.          them.  
  2366.         
  2367.       
  2368.       
  2369.       
  2370.       
  2371.       
  2372.       
  2373.       
  2374.       
  2375.       
  2376.       
  2377.                                    Page 25
  2378.       
  2379.       
  2380.       
  2381.       Clearing the screen form.
  2382.       -----------------------------------------------------------------
  2383.       Procedure: S_ClearScreen(Initialize)
  2384.       Function:  Clears the fields on a screen form and optionally sets 
  2385.                  the fields to it's initial values.
  2386.       Remarks:   This procedure is used to clear the fields on a screen 
  2387.                  or  to initialize the screen. When called it  will  do 
  2388.                  the following:
  2389.       
  2390.                  1 - Fields that are defined as being DUPE or REPEATING  
  2391.                      fields ARE LEFT UNCHANGED. 
  2392.                  2 - All display only and data entry fields are  erased 
  2393.                      or cleared.    
  2394.                  3 - If the initialize parameter is set to a  value  of 
  2395.                      1  the  screen  fields are  assigned  the  initial 
  2396.                      values  specified  by SET statements in  the  field 
  2397.                      processing    statements.    (Field     processing 
  2398.                      statements are assigned using Turbo ScrEdit's main 
  2399.                      menu option F4.) 
  2400.       
  2401.       Defined in C:
  2402.                  void S_ClearScreen(int Initialize)
  2403.       
  2404.       Defined in Pascal:
  2405.                  Procedure S_ClearScreen(Initialize:Integer);
  2406.         
  2407.       Example of Usage:
  2408.              Pascal                        C
  2409.              ----------------------------  ----------------------------
  2410.       ===>   S_ClearScreen(1);             S_ClearScreen(1);   
  2411.       
  2412.              While Not S_Esc Do            while (!S_Esc) 
  2413.                Begin                         {
  2414.                S_ReadScreen;                 S_ReadScreen();
  2415.                If  S_Enter Then              if (S_Enter)
  2416.                  Begin                         {
  2417.                  Process_Screen_Data;          Process_Screen_Data();
  2418.       ===>       S_ClearScreen(1);             S_ClearScreen(1);
  2419.                  End;                          }
  2420.                End;                          }
  2421.              -----------------------------  ---------------------------
  2422.              In  the above examples a screen is going to be  processed 
  2423.              until  the ESCAPE key is pressed. 
  2424.               
  2425.              Before   program  control drops into the "while"  loop,  a 
  2426.              call  is made to S_ClearScreen with an  initialize  switch 
  2427.              setting of 1, meaning that the fields on the screen are to 
  2428.              receive any initial values defined by SET statements.
  2429.       
  2430.              Once inside the "while" loop, Turbo ScrEdit will  continue 
  2431.              processing  a  screen  until the ENTER or  ESCAPE  key  is 
  2432.              pressed. 
  2433.       
  2434.              When the ESC key is pressed the program will end.
  2435.       
  2436.              When   the   ENTER   key   is   pressed   the    procedure 
  2437.              "Process_Screen_Data"  is called to process the fields  on 
  2438.       
  2439.       
  2440.       
  2441.       
  2442.       
  2443.                                    Page 26
  2444.       
  2445.       
  2446.       
  2447.       
  2448.              the  screen  and write out a record of  some  sort.  Next, 
  2449.              S_ClearScreen is called again to clear the screen and  re-
  2450.              initialize the screen fields. Then, because S_Esc was  not 
  2451.              pressed, Turbo ScrEdit will return to the user for another 
  2452.              screen of data.
  2453.       
  2454.       Parameters: 
  2455.              Initialize.... 0 = Clear the screen. Do not check for  SET 
  2456.                                 statements to assign initial values.
  2457.                             1 = Clear   the  screen.  Apply   any   SET     
  2458.                                 statement initial values that have  been 
  2459.                                 assigned to the screen fields.
  2460.       
  2461.       
  2462.       
  2463.       
  2464.       Refreshing or re-displaying a screen form.
  2465.       -----------------------------------------------------------------
  2466.       Procedure: S_RefreshScreen
  2467.       Function:  Re-displays the current screen and its data.
  2468.       Remarks:   This procedure is used to re-paint a screen and to re-
  2469.                  display  the field values. From time to time  you  may 
  2470.                  find  it necessary to resort to using  your  languages 
  2471.                  video  and keyboard i/o commands. Particularly if  you 
  2472.                  wish  to use graphics mode to produce bar  charts,  or 
  2473.                  display a graphics image of some sort. 
  2474.       
  2475.                  Once you have finished with your special function  you 
  2476.                  can  call  S_RefreshScreen  to  repaint  your  current 
  2477.                  screen, and continue right where you left off.
  2478.       
  2479.       Defined in C:
  2480.                  void S_RefreshScreen()
  2481.       
  2482.       Defined in Pascal:
  2483.                  Procedure S_RefreshScreen;
  2484.         
  2485.       Example of Usage:
  2486.              Pascal                        C
  2487.              ----------------------------  ----------------------------
  2488.              .                             .
  2489.              .                             .
  2490.              S_ReadScreen;                 S_ReadScreen();
  2491.              If  S_Home Then               if (S_Home)
  2492.                  Begin                       {
  2493.                  Display_Bar_Chart;          Display_Bar_Chart();
  2494.       ===>       S_RefreshScreen();          S_RefreshScreen();
  2495.                  End;                        }
  2496.              .                             .
  2497.              .                             .
  2498.              ----------------------------  ---------------------------
  2499.       
  2500.       Parameters: 
  2501.              None.
  2502.       
  2503.       
  2504.       
  2505.       
  2506.       
  2507.       
  2508.       
  2509.                                    Page 27
  2510.       
  2511.       
  2512.       Editing and accepting data into screen fields.
  2513.       -----------------------------------------------------------------
  2514.       Turbo  ScrEdit provides four procedures for accepting  data  from 
  2515.       the  user.  Two of the procedures accept data entry  into  screen 
  2516.       fields,  and two of the procedures accept only keystrokes.  
  2517.       
  2518.           Reading an entire screen.
  2519.           -------------------------------------------------------------
  2520.           Procedure: S_ReadScreen
  2521.           Function:  Displays  the contents of a screen record  in  the 
  2522.                      screen  form  and allows the field  values  to  be 
  2523.                      edited or new data entered.
  2524.           Variable:  S_Point (type:integer)
  2525.           Function:  Before calling S_ReadScreen:
  2526.                          S_Point can be set to the number of the screen 
  2527.                          field  that is to be the first field  edit  by 
  2528.                          S_ReadScreen.  If  the  field  pointed  to  by 
  2529.                          S_Point  is  a display only field, or  a  dupe 
  2530.                          field,  Turbo  ScrEdit  will  advance  forward 
  2531.                          through the field list until it finds the next 
  2532.                          data entry field.
  2533.                      Returning from S_ReadScreen:
  2534.                          S_Point will point to the last field that  was 
  2535.                          being  edited when data entry was  interrupted 
  2536.                          by   pressing   one  of  the   special   keys.
  2537.           Variable:  S_FirstField (type:integer)
  2538.           Function:  This field contains the field number of the  field 
  2539.                      that  has been defined as the first logical  field 
  2540.                      on the screen. 
  2541.                      One  of Turbo ScrEdits important features is  that 
  2542.                      you can redefine the order that screen fields  are 
  2543.                      edited  in. So the first field on the  screen  may 
  2544.                      not  be the field that is physically the top  left 
  2545.                      field on the screen.
  2546.       
  2547.           Remarks:   With Screens that have no fields:
  2548.                      --------------------------------------------------
  2549.                      When S_ReadScreen is called after a help screen or 
  2550.                      menu  screen has been displayed that has  no  data 
  2551.                      entry or display only fields:
  2552.                      -  User  messages will be displayed on the  bottom     
  2553.                         line of the screen.
  2554.                      -  The  next  key  pressed  is  returned  to  your 
  2555.                         program.
  2556.                          
  2557.                      With Screens that contain only display only fields:
  2558.                      --------------------------------------------------
  2559.                      When   S_ReadScreen  is  called  after  a   screen 
  2560.                      is displayed that contains all display only fields 
  2561.                      and no data entry fields:
  2562.                      -  The  data in the screen record is displayed  in 
  2563.                         the screen form.
  2564.                      -  User  messages will be displayed on the  bottom     
  2565.                         line of the screen.
  2566.                      -  The  next  key  pressed  is  returned  to  your 
  2567.                         program.
  2568.       
  2569.       
  2570.       
  2571.       
  2572.       
  2573.       
  2574.       
  2575.                                    Page 28
  2576.       
  2577.       
  2578.       
  2579.                      With Screens that have data entry fields: 
  2580.                      --------------------------------------------------
  2581.                      When  S_ReadScreen  is called after  a  screen  is 
  2582.                      displayed  that contains at least one  data  entry 
  2583.                      field:
  2584.                      -  The  data in the screen record is displayed  in 
  2585.                         the screen form.
  2586.                      -  User  messages will be displayed on the  bottom     
  2587.                         line of the screen.
  2588.                      -  Data  is entered and edited in one or  more  of 
  2589.                         the  screen    fields until one of the  special 
  2590.                         keys  is pressed. See "Detecting Special  keys" 
  2591.                         for more information on the special keys. 
  2592.                      -  If  the  ENTER key is pressed to end  the  data 
  2593.                         entry  session,  the  contents  of  the  screen 
  2594.                         fields are tested against any field  processing 
  2595.                         statements that have been defined. If an  error 
  2596.                         is detected, an error message is displayed  and 
  2597.                         data entry is resumed.
  2598.           Defined C:
  2599.                  int S_Point;
  2600.                  int S_FirstField;
  2601.                  void S_ReadScreen()
  2602.         
  2603.           Defined in Pascal:
  2604.                  Var S_Point      : Integer;
  2605.                      S_FirstField : Integer;
  2606.                  Procedure S_ReadScreen;
  2607.       
  2608.           Example of Usage:
  2609.              Pascal                        C
  2610.              ----------------------------  ----------------------------
  2611.              Var Point_Hold : Integer;     int Point_Hold;
  2612.              .                             .
  2613.              .                             . 
  2614.              S_LoadScreen('Data_Entry');   S_LoadScreen("Data_Entry"); 
  2615.       ===>   S_Point := S_FirstField;      S_Point = S_FirstField;
  2616.       
  2617.              While Not S_Esc Do            while (!S_Esc) 
  2618.                Begin                         {
  2619.       ===>     S_ReadScreen;                 S_ReadScreen();
  2620.                If  S_Enter Then              if (S_Enter)
  2621.                  Begin                         {
  2622.                  Process_Screen_Data;          Process_Screen_Data();
  2623.                  S_ClearScreen(1);             S_ClearScreen(1);
  2624.                  S_Point := FirstField;        S_Point = S_FirstField;
  2625.                  End;                          }
  2626.                If  S_F1 Then                 if (S_F1)
  2627.                  Begin                         {
  2628.       ===>       PointHold := S_Point;         Point_Hold = S_Point;
  2629.                  S_LoadScreen('Help_01');      S_LoadScreen("Help_01");
  2630.       ===>       S_ReadScreen;                 S_ReadScreen();
  2631.                  S_LoadScreen('Data_Entry');   S_LoadScreen("Data_Entry");
  2632.       ===>       S_Point := Point_Hold;        S_Point = Point_Hold;
  2633.                  End;                          }
  2634.                End;                          }
  2635.              .                             .
  2636.              .                             . 
  2637.              -----------------------------  ---------------------------
  2638.       
  2639.       
  2640.       
  2641.                                    Page 29
  2642.       
  2643.       
  2644.       
  2645.       
  2646.              In  the above example we see a screen  named  "Data_Entry" 
  2647.              loaded and displayed. S_Point is set to the first  logical 
  2648.              field on the screen.
  2649.       
  2650.              We  see  that Turbo ScrEdit will now  process  the  screen 
  2651.              until  the ESCAPE key is pressed.
  2652.       
  2653.              If  the  ENTER key is pressed the contents of  the  screen 
  2654.              record is processed and perhaps a record is generated. The 
  2655.              screen  is then cleared and S_Point is reset to the  first 
  2656.              logical field on the screen.
  2657.       
  2658.              If  the F1 key has been pressed we see that Turbo  ScrEdit 
  2659.              stores  the  current field number that  is  being  edited, 
  2660.              loads  a  screen named "Help_01", and  calls  S_ReadScreen 
  2661.              again. 
  2662.       
  2663.              When  any  key  is pressed,  the  "Data_Entry"  screen  is 
  2664.              reloaded,  S_Point is pointed back to the last field  that 
  2665.              was  being edited, and data entry is resumed at  the  same 
  2666.              field that was being edited when the F1 key was pressed.
  2667.       
  2668.           Parameters: 
  2669.                  None. 
  2670.        
  2671.                      
  2672.           Reading a single field.
  2673.           -------------------------------------------------------------
  2674.           Procedure: S_ReadField
  2675.           Function:  Displays  the contents of a screen record  in  the 
  2676.                      screen form and allows a single field to be edited 
  2677.                      or new data entered. 
  2678.           Variable:  S_Point
  2679.           Function:  Before calling S_ReadField:
  2680.                          S_Point can be set to the number of the screen 
  2681.                          field  to  be edited by S_ReadField.  If  the 
  2682.                          field pointed to by S_Point does not exist, or 
  2683.                          is  a  display only field, or  a  dupe  field, 
  2684.                          Turbo ScrEdit will issue an error message  and 
  2685.                          return  to your program when the next  key  is 
  2686.                          pressed. 
  2687.                      Returning from S_ReadField:
  2688.                          S_Point will point to the last field that  was 
  2689.                          being edited when data entry was interrupted by 
  2690.                          pressing  one  of the  special keys.
  2691.        
  2692.           Remarks:   When S_ReadField is called and S_Point is pointing 
  2693.                      to a valid data entry field:
  2694.                      -  The  data in the screen record is displayed  in 
  2695.                         the screen form.
  2696.                      -  User  messages will be displayed on the  bottom     
  2697.                         line of the screen.
  2698.                      -  Data  is entered and edited in ONLY ONE of  the 
  2699.                         screen fields until the cursor is moved out  of 
  2700.                         the  field  by one of the TAB  key,  SHIFT  TAB 
  2701.                         keys, LEFT ARROW key, RIGHT ARROW key, or  when 
  2702.                         a  character is typed in the last  position  of 
  2703.       
  2704.       
  2705.       
  2706.       
  2707.                                    Page 30
  2708.       
  2709.       
  2710.                         the  field,  or when one of the  other  special 
  2711.                         keys are pressed. See "Detecting Special  keys" 
  2712.                         for more information on the special keys. 
  2713.                     -   If the ENTER key, TAB key,  SHIFT TAB key,   is 
  2714.                         pressed  to end the data entry session,  or  if 
  2715.                         the  field is typed full of characters,  or  if 
  2716.                         the  LEFT ARROW key or RIGHT ARROW key is  used 
  2717.                         to  move  the  cursor out  of  the  field,  the 
  2718.                         contents  of the field are tested  against  any 
  2719.                         field  processing  statements  that  have  been 
  2720.                         defined  for  it. If an error is  detected,  an 
  2721.                         error  message is displayed and data  entry  is 
  2722.                         resumed for the field.
  2723.        
  2724.           Defined C:
  2725.                  int S_Point;
  2726.         
  2727.                  void S_ReadField()
  2728.         
  2729.           Defined in Pascal:
  2730.                  Var S_Point      : Integer;
  2731.                       
  2732.                  Procedure S_ReadField;
  2733.       
  2734.           Example of Usage:
  2735.              Pascal                        C
  2736.              ----------------------------  ----------------------------
  2737.              Var Point_Hold : Integer;     int Point_Hold; 
  2738.              .                             .
  2739.              .                             . 
  2740.              S_LoadScreen('Data_Entry');   S_LoadScreen("Data_Entry"); 
  2741.              S_Point := 0;                 S_Point = -1;
  2742.              S_Tab   := True;              S_Tab   = 1;
  2743.                          
  2744.              While Not S_Esc Do            while (!S_Esc) 
  2745.                Begin                         {
  2746.                If  S_Tab Then                if (S_Tab)
  2747.                    If  S_Shift Then             switch (S_Point)
  2748.                        Begin                    {
  2749.                        Case S_Point Of          case 2 : {
  2750.                           3 : S_Point := 2;       S_Point = (S_Shift)? 1:0;
  2751.                           2 : S_Point := 1;       break;}
  2752.                        Else                     case 1 : {
  2753.                           S_Point := 3;           S_Point = (S_Shift)? 0:2; 
  2754.                        End;                       break;}
  2755.                    Else                         default : {
  2756.                        Case S_Point of            S_Point = (S_Shift)? 1:2;
  2757.                           1 : S_Point := 2;       break;}
  2758.                           2 : S_Point := 3;     } 
  2759.                        Else
  2760.                           S_Point := 1;           
  2761.                        End;
  2762.       ===>     S_ReadField;                  S_ReadField();
  2763.                If  S_Enter Then              if (S_Enter)
  2764.                  Begin                         {
  2765.                  Process_Screen_Data;          Process_Screen_Data();
  2766.                  S_ClearScreen;                S_ClearScreen();
  2767.                  S_Point := 0;                 S_Point = -1;          
  2768.                  End;                          }
  2769.       
  2770.       
  2771.       
  2772.       
  2773.                                    Page 31
  2774.       
  2775.       
  2776.                If  S_F1 Then                 if (S_F1)
  2777.                  Begin                         {
  2778.                  PointHold := S_Point;         Point_Hold = S_Point;
  2779.                  S_LoadScreen('Help_01');      S_LoadScreen("Help_01");
  2780.                  S_ReadKey;                    S_ReadKey();
  2781.                  S_LoadScreen('Data_Entry');   S_LoadScreen("Data_Entry");
  2782.                  S_Tab   := False;             S_Tab   = 0;
  2783.                  S_Point := Point_Hold;        S_Point = Point_Hold;
  2784.                  End;                          }
  2785.                End;                          }
  2786.              .                             .
  2787.              .                             . 
  2788.              -----------------------------  ---------------------------
  2789.              In  the above example we see a screen  named  "Data_Entry" 
  2790.              loaded and displayed. S_Point is set to a value that  will 
  2791.              force it to go to field number one.
  2792.       
  2793.              We  see that current screen is to be processed  until  the  
  2794.              ESCAPE key is pressed.
  2795.       
  2796.              Next we see a case or switch statement that has been coded 
  2797.              to control how the cursor will move from field  to field.
  2798.       
  2799.              If the TAB key only is pressed the cursor will advance  to 
  2800.              the next screen field.
  2801.       
  2802.              If  the  SHIFT  and TAB key is pressed,  the  cursor  will 
  2803.              advance to the previous field.
  2804.       
  2805.              If  the  ENTER key is pressed the contents of  the  screen 
  2806.              record  is  processed and perhaps a data  base  record  is 
  2807.              generated. The screen is then cleared and S_Point is reset 
  2808.              to force the cursor to the first field on the screen. 
  2809.       
  2810.              If  the  F1 key has been pressed we see that  the  program 
  2811.              loads  a  screen named "Help_01" and  calls  S_Readkey  to 
  2812.              allow the user to respond before continuing.
  2813.       
  2814.              When  any  key  is pressed,  the  "Data_Entry"  screen  is 
  2815.              reloaded, and data entry is resumed at the same field that 
  2816.              was being edited when the F1 key was pressed.
  2817.       
  2818.           Parameters: 
  2819.                  None. 
  2820.        
  2821.       
  2822.           Reading a single keystroke.
  2823.           -------------------------------------------------------------
  2824.           Turbo  ScrEdit  has two procedures that can be used  when  no 
  2825.           data  entry  is needed, but but rather the program is  to  be 
  2826.           interrupted for some kind of response from the user.
  2827.       
  2828.               ---------------------------------------------------------
  2829.               Procedure: S_ReadKey
  2830.               Function:  To  display a screen and messages to the  user 
  2831.                          of a program, and accept a keystroke response.
  2832.               Remarks:   -  When  this  procedure  is  called,  if  the 
  2833.                             screen  has any data entry or display  only 
  2834.                             fields  on it, the contents of  the  screen 
  2835.                             record are displayed in the screen form.
  2836.       
  2837.       
  2838.       
  2839.                                    Page 32
  2840.       
  2841.       
  2842.                          -  If  a user message has been defined, it  is 
  2843.                             displayed on the bottom line of the screen.
  2844.                           
  2845.                          -  Turbo  ScrEdit scans the keyboard  until  a 
  2846.                             key  is  pressed. If the key is  a  regular 
  2847.                             keyboard  character, it is returned in  the 
  2848.                             field  S_Ch. See "Detecting  Special  keys" 
  2849.                             for  more information on the  special  keys 
  2850.                             that can be tested for.
  2851.       
  2852.               Defined in C:
  2853.                      
  2854.                      void S_ReadKey();   
  2855.       
  2856.               Defined in Pascal;
  2857.       
  2858.                      Procedure S_ReadKey();
  2859.        
  2860.               Example of Usage:
  2861.                     Pascal                      C
  2862.                     --------------------------  --------------------------
  2863.                     .                           .
  2864.                     .                           . 
  2865.                     If  S_F1 Then               if (S_F1)
  2866.                       Begin                       {
  2867.                       S_LoadScreen('Help_01');    S_LoadScreen("Help_01");
  2868.                       S_UserMsg :=                strcpy(S_UserMsg,
  2869.                         'Any Key to Continue';      "Any Key to Continue");
  2870.       ===>            S_ReadKey;                  S_ReadKey();
  2871.                       End;                        }
  2872.                     .                           .
  2873.                     .                           . 
  2874.                     ---------------------------  --------------------------
  2875.                     In  the  code segment example  above,  the  screen 
  2876.                     "Help_01" is displayed and the message "Any Key  to 
  2877.                     Continue"  is displayed on the bottom line  of  the 
  2878.                     screen. Turbo ScrEdit waits until a key is  pressed 
  2879.                     and then returns the key to the program.
  2880.       
  2881.               Parameters:
  2882.                      None.
  2883.       
  2884.       
  2885.        
  2886.               ---------------------------------------------------------
  2887.               Procedure: S_NextKey       
  2888.               Function:  Accepts a key stroke response.
  2889.               Remarks:   -  When this procedure is called, NO  MESSAGES 
  2890.                             OR SCREEN DATA ARE DISPLAYED on the screen. 
  2891.                             If  a user message has been defined  it  is 
  2892.                             discarded.
  2893.                           
  2894.                          -  Turbo  ScrEdit scans the keyboard  until  a 
  2895.                             key  is  pressed. If the key is  a  regular 
  2896.                             keyboard  character, it is returned in  the 
  2897.                             field  S_Ch. See "Detecting  Special  keys" 
  2898.                             for  more information on the  special  keys 
  2899.                             that can be tested for.
  2900.       
  2901.       
  2902.       
  2903.       
  2904.       
  2905.                                    Page 33
  2906.       
  2907.       
  2908.       
  2909.               Defined in C:
  2910.                      
  2911.                      void S_NextKey();   
  2912.       
  2913.               Defined in Pascal;
  2914.       
  2915.                      Procedure S_NextKey();
  2916.        
  2917.               Example of Usage:
  2918.                     Pascal                      C
  2919.                     --------------------------  -------------------------
  2920.                     .                           .
  2921.                     .                           . 
  2922.                     If  S_F1 Then               if (S_F1)
  2923.                       Begin                       {
  2924.                       S_LoadScreen('Help_01');    S_LoadScreen("Help_01");
  2925.       ===>            S_NextKey;                  S_NextKey();
  2926.                       End;                        }
  2927.                     .                            .
  2928.                     .                            . 
  2929.                     ---------------------------  -------------------------
  2930.                     In  the  code segment example  above,  the  screen 
  2931.                     "Help_01"  is  displayed and  Turbo  ScrEdit  waits 
  2932.                     until  a  key  is pressed. The  value  of  the  key 
  2933.                     pressed is then returned to your program. 
  2934.       
  2935.               Parameters:
  2936.                      None.
  2937.       
  2938.       
  2939.        
  2940.           Field editing features.
  2941.           -------------------------------------------------------------
  2942.           Turbo  ScrEdit reserves the use of several keys  for  editing 
  2943.           data keyed into fields.  
  2944.       
  2945.               TAB key.
  2946.               ---------------------------------------------------------
  2947.               For S_ReadScreen:
  2948.                   Moves  the  data entry cursor from one field  to  the 
  2949.                   next. If the TAB key is pressed on the last field  of 
  2950.                   the screen, the cursor will wrap around to the  first 
  2951.                   field on the screen.
  2952.       
  2953.                   When edit masks are used, TAB will move the cursor to 
  2954.                   the next section of the edit mask.
  2955.       
  2956.               For S_ReadField
  2957.                   Returns  to the calling procedure with the S_TAB  key 
  2958.                   field set to test TRUE.
  2959.       
  2960.                   When edit masks are used, TAB will move the cursor to 
  2961.                   the next section of the edit mask.
  2962.       
  2963.                For S_ReadKey, and S_NextKey:
  2964.                   Returns  to the calling procedure with the S_TAB  key 
  2965.                   field set to test TRUE.
  2966.        
  2967.       
  2968.       
  2969.       
  2970.       
  2971.                                    Page 34
  2972.       
  2973.       
  2974.               SHIFT TAB key.
  2975.               ---------------------------------------------------------
  2976.               For S_ReadScreen:
  2977.                   Moves  the  data entry cursor from one field  to  the 
  2978.                   previous field on the screen. If the SHIFT TAB key is 
  2979.                   pressed on the first field of the screen, the  cursor 
  2980.                   will wrap around to the last field on the screen.
  2981.       
  2982.                   When  edit  masks are used, SHIFT TAB will  move  the 
  2983.                   cursor to the previous section of the edit mask.
  2984.       
  2985.               For S_ReadField
  2986.                   Returns to the calling procedure with the S_SHIFT and 
  2987.                   S_TAB key indicators set to test TRUE.
  2988.       
  2989.                   When  edit  masks are used, SHIFT TAB will  move  the 
  2990.                   cursor  to the previous section of the edit mask.  
  2991.        
  2992.               For S_ReadKey, and S_NextKey:
  2993.                   Returns to the calling procedure with the S_SHIFT and 
  2994.                   S_TAB key indicators set to test TRUE.
  2995.        
  2996.       
  2997.               DELETE key.
  2998.               ---------------------------------------------------------
  2999.               For S_ReadScreen and S_ReadField
  3000.                   Deletes the character from the field that the  cursor 
  3001.                   is on. 
  3002.       
  3003.               For S_ReadKey, and S_NextKey:
  3004.                   Return S_DEL key indicator set to test TRUE.
  3005.        
  3006.       
  3007.               SHIFT DELETE key.
  3008.               ---------------------------------------------------------
  3009.               For S_ReadScreen and S_ReadField
  3010.                   Deletes  the character that the cursor is on and  all 
  3011.                   the  characters  in  the field to the  right  of  the 
  3012.                   cursor. 
  3013.               For S_ReadKey, and S_NextKey:
  3014.                   Returns to the calling procedure with the S_SHIFT and 
  3015.                   S_Del key indicators set to test TRUE.
  3016.        
  3017.       
  3018.               INSERT key.
  3019.               ---------------------------------------------------------
  3020.               For S_ReadScreen and S_ReadField
  3021.                   Swaps  the system BIOS insert toggle key bit  between 
  3022.                   ON  and  OFF  states.  Turbo  ScrEdit  determines  if 
  3023.                   character insert mode is ON or OFF by monitoring  the 
  3024.                   BIOS shift key byte.
  3025.       
  3026.                   When  Insert mode is ON, all characters are  inserted 
  3027.                   into  the line at the cursor. The cursor  pushes  the 
  3028.                   characters  to the right and moves to the next  field 
  3029.                   character position. 
  3030.       
  3031.               For S_ReadKey, and S_NextKey:
  3032.                   Swaps  the system BIOS insert toggle key bit  between 
  3033.       
  3034.       
  3035.       
  3036.       
  3037.                                    Page 35
  3038.       
  3039.       
  3040.                   ON  and  OFF  states.  Turbo  ScrEdit  determines  if 
  3041.                   character insert mode is ON or OFF by monitoring  the 
  3042.                   BIOS shift key byte.
  3043.                   Returns  to the calling procedure with the S_INS  key 
  3044.                   field set to test TRUE.
  3045.        
  3046.       
  3047.               BACK SPACE key.
  3048.               ---------------------------------------------------------
  3049.               For S_ReadScreen and S_ReadField;
  3050.                   Erases  the character to the left of the  cursor  and 
  3051.                   drags  the  character  at  the  cursor  and  all  the 
  3052.                   characters  to the right of the cursor one  character 
  3053.                   position to the left. 
  3054.       
  3055.               For S_ReadKey, and S_NextKey:
  3056.                   Returns  to the calling procedure with the S_BkSp key 
  3057.                   field set to test TRUE.
  3058.        
  3059.       
  3060.               LEFT ARROW key.
  3061.               ---------------------------------------------------------
  3062.               For S_ReadScreen 
  3063.                   Moves  the cursor one character position to the  left 
  3064.                   in the current data entry field. If the cursor is  on 
  3065.                   the first character position of the field, the cursor 
  3066.                   will move to the next empty character position in the 
  3067.                   previous data entry field.  If the LEFT ARROW key  is 
  3068.                   pressed on the first character of the first field  of 
  3069.                   the screen, the cursor will wrap around to the  right 
  3070.                   of  the  last  character in the  last  field  of  the 
  3071.                   screen.
  3072.       
  3073.               For S_ReadField
  3074.                   Moves  the cursor one character position to the  left 
  3075.                   in the current data entry field. If the cursor is  on 
  3076.                   the first character position of the field, data entry 
  3077.                   is terminated for the field and S_SHIFT and S_TAB are 
  3078.                   set  to  test  true. Control  then  returns  to  your 
  3079.                   program. 
  3080.       
  3081.               For S_ReadKey, and S_NextKey:
  3082.                   Returns  to the calling procedure with the S_LEFT key 
  3083.                   field set to test TRUE.
  3084.        
  3085.       
  3086.               RIGHT ARROW key.
  3087.               ---------------------------------------------------------
  3088.               For S_ReadScreen 
  3089.                   Moves  the cursor one character position to the  right 
  3090.                   in the current data entry field. If the cursor is  on 
  3091.                   the  last character position of the field, the  cursor 
  3092.                   will move to the first character position in the  next 
  3093.                   data  entry field on the screen.  If the RIGHT  ARROW 
  3094.                   key  is  pressed on the last character  of  the  last 
  3095.                   field  of the screen, the cursor will wrap around  to 
  3096.                   the  first character in the first data  entry  screen 
  3097.                   field of the screen.
  3098.       
  3099.       
  3100.       
  3101.       
  3102.       
  3103.                                    Page 36
  3104.       
  3105.       
  3106.               For S_ReadField
  3107.                   Moves the cursor one character position to the  right 
  3108.                   in the current data entry field. If the cursor is  on 
  3109.                   the last character position of the field, data  entry 
  3110.                   is terminated for the field, S_TAB set to test  TRUE, 
  3111.                   and control then returns to your program. 
  3112.       
  3113.               For S_ReadKey, and S_NextKey:
  3114.                   Returns to the calling procedure with the S_RIGHT key 
  3115.                   field set to test TRUE.
  3116.        
  3117.       
  3118.       
  3119.           Detecting Special Keys.     
  3120.           -------------------------------------------------------------
  3121.           This part of the manual tells you how to detect when the user 
  3122.           of  your program has pressed one of the special  system  keys 
  3123.           other   than  the  standard  alphabetical,   numerical,   and 
  3124.           punctuation keys.
  3125.       
  3126.           Any  time  the  user  of your  program  presses  one  of  the 
  3127.           keyboard  "Function  Keys"  or one of  the  "Key  Pad  Cursor 
  3128.           Control  Keys" or holds down one of the "ALT" or "CTRL"  keys 
  3129.           and  presses any other keyboard key, Turbo ScrEdit  interrupts 
  3130.           what it is doing and returns control to your program.
  3131.       
  3132.           Turbo  ScrEdit has a number of predefined  boolean  variables 
  3133.           that  are  set according to the last key or  key  combination 
  3134.           that was pressed.
  3135.       
  3136.               Special considerations:
  3137.               ---------------------------------------------------------
  3138.                    For S_ReadScreen and S_ReadField.
  3139.                    ----------------------------------------------------
  3140.                    There  are  several  keys  that  Turbo  ScrEdit  has 
  3141.                    reserved  for use in editing the contents of  screen 
  3142.                    field:  
  3143.       
  3144.                        Backspace............. (S_BkSp)
  3145.                        Left Arrow............ (S_Left)
  3146.                        Right Arrow........... (S_Right)
  3147.                        Insert Key............ (S_Ins) 
  3148.                        Delete key............ (S_Del)
  3149.                        Shift and delete...... (S_Shift, S_Del)
  3150.                   
  3151.                    In S_ReadScreen ONLY:
  3152.                        Tab................... (S_Tab)
  3153.                        Shift and Tab......... (S_Shift, S_Tab)
  3154.                        When S_EnterAsTab is set to TRUE
  3155.                           Enter key.......... (S_Enter)
  3156.                           Shift and Enter.... (S_Shift, S_Enter)
  3157.            
  3158.                    In the discussion that follows keep in mind that the 
  3159.                    above  listed keys are not returned to your  program 
  3160.                    when they are pressed, instead they are captured and 
  3161.                    used by Turbo ScrEdit.
  3162.       
  3163.       
  3164.       
  3165.       
  3166.       
  3167.       
  3168.       
  3169.                                    Page 37
  3170.       
  3171.       
  3172.       
  3173.                    For S_ReadKey and S_NextKey.
  3174.                    ----------------------------------------------------
  3175.                    Because  these  routines are not  used  for  editing 
  3176.                    screen  fields, they will return all of the  special 
  3177.                    keys discussed in this section.
  3178.       
  3179.               Function keys (F1 through F12)
  3180.               ---------------------------------------------------------
  3181.               Defined As:
  3182.                   Pascal                        C       
  3183.                   ----------------------------  -----------------------
  3184.                   Var S_F1  : Boolean;          unsigned char S_F1;
  3185.                       S_F2  : Boolean;          unsigned char S_F2;
  3186.                       S_F3  : Boolean;          unsigned char S_F3;
  3187.                       S_F4  : Boolean;          unsigned char S_F4;
  3188.                       S_F5  : Boolean;          unsigned char S_F5;
  3189.                       S_F6  : Boolean;          unsigned char S_F6;
  3190.                       S_F7  : Boolean;          unsigned char S_F7;
  3191.                       S_F8  : Boolean;          unsigned char S_F8;
  3192.                       S_F9  : Boolean;          unsigned char S_F9;
  3193.                       S_F10 : Boolean;          unsigned char S_F10;
  3194.                       S_F11 : Boolean;          unsigned char S_F11;
  3195.                       S_F12 : Boolean;          unsigned char S_F12;
  3196.                   ----------------------------  -----------------------
  3197.       
  3198.               Example of Usage:
  3199.                     Pascal                        C
  3200.                     ----------------------------  ----------------------
  3201.                     .                             .
  3202.                     .                             . 
  3203.                     S_ReadScreen;                 S_ReadScreen();
  3204.                     If  S_F1 Then                 if (S_F1)
  3205.                         S_ClearScreen;               S_ClearScreen();
  3206.                     If  S_F2 Then                 if (S_F2)
  3207.                         DeleteRecord;                DeleteRecord();
  3208.                     If  S_F9 Then                 if (S_F9)
  3209.                         ScrollNextRecord;            ScrollNextRecord();
  3210.                     If  S_F10 Then                if (S_F10)
  3211.                         ScrollNextRecord;            ScrollPrevRecord();
  3212.                     .                             .
  3213.                     .                             . 
  3214.                     ----------------------------  -----------------------
  3215.                     
  3216.               The above code segment shows some ways you might use  the 
  3217.               function keys to trigger special processing in a program.
  3218.       
  3219.       
  3220.               Cursor control keys (key pad).  
  3221.               ---------------------------------------------------------
  3222.               Read  the  manual  section  "Special  Considerations"  of 
  3223.               "Detecting Special Keys". Some of the keys described  here 
  3224.               will work differently when you are using S_ReadScreen  or 
  3225.               S_ReadField  than they will when you are using  S_ReadKey 
  3226.               or S_NextKey.
  3227.       
  3228.       
  3229.       
  3230.       
  3231.       
  3232.       
  3233.       
  3234.       
  3235.                                    Page 38
  3236.       
  3237.       
  3238.       
  3239.               Defined As:
  3240.                   Pascal                        C       
  3241.                   ----------------------------  -----------------------
  3242.                   Var S_Home  : Boolean;        unsigned char S_Home;
  3243.                       S_End   : Boolean;        unsigned char S_End;
  3244.                       S_PgUp  : Boolean;        unsigned char S_PgUp;
  3245.                       S_PgDn  : Boolean;        unsigned char S_PgDn;
  3246.                       S_Up    : Boolean;        unsigned char S_Up;
  3247.                       S_Down  : Boolean;        unsigned char S_Down;
  3248.                       S_Left  : Boolean;        unsigned char S_Left;
  3249.                       S_Right : Boolean;        unsigned char S_Right;
  3250.                       S_Ins   : Boolean;        unsigned char S_Ins;
  3251.                       S_Del   : Boolean;        unsigned char S_Del;
  3252.                   ----------------------------  -----------------------
  3253.       
  3254.       
  3255.       
  3256.               Example of Usage:
  3257.                     Pascal                        C
  3258.                     ----------------------------  ---------------------
  3259.                     .                             .
  3260.                     .                             . 
  3261.                     S_ReadScreen;                 S_ReadScreen();
  3262.                     If  S_End Then                if (S_End)
  3263.                         S_ClearScreen;               S_ClearScreen();
  3264.                     If  S_Del Then                if (S_Del)
  3265.                         DeleteRecord;                DeleteRecord();
  3266.                     If  S_PgUp Then               if (S_PgUp)
  3267.                         ScrollNextRecord;            ScrollNextRecord();
  3268.                     If  S_PgDn Then               if (S_PgDn)
  3269.                         ScrollNextRecord;            ScrollPrevRecord();
  3270.                     .                             .
  3271.                     .                             . 
  3272.                     ----------------------------  ----------------------
  3273.       
  3274.               The above code segment shows some ways you might use  the 
  3275.               cursor  control keys to trigger special processing  in  a 
  3276.               program.
  3277.       
  3278.       
  3279.       
  3280.               Alt and Ctrl key combinations.  
  3281.               ---------------------------------------------------------
  3282.               Defined As:
  3283.                   Pascal                        C       
  3284.                   ----------------------------  -----------------------
  3285.                   Var S_Alt   : Boolean;        unsigned char S_Alt;
  3286.                       S_Ctrl  : Boolean;        unsigned char S_Ctrl;
  3287.                       S_Ch    : Char;           unsigned char S_Ch;
  3288.                   ----------------------------  -----------------------
  3289.       
  3290.       
  3291.       
  3292.       
  3293.       
  3294.       
  3295.       
  3296.       
  3297.       
  3298.       
  3299.       
  3300.       
  3301.                                    Page 39
  3302.       
  3303.       
  3304.       
  3305.               Example of Usage:
  3306.                     Pascal                        C
  3307.                     --------------------------  ----------------------
  3308.                     .                           .
  3309.                     .                           . 
  3310.                     S_ReadScreen;               S_ReadScreen();
  3311.       ===>          If  S_Ctrl Then             If (S_Ctrl)
  3312.                         Begin                      {
  3313.       ===>              If  S_Ch = 'C' Then        if (S_Ch == 'C')
  3314.                             S_ClearScreen;            S_ClearScreen();
  3315.                         If  S_Ch = 'D' Then        if (S_Ch == 'D')
  3316.                             DeleteRecord;             DeleteRecord();
  3317.                         If  S_Ch = 'N' Then        if (S_Ch == 'N')
  3318.                             ScrollNextRecord;         ScrollNextRecord();
  3319.                         If  S_Ch = 'P' Then        if (S_Ch == 'P')
  3320.                             ScrollPrevRecord;         ScrollPrevRecord();
  3321.                         End;                       }
  3322.                     .                            .
  3323.                     .                            . 
  3324.                     ---------------------------  ------------------------
  3325.                     
  3326.               The above code segment shows some ways you might use  the 
  3327.               control key in conjunction with regular keyboard characters 
  3328.               to trigger special processing in a program.
  3329.       
  3330.       
  3331.       
  3332.       
  3333.       
  3334.       
  3335.       
  3336.       
  3337.       
  3338.       
  3339.       
  3340.       
  3341.       
  3342.       
  3343.       
  3344.       
  3345.       
  3346.       
  3347.       
  3348.       
  3349.       
  3350.       
  3351.       
  3352.       
  3353.       
  3354.       
  3355.       
  3356.       
  3357.       
  3358.       
  3359.       
  3360.       
  3361.       
  3362.       
  3363.       
  3364.       
  3365.       
  3366.       
  3367.                                    Page 40
  3368.       
  3369.       
  3370.       
  3371.            Shift Keys.                     
  3372.            ---------------------------------------------------------
  3373.            Defined As:
  3374.              Pascal                        C       
  3375.              ----------------------------  ---------------------------
  3376.              Var S_Shift      : Boolean;   unsigned char S_Shift;
  3377.                  S_LeftShift  : Boolean;   unsigned char S_LeftShift;
  3378.                  S_RightShift : Boolean;   unsigned char S_RightShift;
  3379.              ----------------------------  ---------------------------
  3380.       
  3381.             Example of Usage:
  3382.               Pascal                        C
  3383.               ----------------------------  ------------------------
  3384.               .                             .
  3385.               .                             . 
  3386.               S_Point := 0;                 S_Point = -1;
  3387.               While Not S_Esc Do            while (!S_Esc) 
  3388.                 Begin                         {
  3389.                 If  S_Tab Then                if (S_Tab)
  3390.       ===>        If  S_Shift Then             switch (S_Point)
  3391.                     Begin                       {
  3392.                     Case S_Point Of             case 2 : {
  3393.                       3 : S_Point := 2;           S_Point = (S_Shift)? 1:0;
  3394.                       2 : S_Point := 1;           break;}
  3395.                     Else                        case 1 : {
  3396.                       S_Point := 3;             S_Point = (S_Shift)? 0:2; 
  3397.                     End;                          break;}
  3398.                   Else                           default : {
  3399.                     Case S_Point of               S_Point = (S_Shift)? 1:2;
  3400.                       1 : S_Point := 2;           break;}
  3401.                       2 : S_Point := 3;         } 
  3402.                     Else
  3403.                       S_Point := 1;           
  3404.                     End;
  3405.                 S_ReadField;                  S_ReadField();
  3406.                   If S_Enter Then              if (S_Enter)
  3407.                      Process_Screen_Data;          Process_Screen_Data();
  3408.                 End;                          }
  3409.             End;                          }
  3410.             .                             .
  3411.             .                             . 
  3412.             ----------------------------  ---------------------------
  3413.                     
  3414.             The  above code segment shows a way that you can monitor  the 
  3415.             shift  key  to  determine  when to advance  to  the  next  or 
  3416.             previous field on the screen. 
  3417.       
  3418.       
  3419.            Other Keys.
  3420.            ---------------------------------------------------------
  3421.            Read  the  manual  section  "Special  Considerations"  of 
  3422.            "Detecting Special Keys". Some of the keys described  here 
  3423.            will work differently when you are using S_ReadScreen  or 
  3424.            S_ReadField  than they will when you are using  S_ReadKey 
  3425.            or S_NextKey.
  3426.       
  3427.       
  3428.       
  3429.       
  3430.       
  3431.       
  3432.       
  3433.                                    Page 41
  3434.       
  3435.       
  3436.       
  3437.             Defined As:
  3438.                Pascal                        C       
  3439.                ----------------------------  ----------------------------
  3440.                Var S_Enter : Boolean;        unsigned char S_Enter;
  3441.                    S_Esc   : Boolean;        unsigned char S_Esc;
  3442.                    S_Tab   : Boolean;        unsigned char S_Tab;
  3443.                    S_BkSp  : Boolean;        unsigned char S_BkSp;
  3444.                ----------------------------  ----------------------------
  3445.       
  3446.             Example of Usage (S_ReadScreen or S_ReadField):
  3447.                Pascal                        C
  3448.                ----------------------------  ----------------------------
  3449.                .                             .
  3450.                .                             . 
  3451.                While Not S_Esc Do            while (!S_Esc)
  3452.                  Begin                         {
  3453.       ===>       S_ReadScreen;                 S_ReadScreen();
  3454.                  If  S_Enter Then                if (S_Enter)
  3455.                      S_ClearScreen;               S_ClearScreen();
  3456.                  End;                          }
  3457.                .                             .
  3458.                .                             . 
  3459.                -----------------------------  ---------------------------
  3460.                                   
  3461.             Example of Usage (S_ReadKey or S_NextKey):
  3462.                Pascal                        C
  3463.                ----------------------------  ----------------------------
  3464.                .                             .
  3465.                .                             . 
  3466.                While Not S_Esc Do            while (!S_Esc)
  3467.                  Begin                         {
  3468.       ===>       S_ReadKey;                    S_ReadKey();
  3469.                  If S_Enter Then              if (S_Enter)
  3470.                     ResumeProgram;               ResumeProgram;
  3471.                  If S_Tab Then                if (S_Tab)
  3472.                     LoadNextHelpScreen;          LoadNextHelpScreen();
  3473.                  If S_BkSp Then               if (S_BkSp)
  3474.                     LoadPrevHelpScreen;          LoadPrevHelpScreen();
  3475.                  End;                          }
  3476.                .                             .
  3477.                .                             . 
  3478.                -----------------------------  ---------------------------
  3479.                     
  3480.       
  3481.               Toggle key status indicators.
  3482.               ---------------------------------------------------------
  3483.               Turbo  ScrEdit  allows you to monitor the status  of  the 
  3484.               system  toggle  keys.  These  switches  are   continually 
  3485.               updated while  Turbo ScrEdit is  scanning  the  keyboard. 
  3486.       
  3487.               Pressing  the CAP key, NUM LOCK key, or the  SCROLL  LOCK 
  3488.               key  will not interrupt your program, only the toggle  key 
  3489.               indicator is set.
  3490.       
  3491.               The INSERT key works differently, when the INSERT key  is 
  3492.               pressed,  your system toggles the  system  insert  status 
  3493.               between  ON  and  OFF. Turbo ScrEdit  monitors  the  BIOS 
  3494.       
  3495.       
  3496.       
  3497.       
  3498.       
  3499.                                    Page 42
  3500.       
  3501.       
  3502.       
  3503.               toggle  key  status  byte, so it  sets  the  S_InsertMode 
  3504.               indicator  to test TRUE if the system insert mode bit  is 
  3505.               on and FALSE if the system insert bit is off. 
  3506.       
  3507.               Next,  because the insert key is one of the keypad  keys, 
  3508.               Turbo ScrEdit will detect that a key has been pressed and 
  3509.               will  set  S_Ins to test TRUE. 
  3510.       
  3511.               If  you have made a call to S_ReadScreen or  S_ReadField, 
  3512.               Turbo ScrEdit will intercept the insert key and  continue 
  3513.               editing the current field.
  3514.       
  3515.               If you have made a call to S_ReadKey or S_NextKey,  Turbo 
  3516.               ScrEdit  will return control to your program and you  may 
  3517.               then test for and act on the S_Ins key.
  3518.       
  3519.               Defined As:
  3520.                   Pascal                        C       
  3521.                   ----------------------------  ----------------------------
  3522.                   Var S_Caps       : Boolean;   unsigned char S_Caps;
  3523.                       S_InsertMode : Boolean;   unsigned char S_InsertMode;
  3524.                       S_NumLock    : Boolean;   unsigned char S_NumLock;
  3525.                       S_ScrollLock : Boolean;   unsigned char S_ScrollLock;
  3526.                   ----------------------------  ----------------------------
  3527.       
  3528.       
  3529.               Resetting the key indicators.
  3530.               ---------------------------------------------------------
  3531.               Procedure: S_ResetKeyFlags 
  3532.               Function:  To reset all key indicator flags to FALSE.
  3533.               Remarks:   Use  this  procedure  when you  need  to  make 
  3534.                          certain  that all key status  indicator  flags 
  3535.                          have been reset. 
  3536.       
  3537.               Defined in C:
  3538.                      
  3539.                      void S_ResetKeyFlags();   
  3540.       
  3541.               Defined in Pascal;
  3542.       
  3543.                      Procedure S_ResetKeyFlags;
  3544.        
  3545.              Example of Usage:
  3546.                  Pascal                      C
  3547.                  --------------------------  ----------------------------
  3548.                  While Not S_Esc Do          while (!S_Esc) 
  3549.                  Begin                       {
  3550.                    S_ReadScreen;               S_ReadScreen();
  3551.                    If  S_Enter Then            if (S_Enter)
  3552.                      Begin                       {
  3553.                      TestForValidData;           TestForValidData();
  3554.                      If  ErrorFound Then         if (ErrorFound) 
  3555.       ===>               S_ResetKeyFlags;           S_ResetKeyFlags();
  3556.                      End;                        }
  3557.                    If  S_Enter Then            if (S_Enter)
  3558.                      ProcessScreenData;          ProcessScreenData();
  3559.                  End;                         }
  3560.                  ---------------------------  ---------------------------
  3561.       
  3562.       
  3563.       
  3564.       
  3565.                                    Page 43
  3566.       
  3567.       
  3568.       
  3569.       
  3570.                  In  the above example when the ENTER key  is  pressed, 
  3571.                  the  program  calls a procedure that  will  check  the 
  3572.                  contents  of  the  screen record for  valid  data.  If 
  3573.                  errors  are found S_ResetKeyFlags is called  to  reset 
  3574.                  the ENTER key status indicator to prevent the next  if 
  3575.                  statement  from  resulting  in a  TRUE  condition  and 
  3576.                  processing the screen data.
  3577.       
  3578.           Parameters: 
  3579.                  None. 
  3580.        
  3581.                      
  3582.       
  3583.       Duplicating fields or repeating fields.        
  3584.       -----------------------------------------------------------------
  3585.       There are occasions during data entry when the user of a  program 
  3586.       may  wish to key a value into a field and have that value  remain 
  3587.       in the field until he chooses to change it. For example, an  user 
  3588.       may  be keying journal entries into a program. A a number of  the 
  3589.       entries  may have occured on the same day. It would  be  convient 
  3590.       for  the  user to be able to type the transaction date  into  the 
  3591.       date field and then press a button to tell the program to  retain 
  3592.       the date between each transaction. As the user keys entries  into 
  3593.       the  journal,  each  time he enters a transaction,  a  record  is 
  3594.       created from the screen data and the screen is reinitialized  for 
  3595.       the next entry. The entire screen is erased except the date  that 
  3596.       he told the system to keep.
  3597.       
  3598.       To  accomplish this, Turbo ScrEdit provides the  facilities  that 
  3599.       allows your program to change a display only or data entry  field 
  3600.       into a duplicating field and then return it back to it`s original 
  3601.       state. 
  3602.       
  3603.       During  data  entry,  as the user TABs from field to  field,  the 
  3604.       cursor  will  skip over duplicating data entry fields  as  though 
  3605.       they were display only fields.
  3606.       
  3607.       If the user wishes to change the value of a duplicating field  he 
  3608.       can  use  the SHIFT and TAB key combinations to move  the  cursor 
  3609.       backwards  into  the  field. He can then enter a  new  value  and 
  3610.       resume data entry.
  3611.       
  3612.       The new value in the duplicating field will then remain until  it 
  3613.       is  changed or until the field is changed back to a regular  data 
  3614.       entry field and the screen cleared.
  3615.       
  3616.           Testing a fields dupe status.
  3617.           -------------------------------------------------------------
  3618.           Procedure: S_IsDupe(FieldNumber)
  3619.           Function:  Test   the  current  status  of  the  field   that 
  3620.                      corresponds to FieldNumber.
  3621.           Remarks:   This procedure is a boolean function that returns: 
  3622.                      TRUE  = If   the   field   that   corresponds   to 
  3623.                              FieldNumber has already been defined as  a 
  3624.                              dupe field.
  3625.                      FALSE = if   the   field   that   corresponds   to 
  3626.                              FieldNumber  is  a normal  data  entry  or 
  3627.                              display only field. 
  3628.                                   
  3629.       
  3630.       
  3631.                                    Page 44
  3632.       
  3633.       
  3634.       
  3635.           Defined C:
  3636.                  unsigned char S_IsDupe(int index);
  3637.         
  3638.           Defined in Pascal:
  3639.                  Procedure S_SetIs(index:Integer):Boolean;
  3640.       
  3641.           Example of Usage:
  3642.           Pascal                            C
  3643.           --------------------------------  ----------------------------
  3644.           .                                 .
  3645.           .                                 . 
  3646.       =>  If S_SetDupe(S_Point) Then        if (S_SetDupe(S_Point))
  3647.              S_UserMsg :=                      strcpy(S_UserMsg,
  3648.               'Already defined as dupe';         "Already defined as dupe");
  3649.           .                                .
  3650.           .                                . 
  3651.           -------------------------------  ------------------------------
  3652.           In  the above example the status of the field that  corresponds  
  3653.           to S_Point is tested. If the field has already been defined  as 
  3654.           a dupe field the message is issued.
  3655.       
  3656.           Parameters: 
  3657.                  FieldNumber.....An  integer number of the field that  is 
  3658.                                  to be tested.  Field numbers are  listed 
  3659.                                  on  the  Screen  Listing  generated   by 
  3660.                                  option  F5  on the  Turbo  ScrEdit  main 
  3661.                                  menu.
  3662.        
  3663.       
  3664.       
  3665.           Defining a dupe field.
  3666.           -------------------------------------------------------------
  3667.           Procedure: S_SetDupe(FieldNumber)
  3668.           Function:  Changes the field that corresponds to  FieldNumber 
  3669.                      in to a duplicating field. 
  3670.           Remarks:   This procedure is a boolean function that returns: 
  3671.                      TRUE  = The field that corresponds to  FieldNumber 
  3672.                              was successfully set to a dupe field.
  3673.                      FALSE = There  are two possible reasons that  this 
  3674.                              function will return as false:
  3675.                              1 - The   field   that   corresponds    to 
  3676.                                  FieldNumber is currently a dupe field.
  3677.                              2 - The   field   that   corresponds    to 
  3678.                                  FieldNumber  is  the last  data  entry 
  3679.                                  field on the screen.
  3680.       
  3681.                      ** NOTE **  At least one field must remain a  data 
  3682.                      entry field on a screen. If you attempt to set the 
  3683.                      last data entry field on a screen to a dupe  field 
  3684.                      Turbo  ScrEdit  will return a value of  FALSE  and 
  3685.                      issue an error message.
  3686.                                   
  3687.           Defined C:
  3688.                  unsigned char S_SetDupe(int index);
  3689.         
  3690.           Defined in Pascal:
  3691.                  Procedure S_SetDupe(index:Integer):Boolean;
  3692.       
  3693.       
  3694.       
  3695.       
  3696.       
  3697.                                    Page 45
  3698.       
  3699.       
  3700.       
  3701.           Example of Usage:
  3702.           Pascal                            C
  3703.           --------------------------------  ----------------------------
  3704.           .                                 .
  3705.           .                                 . 
  3706.           While Not S_Esc Do                while (!S_Esc) 
  3707.             Begin                             {
  3708.             S_ReadScreen;                     S_ReadScreen();
  3709.             If S_Home Then                    if (S_Home)
  3710.                Begin                             {
  3711.                If S_IsDupe(S_Point) Then         if (S_IsDupe(S_Point))
  3712.                   S_UserMsg :=                      strcpy(S_UserMsg,
  3713.                     ' Dupe Already Set '               " Dupe Already Set");
  3714.                Else                              else
  3715.       ===>        If S_SetDupe(S_Point) Then       if (S_SetDupe(S_Point))
  3716.                      S_UserMsg :=                     strcpy(S_UserMsg,
  3717.                      ' Set as dupe. ';                " Set as dupe. ");
  3718.                End;                              }
  3719.             End;                               }
  3720.            .                                .
  3721.            .                                . 
  3722.            -------------------------------  ---------------------------
  3723.            In  the above example, the user presses the HOME key to  set 
  3724.            the current data entry field as a dupe field. When the  HOME 
  3725.            key  is pressed, the function S_IsDupe is used to check  the 
  3726.            status of the field.
  3727.       
  3728.            -  If  the field is currently defined as a dupe  field,  the 
  3729.               message "Dupe already set" is issued. 
  3730.       
  3731.            -  If  the field is not an active dupe field,  S_SetDupe  is 
  3732.               called  to establish dupe status for the field.   
  3733.       
  3734.               If  the call to S_SetDupe is successful the message  "Set 
  3735.               as dupe." is issued. 
  3736.       
  3737.               If the call to S_SetDupe fails, no action is taken by the 
  3738.               programmer,  Turbo  ScrEdit will  issue  the  appropriate 
  3739.               error  message  explaining why it could  not  change  the 
  3740.               status of the field.
  3741.       
  3742.       
  3743.           Parameters: 
  3744.                  FieldNumber.....An  integer number of the field  that 
  3745.                                  is  to be tested.  Field numbers  are 
  3746.                                  listed   on   the   Screen    Listing 
  3747.                                  generated  by option F5 on the  Turbo 
  3748.                                  ScrEdit main menu. 
  3749.       
  3750.       
  3751.       
  3752.       
  3753.       
  3754.       
  3755.       
  3756.       
  3757.       
  3758.       
  3759.       
  3760.       
  3761.       
  3762.       
  3763.                                    Page 46
  3764.       
  3765.       
  3766.       
  3767.           Resetting a dupe field back to its original status.
  3768.           ------------------------------------------------------------
  3769.           Procedure: S_ResetDupe(FieldNumber)
  3770.           Function:  Restore a dupe field back to its original status. 
  3771.           Remarks:   The  field that corresponds with  FieldNumber,  is 
  3772.                      restored  to  its original display  only  or  data 
  3773.                      entry status. 
  3774.       
  3775.           Defined C:
  3776.                  unsigned char S_ResetDupe(int index);
  3777.         
  3778.           Defined Pascal:
  3779.                  Procedure S_ResetDupe(index:Integer):Boolean;
  3780.       
  3781.           Example of Usage:
  3782.           Pascal                            C
  3783.           --------------------------------  ----------------------------
  3784.           .                                 .
  3785.           .                                 . 
  3786.           While Not S_Esc Do                while (!S_Esc) 
  3787.             Begin                             {
  3788.             S_ReadScreen;                     S_ReadScreen();
  3789.             If S_Home Then                    if (S_Home)
  3790.                Begin                             {
  3791.                If S_IsDupe(S_Point) Then         if (S_IsDupe(S_Point))
  3792.                   Begin                             {
  3793.        ==>        S_ResetDupe(S_Point)              S_ResetDupe(S_Point);
  3794.                   S_UserMsg :=                      strcpy(S_UserMsg,
  3795.                     ' Dupe ReSet ';                   " Dupe ReSet ");
  3796.                   End                               }
  3797.                Else                              else
  3798.                   If S_SetDupe(S_Point) Then       if (S_SetDupe(S_Point))
  3799.                      S_UserMsg :=                     strcpy(S_UserMsg,
  3800.                       ' Set as dupe. ';                 " Set as dupe. ");
  3801.                End;                              }
  3802.             End;                               }
  3803.           .                                 .
  3804.           .                                 . 
  3805.           --------------------------------  ---------------------------
  3806.           In  the  above  example, the user presses the  HOME  key  to 
  3807.           toggle  the  current  data entry field  between  dupe  field 
  3808.           status  and normal data entry status. Once the HOME  key  is 
  3809.           pressed,  the function S_IsDupe is used to check the  status 
  3810.           of  the  current data entry field. 
  3811.       
  3812.           -  If  the  field  pointed  to by S_Point  is  a  dupe  field 
  3813.              already,  S_ResetDupe is called to restore the field  back 
  3814.              to it`s original state.
  3815.       
  3816.           -  If  the  field  is a data entry field or  a  display  only 
  3817.              field, S_SetDupe is called to change the field into a dupe 
  3818.              field.
  3819.       
  3820.              If the call to S_SetDupe is successful the message  "Set 
  3821.              as dupe." is issued. 
  3822.       
  3823.              If the call to S_SetDupe fails, no action is taken by the 
  3824.       
  3825.       
  3826.       
  3827.       
  3828.       
  3829.                                    Page 47
  3830.       
  3831.       
  3832.       
  3833.              programmer.  Turbo  ScrEdit will  issue  the  appropriate 
  3834.              error  message  explaining why it could  not  change  the 
  3835.              status of the field.
  3836.       
  3837.           Parameters: 
  3838.                  FieldNumber.....An  integer number of the field  that 
  3839.                                  is  to be tested.  Field numbers  are 
  3840.                                  listed   on   the   Screen    Listing 
  3841.                                  generated  by option F5 on the  Turbo 
  3842.                                  ScrEdit main menu. 
  3843.       
  3844.       
  3845.       
  3846.           Clearing all dupe fields.
  3847.           ------------------------------------------------------------
  3848.           Procedure: S_ClearDupes
  3849.           Function:  Restore all dupe fields on the current data  entry  
  3850.                      screen back to thier original status. 
  3851.           Remarks:   None.
  3852.       
  3853.           Defined C:
  3854.                  unsigned char S_ClearDupes()
  3855.         
  3856.           Defined Pascal:
  3857.                  Procedure S_ClearDupes;
  3858.       
  3859.           Example of Usage:
  3860.           Pascal                            C
  3861.           --------------------------------  ----------------------------
  3862.           .                                 .
  3863.           .                                 . 
  3864.           If S_End Then                     if (S_End)
  3865.              Begin                             {
  3866.        ==>   S_ClearDupes;                     S_ClearDupes();
  3867.              S_ClearScreen(1);                 S_ClearScreen(1);
  3868.              S_UserMsg :=                      strcpy(S_UserMsg,
  3869.                ' Dupe Fields Cleared ';           " Dupe Fields Cleared");
  3870.              End;                              }
  3871.           .                                 .
  3872.           .                                 . 
  3873.           --------------------------------  ---------------------------
  3874.           In the above example, when the user presses the END key,  all 
  3875.           the  active  dupe  fields on the screen are  reset  to  thier     
  3876.           original status.
  3877.            
  3878.           The screen is then cleared and any initial values assigned in 
  3879.           the  screens field processing statements are applied  to  the 
  3880.           screen fields. 
  3881.       
  3882.           Finally  a  "user" message confirming that  the  program  has 
  3883.           cleared all the dupe fields, is set to be issued by the  next 
  3884.           call to S_ReadField.
  3885.       
  3886.       
  3887.       
  3888.       
  3889.       
  3890.       
  3891.       
  3892.       
  3893.       
  3894.       
  3895.                                    Page 48
  3896.       
  3897.       
  3898.       
  3899.       Validating field values.                       
  3900.       ----------------------------------------------------------------
  3901.       Field  validation  is when Turbo ScrEdit tests the  values  that 
  3902.       have  been  keyed  into  the  screen  fields  against  the  field 
  3903.       processing  statements  defined  for the fields  of  the  screen. 
  3904.       Normally  field validation occurs automatically when the user  of 
  3905.       your program has completed filling in the screen form and presses 
  3906.       the ENTER key.
  3907.       
  3908.       When  S_EnterAsTab is set to TRUE, Turbo ScrEdit translates  the 
  3909.       ENTER  key  into a TAB key, and SHIFT and ENTER into  SHIFT  and 
  3910.       TAB. Under these conditions Turbo ScrEdit will no longer  detect 
  3911.       that  the  ENTER  key was pressed, and will  not  perform  field 
  3912.       validation automatically. In this case the programmer must  code 
  3913.       his own calls to Turbo ScrEdit's field validation procedures.
  3914.       
  3915.           Validating the entire screens contents.
  3916.           -------------------------------------------------------------
  3917.           Procedure: S_ValidateScreen
  3918.           Function:  Test  the fields on the screen against  any  field 
  3919.                      processing  statements that have been  defined.
  3920.           Variable:  S_ScreenValid 
  3921.           Function:  A boolean variable that will return the results of 
  3922.                      the call to S_ValidateScreen. Returns:
  3923.                      TRUE  = All fields passed validation as correct.
  3924.                      FALSE = A  field did not  pass field validation.
  3925.           Variable:  S_ErrorMsg
  3926.           Function:  Returns  NULL string if no errors are  found,  or 
  3927.                      returns the error message associated to the field 
  3928.                      validation statement that the field did not pass.
  3929.           Variable:  S_Point
  3930.           Function:  Returns a pointer to the last field edited if the 
  3931.                      screen contains valid data.
  3932.                      Returns  a  pointer to the field that  failed  to 
  3933.                      pass the edit test if bad data is detected.
  3934.       
  3935.           Remarks:   None.
  3936.       
  3937.           Defined C:
  3938.                  void S_ValidateScreen()
  3939.         
  3940.           Defined Pascal:
  3941.                  Procedure S_ValidateScreen;
  3942.       
  3943.           Example of Usage:
  3944.           Pascal                            C
  3945.           --------------------------------  ----------------------------
  3946.           .                                 .
  3947.           .                                 . 
  3948.           S_EnterAsTab := True;             S_EnterAsTab = 1;
  3949.           Repeat                            do{
  3950.             S_ReadScreen;                     S_ReadScreen();  
  3951.             If S_F1 Then                      if (S_F1)
  3952.       ==>      S_ValidateScreen;                 S_ValidateScreen();
  3953.       ==> Until S_ScreenValid;              }while (!S_ScreenValid);
  3954.           ProcessScreenData;                ProcessScreenData();
  3955.           .                                 .
  3956.           .                                 . 
  3957.           --------------------------------  ------------------------------
  3958.       
  3959.       
  3960.       
  3961.                                    Page 49
  3962.       
  3963.       
  3964.       
  3965.       
  3966.           In  the above example the ENTER key has been set to  act  as 
  3967.           the  TAB key and the programmer has specified that the  user 
  3968.           of the program will press the F1 key to indicate that he has 
  3969.           finished  entering data into the screen and wants  the  data 
  3970.           processed. 
  3971.       
  3972.           When   the   F1   key   is   pressed   the   program   calls 
  3973.           S_ValidateScreen. 
  3974.           -  If  the screens contents DO NOT pass the validation  test, 
  3975.              the  repeat/until loop or do/while loop is  not  satisfied 
  3976.              and control returns to S_ReadScreen with S_Point  pointing 
  3977.              to the offending field and S_ErrorMsg containing the error 
  3978.              message.
  3979.           -  If  the screens contents DO pass the validation test,  the 
  3980.              repeat/until  and  do/while statements are  satisfied  and 
  3981.              control drops out of the loop and continues with a call to 
  3982.              ProcessScreenData.
  3983.       
  3984.          Parameters: 
  3985.                  None.
  3986.        
  3987.       
  3988.           Validating a single fields contents.
  3989.           -------------------------------------------------------------
  3990.           Procedure: S_ValidateScreen
  3991.           Function:  Test  the fields on the screen against any  field 
  3992.                      processing statements that have been defined  for 
  3993.                      the fields on the screen.
  3994.           Variable:  S_ValidateField (type:integer)
  3995.           Function:  This  field is used to specify the field that  is 
  3996.                      to  have  its  value  tested  against  the  field 
  3997.                      processing statements defined for it.
  3998.           Variable:  S_ScreenValid   (type:boolean)
  3999.           Function:  A  boolean variable that will return the  results 
  4000.                      of the call to S_ValidateScreen. Returns:
  4001.                      TRUE  = All fields passed validation as correct.
  4002.                      FALSE = A field has been found that did not  pass 
  4003.                              field validation. 
  4004.           Variable:  S_ErrorMsg (type:S_Str80) 
  4005.           Function:  Turbo  ScrEdit  returns  the  programmers   error 
  4006.                      message   that   was  specified  in   the   field 
  4007.                      validation statement that the field did not pass.
  4008.           Variable:  S_Point (type:integer)
  4009.           Function:  If  the screens contents were valid  S_Point  will 
  4010.                      contain  the  field number of the  field  that  is 
  4011.                      being edited before the call to S_ValidateScreen.
  4012.       
  4013.           Remarks:   When     S_ValidateScreen    is    called     and 
  4014.                      S_ValidateField  has been assigned a field  index 
  4015.                      number,  S_ValidateScreen will only validate  the 
  4016.                      contents    of   the   field   pointed   to    by 
  4017.                      S_ValidateField.
  4018.       
  4019.           Defined C:
  4020.                  void S_ValidateScreen()
  4021.         
  4022.           Defined Pascal:
  4023.                  Procedure S_ValidateScreen;
  4024.       
  4025.       
  4026.       
  4027.                                    Page 50
  4028.       
  4029.       
  4030.           Example of Usage:
  4031.               Pascal                        C
  4032.               ----------------------------  ----------------------------
  4033.               .                             . 
  4034.               S_EnterAsTab := True;         S_EnterAsTab = 1; 
  4035.               S_Point := 0;                 S_Point = -1;
  4036.               While Not S_Esc Do            while (!S_Esc) 
  4037.                 Begin                         {
  4038.                 If  S_Tab Then                if (S_Tab)
  4039.                   If  S_Shift Then             switch (S_Point)
  4040.                     Begin                       {
  4041.                     Case S_Point Of             case 2 : {
  4042.                       3 : S_Point := 2;           S_Point = (S_Shift)? 1:0;
  4043.                       2 : S_Point := 1;           break;}
  4044.                     Else                        case 1 : {
  4045.                       S_Point := 3;             S_Point = (S_Shift)? 0:2; 
  4046.                     End;                          break;}
  4047.                   Else                           default : {
  4048.                     Case S_Point of               S_Point = (S_Shift)? 1:2;
  4049.                      1 : S_Point := 2;           break;}
  4050.                      2 : S_Point := 3;         } 
  4051.                      Else
  4052.                        S_Point := 1;           
  4053.                     End;
  4054.                 Repeat                        do{
  4055.                   S_ReadField;                  S_ReadField(); 
  4056.                   If S_F1 Then                  if (S_F1)
  4057.                      Begin                         {
  4058.       ===>           S_ValidateField := S_Point;   S_ValidateField = S_Point;
  4059.       ===>           S_ValidateScreen;             S_ValidateScreen();
  4060.                      End;                          }
  4061.                 Until (S_Esc) Or              }while ((!S_Esc)&&
  4062.                       (S_Tab) Or                      (!S_Tab)&&
  4063.       ===>            (S_ScreenValid)                 (!S_ScreenValid))
  4064.                 If (Not S_Esc) And            if ((!S_Esc)&&
  4065.                    (Not S_Tab)                    (!S_Tab))
  4066.                    Process_Screen_Data;          Process_Screen_Data();
  4067.                 End;                          }
  4068.               .                             . 
  4069.               ----------------------------  ---------------------------
  4070.               In  the above example the ENTER key has been set to  act 
  4071.               as  the TAB key. The programmer has specified  that  the 
  4072.               user  of the program will press the TAB to advance  from 
  4073.               field  to field, the ESCAPE key to end the program,  and 
  4074.               the  F1  key to indicate that he has  finished  entering 
  4075.               data into the screen and wants the data processed. 
  4076.       
  4077.               When   the   F1  key  is  pressed  the   field   pointer 
  4078.               S_ValidateField  is  assigned the value of  the  current 
  4079.               field and the program calls S_ValidateScreen. 
  4080.               - If  the  fields  contents DO NOT pass  the  validation 
  4081.                 test, the conditions of the loop is not satisfied  and 
  4082.                 control  returns to S_ReadField with S_Point  pointing 
  4083.                 to  the offending field and S_ErrorMsg containing  the 
  4084.                 error message.
  4085.               - If  the screens contents DO pass the validation  test, 
  4086.                 control  drops  out of the loop and continues  with  a 
  4087.                 call to ProcessScreenData.
  4088.       
  4089.       
  4090.       
  4091.       
  4092.       
  4093.                                    Page 51
  4094.       
  4095.       
  4096.          Parameters: 
  4097.                  None.
  4098.        
  4099.       
  4100.       Changing DISPLAY only fields to DATA ENTRY Fields:
  4101.       ----------------------------------------------------------------
  4102.       When  screens are created, the fields on the screen are  defined 
  4103.       as display only fields or data entry fields. Display only fields 
  4104.       are  not  normally accessible to the person sitting at  the  key 
  4105.       board.  Display  only  fields are used  by  the  programmer  for 
  4106.       displaying  information on the screen that the user can see,  but 
  4107.       can not change.
  4108.       
  4109.       Turbo  ScrEdit allows the programmer to dynamically change  data 
  4110.       entry  fields on the screen into "protected" fields by  changing 
  4111.       the  field  types from data entry to display  only.  Using  this 
  4112.       feature allows for such things as security access to be enforced 
  4113.       on a screen field level. 
  4114.       
  4115.       Likewise, Turbo ScrEdit allows display only fields to be  changed 
  4116.       into data entry fields.
  4117.       
  4118.           ------------------------------------------------------------
  4119.           Procedure: S_SetDisplayOff(FieldNumber) 
  4120.           Function:  Changes the field type from DISPLAY ONLY to  DATA 
  4121.                      ENTRY. 
  4122.           Remarks:   This  procedure  is  a function  that  returns  a 
  4123.                      result  status  that indicates if the  field  was 
  4124.                      successfully  changed from display only  to  data 
  4125.                      entry. The status codes returned are:
  4126.                   
  4127.                      0 - Successfully completed.
  4128.                      2 - The  field  indexed by FieldNumber  does  not 
  4129.                          exist.
  4130.                      3 - The  field  indexed  by  FieldNumber  is  not 
  4131.                          currently a display only field.
  4132.                      4 - Specified field number is not greater than 0.
  4133.                   
  4134.           Defined C:
  4135.                  int S_SetDisplayOff(int FieldNumber)
  4136.         
  4137.           Defined Pascal:
  4138.                  Function S_SetDisplayOff(FieldNumber:Integer):Integer;
  4139.       
  4140.           Example of Usage:
  4141.           Pascal                            C
  4142.           --------------------------------  ----------------------------
  4143.           Var Result : Integer;             int Result;
  4144.           .                                 .
  4145.           .                                 . 
  4146.           If  User_Access > 3 Then          if  (User_Access > 3)
  4147.       ==>     Result := S_SetDisplayOff(3);     Result = S_SetDisplayOff(3);
  4148.           .                                 .
  4149.           .                                 . 
  4150.           --------------------------------  ------------------------------
  4151.           In the above example if the users system security is  greater 
  4152.           than  level  three, the user is given update  access  to  the 
  4153.           field  number  three on the screen,  otherwise  field  number 
  4154.           three  will  remain a display only field and the  user  would 
  4155.           have look only privileges.
  4156.       
  4157.       
  4158.       
  4159.                                    Page 52
  4160.       
  4161.       
  4162.       
  4163.           Notice  that the program is not programmatically testing  the 
  4164.           result  field  to  see  if it is  zero.  Actually  the  value 
  4165.           returned  is  used for debugging the  program.  The  finished 
  4166.           application should work correctly.
  4167.       
  4168.           Parameters: 
  4169.                  FieldNumber.....An integer number of the field that is 
  4170.                                  to  be  tested.   Field  numbers   are 
  4171.                                  listed on the Screen Listing generated 
  4172.                                  by option F5 on the Turbo ScrEdit main 
  4173.                                  menu. 
  4174.       
  4175.       
  4176.        
  4177.       
  4178.       Changing DATA ENTRY fields to DISPLAY only fields:
  4179.       -----------------------------------------------------------------
  4180.       When screens are created, the fields on the screen are defined as 
  4181.       display only fields or data entry fields. Display only fields are 
  4182.       not  normally accessible to the person sitting at the key  board. 
  4183.       Display  only  fields are used by the programmer  for  displaying 
  4184.       information on the screen that the user can see but not change.
  4185.       
  4186.       Turbo  ScrEdit also allows the programmer to  dynamically  change 
  4187.       data  entry  fields  on the screen  into  "protected"  fields  by 
  4188.       changing  the field types from data entry to display only.  Using 
  4189.       this  feature  allows for such things as security  access  to  be 
  4190.       enforced  on  field level.
  4191.       
  4192.       Even  as Turbo ScrEdit allows changing fields from data entry  to 
  4193.       display only, it also allows changing display only fields to data 
  4194.       entry fields.
  4195.       
  4196.           -------------------------------------------------------------
  4197.           Procedure: S_SetDisplayOn(FieldNumber) 
  4198.           Function:  Changes the field type from DATA ENTRY to  DISPLAY 
  4199.                      ONLY.
  4200.           Remarks:   This procedure is a function that returns a result 
  4201.                      status   that   indicates   if   the   field   was 
  4202.                      successfully  changed. The status  codes  returned 
  4203.                      are:
  4204.                   
  4205.                      0 - Successfully completed.
  4206.                      1 - Specified  field is the last data entry  field 
  4207.                          on  the  screen. Turbo ScrEdit  requires  that 
  4208.                          data  entry  screens have at  least  one  data 
  4209.                          entry field.
  4210.                      2 - Specified field does not exist on the screen.
  4211.                      3 - Specified field is already defined as  display 
  4212.                          only.
  4213.                      4 - Specified  field  number is not  greater  than 
  4214.                          zero.
  4215.       
  4216.           Defined C:
  4217.                  int S_SetDisplayOn(int FieldNumber)
  4218.         
  4219.           Defined Pascal:
  4220.                  Function S_SetDisplayOn(FieldNumber:Integer):Integer;
  4221.       
  4222.       
  4223.       
  4224.       
  4225.                                    Page 53
  4226.       
  4227.       
  4228.       
  4229.           Example of Usage:
  4230.           Pascal                            C
  4231.           --------------------------------  ----------------------------
  4232.           Var Result : Integer;             int Result;
  4233.           .                                 .
  4234.           .                                 . 
  4235.           If  User_Access < 3 Then          if  (User_Access < 3)
  4236.       ==>     Result:=S_SetDisplayOn(9);        Result=S_SetDisplayOn(9);
  4237.           While Not S_Esc Do                while (!S_Esc)
  4238.             Begin                             { 
  4239.             .                                 .
  4240.             .                                 .
  4241.             .                                 .
  4242.             End;                              }
  4243.           .                                 .
  4244.           .                                 . 
  4245.           --------------------------------  ------------------------------
  4246.           In  the  above example if the user is  assigned  a   security 
  4247.           level  that   is less than three, field 9 is changed  into  a 
  4248.           display  only  field,  and  the  user  will  have  look  only 
  4249.           privileges.
  4250.       
  4251.           Notice that the program segment above is not programmatically 
  4252.           testing  the result field to see if it is zero. Actually  the 
  4253.           value  returned  is  used  for  debugging  the  program.  The 
  4254.           finished application should work correctly.
  4255.       
  4256.           Parameters: 
  4257.                  FieldNumber.....An integer number of the field that is 
  4258.                                  to  be  tested.   Field  numbers   are 
  4259.                                  listed on the Screen Listing generated 
  4260.                                  by option F5 on the Turbo ScrEdit main 
  4261.                                  menu. 
  4262.       
  4263.       
  4264.        
  4265.       
  4266.       Customizing Turbo ScrEdit Screens programmatically:
  4267.       -----------------------------------------------------------------
  4268.       Programs created with Turbo ScrEdit can be totally configured  to 
  4269.       the  end  users  tastes by  writing  custom  color  configuration 
  4270.       routines using the procedures described in this section. 
  4271.       
  4272.       For help in how to use these procedures see the examples coded in 
  4273.       ScrDemo.P and ScrDemo.C and described in the tutor.
  4274.       
  4275.           Changing the colors of a screen
  4276.           -------------------------------------------------------------
  4277.           Procedure: S_ChangeScreenColor
  4278.                         (Function,BackGround,ForeGround,
  4279.                          StartRow,EndRow,StartColumn,EndColumn)
  4280.           Function:  Changes  the color attribute bytes in the  current 
  4281.                      screen  record. Changes are performed in the  area 
  4282.                      specified  by STARTROW, STARTCOLUMN,  and  ENDROW, 
  4283.                      ENDCOLUMN. The color changes are made for all  the 
  4284.                      characters  that  are  of the  type  specified  by 
  4285.                      FUNCTION to the color specified by BACKGROUND  and 
  4286.                      FOREGROUND.            
  4287.       
  4288.       
  4289.       
  4290.       
  4291.                                    Page 54
  4292.       
  4293.       
  4294.       
  4295.           Remarks:   Only the screen record is changed, not the  actual 
  4296.                      screen  that is visible on the video display.  For 
  4297.                      information  on how to view the new screen  colors 
  4298.                      see section "Displaying the color changes" of this
  4299.                      manual.
  4300.       
  4301.                      Color changes are temporary and will be reset  the 
  4302.                      next   time  the  screen  is  loaded.   For   more 
  4303.                      information  on how to make the changes  permanent 
  4304.                      see  section  "Making  color  changes   permanent" 
  4305.                      of this manual.
  4306.       
  4307.                      This procedure is a function that returns a result 
  4308.                      status. The status codes returned are:
  4309.                   
  4310.                      0 - Successfully completed.
  4311.                      1 - Function parameter is not in the range of 1 to 4.
  4312.                      2 - Background color is not in range of 0 to 7.
  4313.                      3 - Foreground color  is not in range of 0 to 30.
  4314.                      4 - StartRow is not in range of 0 to 24.
  4315.                      5 - StartRow  is  greater than EndRow or  EndRow  is 
  4316.                          greater than 24.
  4317.                      6 - StartColumn is not in range of 1 to 80.
  4318.                      7 - StartColumn   is  greater  than   EndColumn   or 
  4319.                          EndColumn is greater than 80.
  4320.       
  4321.           Defined C:
  4322.                  int S_ChangeScreenColor(
  4323.                      unsigned int Control,     
  4324.                      unsigned int Bg,
  4325.                      unsigned int Fg,
  4326.                      unsigned int StartRow,
  4327.                      unsigned int EndRow,
  4328.                      unsigned int StartColumn,
  4329.                      unsigned int EndColumn)
  4330.         
  4331.           Defined Pascal:
  4332.                  Function S_ChangeScreenColor(
  4333.                      Control,
  4334.                      Bg,
  4335.                      Fg        : Byte;
  4336.                      StartRow,
  4337.                      EndRow,
  4338.                      StartColumn,
  4339.                      EndColumn : Integer):Integer;
  4340.       
  4341.       
  4342.       
  4343.          See example on next page.
  4344.       
  4345.       
  4346.       
  4347.       
  4348.       
  4349.       
  4350.       
  4351.       
  4352.       
  4353.       
  4354.       
  4355.       
  4356.       
  4357.                                  Page 55
  4358.       
  4359.       
  4360.       
  4361.           Example of Usage:
  4362.           Pascal                            C
  4363.           --------------------------------  ----------------------------
  4364.           Const
  4365.           All_Chars    : Byte    = 0;       int All_Char     = 0;
  4366.           Single_Lines : Integer = 1;       int Single_Lines = 1;
  4367.           Double_Lines : Integer = 2;       int Double_Lines = 2;
  4368.           Block_Lines  : Integer = 3;       int Block_Lines  = 3;
  4369.           Var
  4370.           Result : Integer;                 int Result; 
  4371.           .                                 .
  4372.           .                                 .
  4373.           ReadConfigRecord;                 ReadConfigRecord();
  4374.           .                                 .
  4375.           .                                 . 
  4376.       ==> Result:=S_ChangeScreenColor(      Result=S_ChangeScreenColor(
  4377.                   All_Chars,                       All_chars,
  4378.                   ConfigRec.Bg,                    ConfigRec.Bg,
  4379.                   ConfigRec.Fg,                    ConFigRec.Fg,
  4380.                   1,1,80,24);                      1,1,80,24);
  4381.       ==> Result:=S_ChangeScreenColor(      Result=S_ChangeScreenColor(
  4382.                   All_Chars,                       All_chars,                      
  4383.                   ConfigRec.LogoBg,                ConfigRec.LogoBg,
  4384.                   ConfigRec.LogoFg,                ConFigRec.LogoFg,
  4385.                   10,4,70,6);                      9,3,69,5);
  4386.           .                                 .
  4387.           .                                 . 
  4388.           --------------------------------  ------------------------------
  4389.           In the first few lines of the  above example the valid values 
  4390.           for the CONTROL parameter of S_ChangeScreenColor are defined.
  4391.       
  4392.           Next we see that a procedure is performed that will read  the 
  4393.           configuration file.
  4394.       
  4395.           Next we see two calls to S_ChangeScreenColor using the  color 
  4396.           codes stored in the configuration record.
  4397.       
  4398.           In  the  first call to S_ChangeScreenColor, we see  that  all 
  4399.           characters  positions in the screen starting at column 1  and 
  4400.           row  1 (when using C remember indexing starts at  0)  through 
  4401.           column 80 and row 24 will be assigned the color codes  stored 
  4402.           in the configuration record fields Bg and Fg. 
  4403.       
  4404.           In  the  next call to S_ChangeScreenColor, we  see  that  all 
  4405.           characters positions in the screen starting at column 10  and 
  4406.           row 4 through column 70 and row 6 will be assigned the  color 
  4407.           codes  stored in the configuration record fields LogoBg  and 
  4408.           LogoFg. 
  4409.       
  4410.           Parameters:
  4411.                   Control....... Selects one of the four modes:
  4412.                                  0 - Change  all color attribute  bytes 
  4413.                                      for all character positions in  the 
  4414.                                      specified area of the screen.
  4415.                                  1 - Change     all    single     lines 
  4416.                                      character's color attributes found 
  4417.                                      in  the  specified  area  of   the 
  4418.                                      screen.
  4419.       
  4420.       
  4421.       
  4422.       
  4423.                                    Page 55
  4424.       
  4425.       
  4426.       
  4427.                                  2 - Change all double line character's 
  4428.                                      color attribute bytes found in the 
  4429.                                      specified area of the screen.
  4430.                                  3 - Change  all  block  line   drawing 
  4431.                                      characters  attribute bytes  found 
  4432.                                      in  the  specified  area  of   the 
  4433.                                      screen.
  4434.                   Bg............ The  new background color value to  be 
  4435.                                  used (valid values 0 through 7.)
  4436.                   Fg............ The  new foregound color value  to  be 
  4437.                                  used  (valid values 0 through 30  with 
  4438.                                  16 through 30 being blinking.)
  4439.                   StartRow...... The top or first row  of the screen to 
  4440.                                  be  changed. (valid  values   Pascal:1 
  4441.                                  through 24, C:0 through 23.)
  4442.                   EndRow........ The  bottom or last row of the  screen 
  4443.                                  to be changed. (valid values  Pascal:1 
  4444.                                  through 24, C:0 through 23.) 
  4445.                   StartColumn... The   top  left  starting  column   on 
  4446.                                  screen. (valid values Pascal:1 through 
  4447.                                  80, C:0 through 79.)
  4448.                   EndColumn..... The bottom right ending column on  the 
  4449.                                  screen. (valid values  Pascal:1 through 
  4450.                                  80, C:0 through 79.)
  4451.       
  4452.       
  4453.       
  4454.           Changing field colors
  4455.           -------------------------------------------------------------
  4456.           Procedure: S_ChangeFieldColor
  4457.                         (FieldNumber,FieldMode,ForeGround,BackGround);
  4458.           Function:  Changes  the  Normal, Display,  and  Prompt  color 
  4459.                      codes  that  have  been  previously  defined   for 
  4460.                      the specified field.
  4461.           Remarks:   When  a field's colors are changed, the  new  color 
  4462.                      will  be displayed on the screen by the next  call 
  4463.                      to    S_ReadScreen,    S_ReadField,     S_ReadKey, 
  4464.                      or S_RefreshScreen.
  4465.       
  4466.                      Color changes are temporary and will be reset  the 
  4467.                      next   time  the  screen  is  loaded.   For   more 
  4468.                      information  on how to make the changes  permanent 
  4469.                      see  section  "Making  color  changes   permanent" 
  4470.                      of this manual.
  4471.       
  4472.                      This procedure is a function that returns a result 
  4473.                      status  that  indicates if the  screen  field  was 
  4474.                      successfully changed.  
  4475.       
  4476.                      The status codes returned are:
  4477.                   
  4478.                      0 - Successfully completed.
  4479.                      1 - Field specified does not exist.                  
  4480.                      2 - Field Mode specified is out of range 1 to 3.
  4481.                      3 - Specified Background color is not in the range 
  4482.                          of 0 to 7.          
  4483.                      4 - Specified Foreground color is not in the  range 
  4484.                          of 0 to 30.
  4485.       
  4486.       
  4487.       
  4488.       
  4489.                                    Page 57
  4490.       
  4491.       
  4492.       
  4493.           Defined C:
  4494.                  int S_ChangeFieldColor(
  4495.                      unsigned int FieldNumber,     
  4496.                      unsigned int FieldMode,
  4497.                      unsigned int Bg,
  4498.                      unsigned int Fg)
  4499.         
  4500.           Defined Pascal:
  4501.                  Function S_ChangeFieldColor(
  4502.                      FieldNumber,
  4503.                      FieldMode,  
  4504.                      Bg,
  4505.                      Fg : Integer;):Integer;
  4506.       
  4507.           Example of Usage:
  4508.           Pascal                            C
  4509.           --------------------------------  ----------------------------
  4510.           .                                 .
  4511.           .                                 .
  4512.           Var Result : Integer;             int Result; 
  4513.           .                                 .
  4514.           .                                 .
  4515.           Procedure Load_YourScreen;        void Load_YourScreen()
  4516.           Begin                             {
  4517.           S_DelayScreen := True;            S_DelayScreen = 1;   
  4518.           S_LoadScreen('YourScreen');       S_LoadScreen("YourScreen");  
  4519.           For X := 1 to 9 do                for (x=0;x<9;x++)
  4520.              Begin                             {
  4521.       ==>    Result:=S_ChangeFieldColor(       Result=S_ChangeFieldColor(
  4522.                        X,0,                             X,0,
  4523.                        ConfigRec.NormalBg,              ConfigRec.NormalBg,
  4524.                        ConfigRec.NormalFg);             ConfigRec.NormalBg);
  4525.       ==>    Result:=S_ChangeFieldColor(       Result=S_ChangeFieldColor(
  4526.                        X,1,                             X,1,
  4527.                        ConfigRec.PromptBg,              ConfigRec.PromptBg,
  4528.                        ConfigRec.PromptFg);             ConfigRec.PromptBg);
  4529.       ==>    Result:=S_ChangeFieldColor(       Result=S_ChangeFieldColor(
  4530.                        X,2,                             X,2,
  4531.                        ConfigRec.DisplayBg,             ConfigRec.DisplayBg,
  4532.                        ConfigRec.DisplayFg);            ConfigRec.DisplayBg);
  4533.              End;                              }
  4534.           S_RefreshScreen;                  S_RefreshScreen(); 
  4535.           .                                 .
  4536.           .                                 . 
  4537.           --------------------------------  ------------------------------
  4538.           In the code segment above we see that each time the procedure  
  4539.           "Load_YourScreen"  is  called,  the  screen  "YourScreen"  is 
  4540.           loaded, prepared for use, and displayed on the screen. Notice 
  4541.           that the S_DelayScreen variable has been set to TRUE to  keep 
  4542.           the screen from being displayed.
  4543.            
  4544.           Next  we  see that a loop is performed to loop  through  nine 
  4545.           screen fields changing the color assignments of the fields to 
  4546.           the colors defined in the configuration record.
  4547.       
  4548.           When  the  loop is finish the  procedure  S_RefreshScreen  is 
  4549.           called to display the modified screen. 
  4550.       
  4551.       
  4552.       
  4553.       
  4554.       
  4555.                                    Page 58
  4556.       
  4557.       
  4558.       
  4559.           Notice   also   that  the  program  segment  above   is   not 
  4560.           programmatically  testing  the result field to see if  it  is 
  4561.           zero.  Actually the value returned is used for debugging  the 
  4562.           program. The finished application should work correctly.
  4563.       
  4564.       
  4565.           Parameters:
  4566.                  FieldNumber...The unique field number to be changed.
  4567.                  FieldMode.....Specifies the field display mode that is 
  4568.                                to  be assigned new color  codes.  There 
  4569.                                are three valid values:
  4570.                                0 = New colors are to be assigned to the 
  4571.                                    "Normal" mode of the field (an empty 
  4572.                                    field that is not being edited.) 
  4573.                                1 = New colors are to be assigned to the 
  4574.                                    "Prompt"  mode of the  field  (field 
  4575.                                    data  is being entered  or  edited.) 
  4576.                                2 = New colors are to be assigned to the 
  4577.                                    "Display"  mode of the  field  (None 
  4578.                                    empty, not being edited.) 
  4579.                  ForeGround....Specifies  the new foreground color  for 
  4580.                                the field (valid values 0 through 30.)
  4581.                  BackGround....Specifies  the new background color  for 
  4582.                                the field (valid values 0 through 7.)
  4583.                                
  4584.       
  4585.        
  4586.       
  4587.           Displaying the color changes.
  4588.           -------------------------------------------------------------
  4589.           Procedure: S_RefreshScreen
  4590.           Function:  Repaints the current screen.
  4591.           Remarks:   This procedure refreshes the current video display 
  4592.                      with the current screen, or last screen loaded  by 
  4593.                      S_LoadScreen.
  4594.       
  4595.                      **  WARNING ** if no screen has been loaded,  your 
  4596.                      system   will   fill  the  display   with   random 
  4597.                      characters  and  will most likely hang.  You  will 
  4598.                      have to perform a hard reset and reboot to resume.
  4599.        
  4600.           Defined C:
  4601.                  int S_RefreshScreen()
  4602.         
  4603.           Defined Pascal:
  4604.                  Procedure S_RefreshScreen;
  4605.       
  4606.       
  4607.           See Example on next page.
  4608.       
  4609.       
  4610.       
  4611.       
  4612.       
  4613.       
  4614.       
  4615.       
  4616.       
  4617.       
  4618.       
  4619.       
  4620.       
  4621.                                    Page 59
  4622.       
  4623.       
  4624.       
  4625.           Example of Usage:
  4626.           Pascal                            C
  4627.           --------------------------------  ----------------------------
  4628.           .                                 .
  4629.           .                                 .
  4630.           Var Result : Integer;             int Result; 
  4631.           .                                 .
  4632.           .                                 .
  4633.           Procedure Customize_YourScreen;   void Customize_YourScreen()
  4634.           Begin                             {
  4635.           S_DelayScreen := True;            S_DelayScreen = 1;
  4636.           S_LoadScreen('YourScreen');       S_LoadScreen("YourScreen");  
  4637.           For X := 1 to 9 do                for (x=0;x<9;x++)
  4638.              Begin                             {
  4639.              Result:=S_ChangeFieldColor(       Result=S_ChangefieldColor(
  4640.                        X,0,                             X,0,
  4641.                        UserNormalBg,                    UserNormalBg,
  4642.                        UserNormalFg);                   UserNormalBg);
  4643.              Result:=S_ChangeFieldColor(       Result=S_ChangefieldColor(
  4644.                        X,1,                             X,1,
  4645.                        UserPromptBg,                    UserPromptBg,
  4646.                        UserPromptFg);                   UserPromptBg);
  4647.              Result:=S_ChangeFieldColor(       Result=S_ChangefieldColor(
  4648.                        X,2,                             X,2,
  4649.                        UserDisplayBg,                   UserDisplayBg,
  4650.                        UserDisplayFg);                  UserDisplayBg);
  4651.              End;                              }
  4652.           S_StoreColorChanges;              S_StoreColorChanges();
  4653.           .                                 .
  4654.           .                                 . 
  4655.           --------------------------------  ------------------------------
  4656.           In  the  code segment above we see that  when  the  procedure 
  4657.           "Customize_YourScreen" is called, the screen "YourScreen"  is 
  4658.           loaded,  prepared  for  use, and  displayed  on  the  screen.  
  4659.           Because  we  set  D_DelayScreen to TRUE, the  screen  is  not 
  4660.           displayed.
  4661.            
  4662.           Next  we  see that a loop is performed to loop  through  nine 
  4663.           screen fields changing the color assignments of the fields to 
  4664.           the user defined color codes for each of the field modes.
  4665.       
  4666.           Notice   also   that  the  program  segment  above   is   not 
  4667.           programmatically  testing  the result field to see if  it  is 
  4668.           zero.  Actually the value returned is used for debugging  the 
  4669.           program. The finished application should work correctly.
  4670.       
  4671.           After  the  loop is finished and the field colors  have  been 
  4672.           redefined, the new screen is displayed on the video by a call 
  4673.           to S_RefreshScreen. 
  4674.       
  4675.           Parameters:
  4676.                  None.
  4677.       
  4678.       
  4679.       
  4680.       
  4681.       
  4682.       
  4683.       
  4684.       
  4685.       
  4686.       
  4687.                                    Page 60
  4688.       
  4689.       
  4690.       
  4691.           Making color changes permanent.
  4692.           -------------------------------------------------------------
  4693.           Procedure: S_StoreColorChanges
  4694.           Function:  Updates  the actual screen image and  the  screens 
  4695.                      field  definitions that are stored in the  current 
  4696.                      screen library file.
  4697.           Remarks:   Use  this  procedure after you  have  changed  the 
  4698.                      color attributes of the screen or its fields. This 
  4699.                      procedure makes changes permanent. 
  4700.        
  4701.           Defined C:
  4702.                  int S_RefreshScreen()
  4703.         
  4704.           Defined Pascal:
  4705.                  Procedure S_RefreshScreen;
  4706.       
  4707.           Example of Usage:
  4708.           Pascal                            C
  4709.           --------------------------------  ----------------------------
  4710.           .                                 .
  4711.           .                                 .
  4712.           Var Result : Integer;             int Result; 
  4713.           .                                 .
  4714.           .                                 .
  4715.           Procedure Customize_YourScreen;   void Customize_YourScreen()
  4716.           Begin                             {
  4717.           S_DelayScreen := True;            S_DelayScreen := 1;    
  4718.           S_LoadScreen('YourScreen');       S_LoadScreen("YourScreen");  
  4719.           For X := 1 to 9 do                for (x=0;x<9;x++)
  4720.              Begin                             {
  4721.              Result:=S_ChangeFieldColor(       Result=S_ChangefieldColor(
  4722.                        X,0,                             X,0,
  4723.                        UserNormalBg,                    UserNormalBg,
  4724.                        UserNormalFg);                   UserNormalBg);
  4725.              Result:=S_ChangeFieldColor(       Result=S_ChangefieldColor(
  4726.                        X,1,                             X,1,
  4727.                        UserPromptBg,                    UserPromptBg,
  4728.                        UserPromptFg);                   UserPromptBg);
  4729.              Result:=S_ChangeFieldColor(       Result=S_ChangefieldColor(
  4730.                        X,2,                             X,2,
  4731.                        UserDisplayBg,                   UserDisplayBg,
  4732.                        UserDisplayFg);                  UserDisplayBg);
  4733.              End;                              }
  4734.           S_StoreColorChanges;              S_StoreColorChanges();
  4735.           S_RefreshScreen;                  S_RefreshScreen(); 
  4736.           .                                 .
  4737.           .                                 . 
  4738.           --------------------------------  ------------------------------
  4739.           In  the  code segment above we see that  when  the  procedure 
  4740.           "Customize_YourScreen" is called, the screen "YourScreen"  is 
  4741.           loaded,  prepared  for  use, and  displayed  on  the  screen.  
  4742.           Because  we  set  S_DelayScreen to TRUE, the  screen  is  not 
  4743.           displayed.
  4744.            
  4745.           Next  we  see that a loop is performed to loop  through  nine 
  4746.           screen fields changing the color assignments of the fields to 
  4747.           the user defined color codes for each of the field modes.
  4748.       
  4749.       
  4750.       
  4751.       
  4752.       
  4753.                                    Page 61
  4754.       
  4755.       
  4756.       
  4757.           Notice   also   that  the  program  segment  above   is   not 
  4758.           programmatically  testing  the result field to see if  it  is 
  4759.           zero.  Actually the value returned is used for debugging  the 
  4760.           program. The finished application should work correctly.
  4761.       
  4762.           After  the loop has changed the field colors, the screen  and 
  4763.           screen  fields  are rewritten to the screen file  making  the 
  4764.           changes permanent. 
  4765.       
  4766.           The screen is then displayed.
  4767.       
  4768.           Parameters:
  4769.                  None.
  4770.       
  4771.       
  4772.       
  4773.       
  4774.       
  4775.       
  4776.       
  4777.       
  4778.       
  4779.       
  4780.       
  4781.       *