








                            A Financial Dynamics Product
                                 
                            Version 3.0

                            May, 1989





















                                                                    
                       
                       Copyright May 1989 by Financial Dynamics, Inc.
                       All Rights Reserved.  No part of this manual may be
                       copied without express consent of Financial Dynamics.


                          Table of Contents  




ABORTNOFIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7
ADDING(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8
ADDMON(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9
ADDYEARS(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  10
ADD_REC() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  11
AMPM(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
ASUM(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  13
BACKDROP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  14
BCKUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  16
BOTT(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  17
BOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  18
BOXX(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  19
BROWSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  20
BROWSEHELP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27
CHANGED_KEY() . . . . . . . . . . . . . . . . . . . . . . . . . . . .  28
CHK_DELE(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  29
CLOSEIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
COLORS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
CO_CHG(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  33
CO_EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  34
CO_LOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  35
CO_PARSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  36
CO_POP(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  37
CO_PUSH() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  38
CO_SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  39
CO_STRIP(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  40
CSCRUNCH(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  41
CURSOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  42
CURSORKEY() . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
CURS_OFF(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  44
CURS_ON() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
DA(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  46
DAYPLUG() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  47
DEFAULT() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  48
DEFINED() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  49
DIMMER(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  50
DIV() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51
DOTS(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  52
DOWN_ONE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  53
DRAWSHADOW(). . . . . . . . . . . . . . . . . . . . . . . . . . . . .  54
EDITING() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  55
ESC() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56


                           Table of Contents  




ESCBREAK(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
FIL_LOCK(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  58
FRAMEBOX(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  59
FULL_SCR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  60
GET_KEY() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  61
GLOBAL_REPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
HCSAVE(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  63
HCSETUP() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  64
HC_HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  65
ISLAST(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  66
KBHIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  67
LAZ() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  68
LDATE() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  69
LDOM(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  70
LEAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  71
LIST_EM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  72
LOOKUP(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
MAKE_NTX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  74
MEMOKEYS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  75
MENUFIX() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  76
MU_ADD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  77
ODD() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  78
OFF() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79
OPENIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  80
OPEN_FILE() . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  81
PACK_INDEX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  82
PICKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  83
PRINTIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  84
PROLOGUE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  85
PR_STR(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  88
REC_LOCK(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  89
REVERSE() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  90
REV_LINE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  91
SCOUNT(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  92
SCREENGRAB(). . . . . . . . . . . . . . . . . . . . . . . . . . . . .  93
SCRTITLE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  94
SCRUNCH() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  95
SEEDBACK. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  96


                           Table of Contents  



SEEDNEXT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  97
SEEKHELP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  98
SETUP_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  99
SETUP_GETS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
SET_BROWSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
SOFTSEEK(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
STATION() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
STDCOLOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
STD_A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
STD_B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
STD_D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
STD_DEFINE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
STD_E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
STD_F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
STD_INIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
STD_N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
STD_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
STD_REPL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
STD_V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
STUFF_IT(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
SUB_MENU_CLEAN. . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
TOP() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
TOPSCREEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
ULINE() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
UNIQUE(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
UP_ONE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
V_FILE(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
V_SUBS(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
WAIT_OFF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
WAIT_ON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
WINDOW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
WINDOWHELP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
YES_NO(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
ZERO(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130



ABORTNOFIND

SYNTAX
DO abortnofind WITH [expC1]

PARAMETERS
expC1 - Filename to find

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To quit a system if a file is not found.

NOTES
Used in Std_Set.Prg to test that required databases are there to start
systems.



ADDING()

SYNTAX
ADDING()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if a user is in the add mode in fdi89 lib.

RETURNS
.T. if adding, .F. if not adding



ADDMON()

SYNTAX
ADDMON(expD1,expN1)

PARAMETERS
expD1  - Date to add to
expN1  - Number of months to add

TYPE / SOURCE / LANGUAGE
Function / Special.Prg / Clipper

PURPOSE
To add or subtract months to a date

RETURNS
Date

NOTES
Accurately takes care of 28,29,30 and 31 day month changes.
January 31 + 1 month  = February 28.
February 28 + 1 month = March 28
To subtract months make expN1 a negative number.



ADDYEARS()

SYNTAX
ADDYEARS(expD1,expN1)

PARAMETERS
expD1  - Date to add to
expN1  - Number of years to add

TYPE / SOURCE / LANGUAGE
Function / Special.Prg / Clipper

PURPOSE
To add or subtract years to a date

RETURNS
Date

NOTES
To subtract years make expN1 a negative number.


ADD_REC()

SYNTAX
ADD_REC(expN1)

PARAMETERS
expN1  - Number of seconds to try , will try every 1/2 second
       - Default = 0, or try forever

TYPE / SOURCE / LANGUAGE
Function / Std_keys.Prg / Clipper

PURPOSE
To append blank records

RETURNS
.T. if appended succesfully, .F. if not appended succesfully

NOTES
Uses NETERR() to check if record appended. If EXCLUSIVE is OFF, record is
automatically locked during append by Clipper.


AMPM()

SYNTAX
AMPM(expC1)

PARAMETERS
expC1  - Time to translate, in format [HH:MM:SS] or [HH:MM]

TYPE / SOURCE / LANGUAGE
Function / Std_prc.Prg / Clipper

PURPOSE
To convert military time to civilian time with am or pm following

RETURNS
HH:MM am       or        HH:MM pm

NOTES
See notes on Clipper's Extend library in chapter 1.


ASUM()

SYNTAX
ASUM(expA1,expN1,expN2)

PARAMETERS
expA1  - Array to process
expN1  - Element to start summing from
       - Default = 1
expN2  - Element to stop summing at
       - Default = LEN(expA1)

TYPE / SOURCE / LANGUAGE
Function / Special.Prg / Clipper

PURPOSE
To sum all elements in an array

RETURNS
Numeric value equal to sum of array elements

NOTES
Array elements to be summed must be defined and be numeric.


BACKDROP

SYNTAX
DO backdrop

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To display a backdrop for all screens

NOTES
The first time backdrop is called a backdrop is constructed and saved to
a public variable called backdrop. From that point on the backdrop is
restored from memory.

By default the backdrop is a screen full of CHR(178)

If the file CLEAR.OK exists in the application directory the backdrop
will be a clear screen.

If the file BRICK.OK exists in the application directory, and the
monitor is a color monitor,  the backdrop will be a brick wall.

Since backdrop is saved as a memory variable, roughly 4K is lost in the
free pool to the backdrop.


BCKUP

SYNTAX
DO bckup

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Special.Prg / Clipper

PURPOSE
To RUN DOS backup

NOTES
A last ditch backup effort, given Clipper's propensity to have trouble
with RUN commands. Since most of our programming is for networks, and
they are backed up by tape, this rarely runs in our systems.


BOTT()

SYNTAX
BOTT()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_prc.Prg / Clipper

PURPOSE
To go to the bottom of a file, or grouping of data

RETURNS
[]

NOTES
If the variables group and group_key are defined, will go to the last
record
of a grouping in the primary key, otherwise executes GO BOTT.

If a grouping is desired:
   group     = value of primary grouping
   group_key = key expression of selected index order as a literal

For example, I want to see all and only cash transactions in a window
appearing over the chart of accounts master. With the record pointer on
the cash (1000) account :
   group     = chart->acct     && value of group
   group_key = [acct]          && name of field in transact.dbf


BOX

SYNTAX
DO box WITH expN1,expN2,expN3,expN4,expC1

PARAMETERS
expN1 - Upper row
expN2 - Left column
expN3 - Number of menu choices needed
expN4 - Width of box
      - Default = 40
expC1 - Title to center within top of box

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To display a box on the screen as follows:

              ͸
                             Main Menu                
              ͵
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
              ;

NOTES

Used in all full screen menus. Automatically draws shadow.





BOXX()

SYNTAX
BOXX(expN1,expN2,expC1,expC2,expC3,expC4,expC5)

PARAMETERS
expN1  - Upper Row
expN2  - Left Column
expC1  - First row of text
expC2  - Second row of text    - Optional
expC3  - Third row of text     - Optional
expC4  - Fourth row of text    - Optional
expC5  - Fifth row of text     - Optional


TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To display text with a box surrounding it

RETURNS
[]

NOTES
Automatically shadows box.


BROWSE

SYNTAX
DO browse WITH expN1,expN2,expN3,expN4,expL1

PARAMETERS
   expN1 - Upper Row         - Optional
         - Default  = 6

   expN2 - Left Column       - Optional
         - Default  = calculated to center browse window on              
        screen

   expN3 - Lower Row         - Optional
         - Default  = 23

   expN4 - Right Column      - Optional
         - Default  = calculated to center browse window on              
        screen

   expL1 - Create new screen - Optional
           - Default  = .T.  (.F. allows browse windows to layer         
            over existing screen)

TYPE / SOURCE / LANGUAGE
   Procedure / Browse.Prg / Clipper

PURPOSE
   The central program to the FDI89 library. The engine to all our data
   maintenance routines.

NOTES
   The browse program, in order to maintain flexibility, has numerous
   memory variables defined in both browse and in the calling application
   program. Please see the Rolodisk examples. Remember that almost all the
   variables have default values, so that a complete browse routine may be
   written in as few as 12 lines of code.

   Memory variables:

   Variables defined in the calling program, generally called  
   XX_maint.prg. These variables must be declared PRIVATE in the  xx_maint
   program if layered callsto browse are to be made. These are discussed
   in more detail following this list.

 Name           O/R          Default            Use
 ------------   ---          ------------       -----------------------------
 module          R           None               2 letter code, unique to this maintenance routine
 wtitle          R           None               title at top of field listing
 wfields         R           None               fields to list - Must be able to macro
 key_field       R           None               primary key expression
 full_screen     O           .F.                .T. if there is a full screen mode
 mreplace        O           .F.                .T. if there is a custom field replace procedure
 meminit         O           .F.                .T. if there is a custom memory initialization procedure
 proc_keys       O           []                 the custom procedure list
 mtitle          O           []                 title at top of browse window
 scrmenu         O           []                 menu choices to add or delete from full screen menu
 browmenu        O           []                 menu choices to add or delete from browse menu
 allow_browse    O           .T.                allow the user to browse through the data
 mprompt         O           [F1] for Help...   message that appears while user is browsing
 scr_prompt      O           Fill in fields...  message that appears while user is in READ
 find_prompt     O           [key]              The value will be included in the prompt in standard find
 find_field      O           INDEXKEY(0)        The field will seed the length of the GET in standard find

 module:          This code is necessary and used by the library to decide
                  what procedures to run, and by help to branch to correct
                  case statements. Our naming convention calls for the code
                  to match the XX in XX_maint.prg.

 wtitle:          This is the literal that appears above the data listing
                  in the browse window.
               eg: [CodeDescription]

 wfields:         This is the literal that wll be macroed in order to
                  display data. Since a macro will be used all data must
                  be converted to character type.
               eg: [code + '  ' + desc]
               or: [code + '  ' + desc + '  ' + STR(rate,4,1) + '  ' +  DTOC(date)]

 key_field:       The literal expression of the selected key expression.
                  Used to decide if data must be relisted after an edit.
                  Also used to calculate LEN(&key_field) for the GET in the
                  standard find routine.

 full_screen:     Instead of panning across data, we use the technique of
                  automatically switching to a full screen view of the
                  record. If this variable is set to .T., the library knows
                  that there will be a procedure called module+[_frame],
                  or in our example, xx_frame. This procedure is in the
                  application xx_maint.prg source code.

 mreplace:        Mreplace is redefined by the library into the name of the
                  procedure to run to replace memory variables into fields
                  after adding or editing. If .F., mreplace becomes
                  std_repl, a library procedure. If .T., mreplace becomes
                  module+[_repl],  or in our example, xx_repl. Xx_repl is
                  in the application xx_maint.prg source code. In all cases
                  data is replaced from memory variables with the same
                  names as the fields, but the memory variables are
                  prefaced with the  M-> alias in order to be distinguished
                  as memory variables.

             A recent upgrade to the library makes the definition of this
             variable unecessary. If the module xx_repl exists in the
             application xx_maint file, the library will automatically use
             it.


 meminit:         Meminit is redfined by the library into the name of the
                  procedure to run to initialize memory variables from
                  fields before adding or editing. If .F., meminit becomes
                  std_init, a library procedure. If .T., meminit becomes
                  module+[_init],  or in our example, xx_init. Xx_init is
                  in the application xx_maint.prg source code. In all cases
                  data is initialized into memory variables with the same
                  names as the fields, but the memory variables are
                  prefaced with the  M-> alias in order to be distinguished
                  as memory variables.

             A recent upgrade to the library makes the definition of this
             variable unecessary. If the module xx_init exists in the
             application xx_maint file, the library will automatically use
             it.


 proc_keys:       In order to tell the library to run a custom procedure,
                  the first letter of the custom procedure is included in
                  the definition of proc_keys. There are standard
                  procedures for all the following:

                          std_a ... add
                          std_b ... back   (only in full screen)
                          std_d ... delete
                          std_e ... edit
                          std_f ... find
                          std_n ... next   (only in full screen)
                          std_p ... print
                          std_v ... view   toggles back and forth,       
                               browse and full screen

             In order to add non-standard choices, or to not call the
             standards a proc_key and the related procedure are  defined.

                  eg:  In order to have non-standard delete, and custom
                       procedure for transactions to work: 
                  proc_keys = [DT] 

                  This tells the library to run module+[_d] instead of
                  std_d, and to allow the running of a procedure called
                  module+[_t]. In our example, the procedures xx_d and xx_t
                  would exist in the application source code xx_maint.prg.

 mtitle:          The literal that will be centeresd and appear at the top
                  of the browse and full screen windows.

 scrmenu:         A simple way to add or delete options from the full
                  screen menu. The default full screen menu is:

                  Edit  Add  Delete  Find  Print  Next  Back  View  Quit

             eg:  In order to add or delete options initialize scrmenu as
                  follows:

                      scrmenu = [-Delete-Print+Transactions+Memo]

                  This will subtract the options delete and print, and add
                  options transactions and memo.

             Fourteen menu options are allowed. Custom options always
             precede the Quit option. This routine is case sensitive.
             Please make first letter upper case, following letters lower
             case.

             Turning off or adding a menu option does not stop processing
             of a procedure. To kill the delete procedure, a [D] must be
             added to the proc_keys variable, and no xx_d procedure should
             be written.


 browmenu:   All the notes from scrmenu apply except that this variable
             modifies the default menu appearing when the user presses the
             / key from the browse mode.

 allow_browse:    Used in the rare case when the user should be brought
                  directly to the full screen mode and not allowed to
                  browse through the data.

 mprompt:         The default literal appearing on the bottom of the browse
                  screen. The full text is: [F1] for Help, / for Menu

 scr_prompt:      The default literal appearing on the bottom of the screen
                  during all READ routines. The full text is: Fill in
                  fields, [PgDn] when finished

 find_prompt:     The literal that will appear in the prompt that asks the
                  user what vallue to find.
               [Enter ]  find_prompt [ to find: ]

 find_field: The literal that contains the name of the field to find, so
             that the GET in the find routine is the correct length.



Variables defined in the browse program are all declared PRIVATE. They are
discussed in more detail following this list.

 Name           Use
 ------------   -----------------------------
 mscreen       screen to save

 firstrow      starting row

 mquit         logical quit / not quit

 mloop         logical loop / not loop

 keypress      ASCII of key pressed

 mchoice       character menu choice ... Browse mode

 fchoice       character menu choice ... Full screen mode

 lastrow       last row displayed in browse

 cur_row       current row of cursor

 fieldname     used to hold field names in initializing memvars

 browse        used to know which mode we're in

 last_col      last column in wfields expansion - used by           
             changed_key()

 white         status of prompt

 mscreen:      the screen is saved before toggling into full screen
             from browse mode.

 firstrow:        the first row data will list on in the browse window.
                  calculated as a result of the top_row parameter or
                  calculation.

 mquit:           browse is a two loop structure. The outer loop lists data
                  and the inner loop processes keystrokes. The outer loop
                  condition is set while ! mquit.

 mloop:           the inner loop is set while mloop.

 keypress:        contains the ASCII value of the last key pressed while
                  in browse mode.

 mchoice:         the MENU TO variable resulting from the browse menu

 fchoice:         the MENU TO variable resulting from the full screen menu.

 lastrow:         the last row on which data is allowed to be displayed in
                  a browse window.

 cur_row:         the current row in the browse window, often used by VALID
                  routines and multi-user data checks.

 fieldname:       a memory variable that simply acts a depository for
                  fieldnames so they can be macroed during init and replace
                  loops.

 browse:          a logical variable that is .T. while in browse mode, .F.
                  while in full screen mode.

 last_col:        the calculated last column of the macroed wfields
                  expression. Used by changed_key() to test data in
                  multi-user mode.

 white:           a logical variable use to decide whether data is
                  currently being displayed in reverse video or not.



BROWSEHELP

SYNTAX
DO browsehelp

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Hc_help.Prg / Clipper

PURPOSE
To display a help screen for the browse windows.

NOTES
Hc_help is a hardcoded text display procedure that accepts as a
parameter the name of the procedure containing the text to display.


CHANGED_KEY()

SYNTAX
CHANGED_KEY()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
Compares data on screen with database. Used to check for multi-user
changes in data while scrolling though data in browse mode.

RETURNS
.T. if data on screen does not match database, .F. if data on screen
matches database.

NOTES
Although CHANGED_KEY() is written in Clipper, it uses a routine written in
"C" called SCREENGRAB().




CHK_DELE()

SYNTAX
CHK_DELE(expC1,expC2,expC3,expN1)

PARAMETERS
expC1  -     The name of the field or key expression in the source database
expC2  -     The name of the target alias
expC3  -     The name of the field or key expression in the target alias
expN1  -     The number of the order to set in the target database
       -     Default = 0

TYPE / SOURCE / LANGUAGE
Function / Global.Prg / Clipper

PURPOSE
To test data in target databases before a user is allowed to delete a
record.

RETURNS
.T. if data found in target database, .F. if data not found in target
database

NOTES
Invoked from custom delete procedure in XX_maint.prg. For example, assume
the customer maintenance is not allowed to have a customer deleted who has
an order in the orders database. Order is opened with customer as the
second index.

In the customer maintenance file, CU_MAINT.PRG:

PROC cu_d
  IF ! CHK_DELE([custnum],[orders],[custnum],2)
    DO std_d
  ELSE
    DO kbhit WITH [Related data in other databases. Cannot delete.]
  ENDIF
RETU



CLOSEIT

SYNTAX
DO closeit

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To reset device and console at the end of reports.

NOTES
The public variable mdevice always carries the value of the current
output device as [P],[F], or [S]. CLOSEIT updates this variable.


COLORS

SYNTAX
DO colors

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Colors.Prg / Clipper

PURPOSE
To invoke a subsystem that allows developers or users to define the colors
in their application.

NOTES

This code was adapted with very little modification from a routine
written by Scott Hurlbert and Art Salinas of Quantum Data Systems.

Colors are maintained according to a hierarchy of videotype, groups,
attributes, and components.

There are 4 videotypes: VGA,EGA,CGA,MONO

There are 11 groups:  BACKDROP
                      MENUS
                      STATUS LINE
                      BROWSE
                      FULL SCREEN
                      WINDOW/PICK
                      HELP SCREEN
                      POP-UP 1
                      POP-UP 2
                      POP-UP 3
                      ERRORS

There are 4 attributes:  SAY/GET
                         FRAME
                         TEXT
                         TITLE

There are 6 components:  SAY              - Foreground/Background
                         GET              - Foreground/Background
                         UNSELECTED GET   - Foreground/Background

Components may be selected from the Colors.Prg program, and are set
automatically when a videotype/group/attribute is chosen. Therefore there
are 44 color settings available (11 groups * 4 attributes) within a
videotype.


Colors are stored to disk in the database Stdcolor.Dbf. This database has
the structure:

                 Field  Field name  Type       Width
                 -----  ----------  ----       -----
                   1  VIDEOTYPE   Character     10
                   2  CO_GROUP    Character      2
                   3  CO_SAYGET   Character     12
                   4  CO_FRAME    Character     12
                   5  CO_TEXT     Character     12
                   6  CO_TITLE    Character     12
               ** Total **                      61

It is indexed on videotype and group. Groups are numbered 01-11. For any
videotype/group, the attributes are kept in the appropriate field in the
format: 150300070007 . These color numbers are set by the Colors.Prg
program.

The colors are held in four arrays, COLOR1[11]..COLOR4[11], which are
declared in the library.

A number of public variables, initialized in prologue and std_set, are
used:

       curr_grp,;          && current color group
       curr_attr,;         && current color attribute
       videotype,;         && variable to hold selected video mode
       co_stack,;          && used by color push and pop routines
       c_frame,;      1    && Constant to select frame color attribute
       c_text,;       2    && Constant to select text color attribute
       c_sayget,;     3    && Constant to select get color attribute
       c_title,;      4    && Constant to select title color attribute
       c_backdrop,;   1    && Constant to select backdrop color group
       c_menus,;      2    && Constant to select menu color group
       c_status,;     3    && Constant to select status color group
       c_browse,;     4    && Constant to select browse screen color group
       c_fullscr,;    5    && Constant to select full screen color group
       c_window,;     6    && Constant to select window/pick screen color group
       c_help,;       7    && Constant to select help window color group
       c_pop1,;       8    && Constant to select pop-up window #1 color group
       c_pop2,;       9    && Constant to select pop-up window #2 color group
       c_pop3,;       10   && Constant to select pop-up window #3 color group
       c_error,;      11   && Constant to select error message color

This option may be offered from the chores menu, or added to an external
exe in order to save memory in your application.


CO_CHG()

SYNTAX
CO_CHG(expN1,expN2,expN3)

PARAMETERS
expN1 - group
      - see constant listing in documentation for COLORS procedure
      - If 0 is sent, colors set to black

expN2 - attribute
      - Default = 1

expN3 - component
      - Default = 1

TYPE / SOURCE / LANGUAGE
Function / Co_procs.Prg / Clipper

PURPOSE
To change screen colors.

RETURNS
.T.

NOTES
In addtion to setting colors, co_chg updates the curr_grp and curr_attr
public variables.


CO_EDIT

SYNTAX
DO co_edit

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Colors.Prg / Clipper

PURPOSE
To allow editing of colors from within colors.prg.

NOTES
An internal FDI89 routine. Never called by an application.


CO_LOAD

SYNTAX
DO co_load WITH expC1

PARAMETERS
expC1 - videotype (VGA, EGA, CGA, MONO)

TYPE / SOURCE / LANGUAGE
Procedure / Co_procs.Prg / Clipper

PURPOSE
To load the arrays color1 .. color4 with the colors stored in the
database STDCOLOR.DBF.

NOTES
An internal FDI89 routine. Rarely if ever called by an application.
Called internally by Std_Set.Prg.


CO_PARSE

SYNTAX
CO_PARSE(expC1)

PARAMETERS
expC1 - database and fieldname containg color settings

TYPE / SOURCE / LANGUAGE
Function / Co_procs.Prg / Clipper

PURPOSE
To translate color settigs from database into Clipper style SET COLOR
syntax.

RETURNS
String appropriate for Clipper style SET COLOR command.

NOTES
An internal FDI89 routine. Never called by an application.


CO_POP()

SYNTAX
CO_POP()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Co_procs.Prg / Clipper

PURPOSE
To restore color settings from a memory variable called co_stack

RETURNS
.T., sets colors to last colors on co_stack

NOTES
Must be matched with a previous CO_PUSH()



CO_PUSH()

SYNTAX
CO_PUSH()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Co_procs.Prg / Clipper

PURPOSE
To save current color settings onto a memory variable called co_stack

RETURNS
.T., saves colors to co_stack

NOTES
Must be matched with a subsequent CO_POP()


CO_SAVE

SYNTAX
DO co_save

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Colors.Prg / Clipper

PURPOSE
To save colors[1] ...colors[4] array values into STDCOLOR.DBF database

NOTES
An internal FDI89 routine. Never called by an application.


CO_STRIP()

SYNTAX
CO_STRIP(expC1)

PARAMETERS
expC1 - Always an array element containg colo settings

TYPE / SOURCE / LANGUAGE
Function / Colors.Prg / Clipper

PURPOSE
To translate colors[1] ...colors[4] intos values acceptable in STDCOLOR.DBF
database

RETURS
String acceptable in STDCOLOR.DBF database

NOTES
An internal FDI89 routine. Never called by an application.



CSCRUNCH()

SYNTAX
CSCRUNCH(expC1)

PARAMETERS
expC1 - saved portion of screen

TYPE / SOURCE / LANGUAGE
Function / Std_Keys.Prg / Clipper

PURPOSE
Used in SCREENGRAB() to test screen valeus against database.

RETURNS
Literal contained in screen without screen attributes

NOTES
Used in SCREENGRAB() to test screen valeus against database.


CURSOR

SYNTAX
DO cursor

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To process cursor keys in browse, window, and picks programs in FDI89
library.

NOTES
Processes following keys:

       Key       Scan     Result
       --------- ----- --------------------------
       Up .......  5 .... One record up
       Down ..... 24 .... One record down
       Space .... 32 .... One record down
       Home .....  1 .... First record on screen
       End ......  6 .... Last record on screen
       PgUp ..... 18 .... One page up
       PgDn .....  3 .... One page down
       Ctrl Home. 29 .... Top of file
       Ctrl End . 23 .... Bottom of file

An internal FDI89 routine. Never called by an application.


CURSORKEY()

SYNTAX
CURSORKEY(expN1)

PARAMETERS
expN1 - Scan code of last key pressed
      - Default = LASTKEY()

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if the last key pressed was a cursor key.

RETURNS
.T. if last key pressed was a cursor key., otherwise .F.

NOTES

Cursor keys tested for are:

        Key        Scan
        ---------  ----
        Up ........  5
        Down ...... 24
        Left ...... 19
        Right .....  4
        End .......  6
        Home ......  1
        PgUp ...... 18
        PgDn ......  3
        Ctrl Home.. 29
        Ctrl End .. 23
        Ctrl PgUp.. 31
        Ctrl PgDn.. 30
        Ctrl Left.. 26
        Ctrl Right.  2



CURS_OFF()

SYNTAX
CURS_OFF()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To turn off cursor and keep public variable, cursoron, updated.

RETURNS
[]

NOTES
Cursoron is a logical public variable initialized in Prologue.Prg that
always contains the state of the cursor.


CURS_ON()

SYNTAX
CURS_ON()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To turn on cursor and keep public variable, cursoron, updated.

RETURNS
[]

NOTES
Cursoron is a logical public variable initialized in Prologue.Prg that
always contains the state of the cursor.


DA()

SYNTAX
DA(expC1,expL1)

PARAMETERS
expC1 - The name of the array as a literal
expL1 - .T. to print, .F. to allow output to screen or printer
      - Default = .F.

TYPE / SOURCE / LANGUAGE
Function / Special.Prg / Clipper

PURPOSE
To allow the contents of an array to be printed to the screen or the
printer from the debugger expression mode.

RETURNS
[]

NOTES
DA() is set to picture all numeric data as 999,999,999.9999.


DAYPLUG()

SYNTAX
DAYPLUG(expD1,expN1)

PARAMETERS
expD1 - Date to plug into
expN1 - Day to plug into date
      - Default = 1

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To create a date for a particular day of the month.

RETURNS
Date

NOTES

DAYPLUG(CTOD([01/14/89]),6) = CTOD([01/06/89])



DEFAULT()

SYNTAX
DEFAULT(expC1,expX1)

PARAMETERS
expC1 - The name of a memory variable as a literal
expX1 - Any value: character, logical, numeric, date to set as a default
value

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To set a default value to a memory variable.

RETURNS
If the memory variable is not undefined, the value of the memory variable,
otherwise the default value.

NOTES
Usually used in order to set default values for unpassed paramenters.


DEFINED()

SYNTAX
DEFINED(expX1)

PARAMETERS
expC1 - Any type memory variable

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To check if a memory variable is defined

RETURNS
.T. if the memory variable is defined, otherwise .F.

NOTES
Exactly the same meaning as TYPE(expX1) <> [U]

DIMMER()

SYNTAX
DIMMER(expS1)

PARAMETERS
expS1 - A saved section of the screen

TYPE / SOURCE / LANGUAGE
Function / DIMIT.C / C

PURPOSE
To set any section of the screen to low intensity

RETURNS
Section of the screen rewritten in low intensity

NOTES
DIMMER() redefines the saved screen value, so to use by reference DIMMER()
must be called from a Clipper UDF.


DIV()

SYNTAX
DIV(expN1,expN2)

PARAMETERS
expN1 - Numerator
expN2 - Denominator

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To avoid divide by zero errors.

RETURNS
If expN1= 0 then 0 , otherwise expN1/expN2.



DOTS()

SYNTAX
DOTS(expC1,expN1)

PARAMETERS
expC1 - String to proceed dots
expN1 - Length of returned character string.

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To automatically follow a string with a number of dots.

RETURNS
String followed with a number of dots.

NOTES
Usually used in reporting, eg:

     @ PROW()+1,leftcol SAY DOTS([Total],22)


DOWN_ONE

SYNTAX
DO down_one

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To move the pointer down one record in all FDI89 scroll routines.

NOTES
An internal FDI89 routine. Never called by an application.

DRAWSHADOW()

SYNTAX
DRAWSHADOW(expN1,expN2,expN3,expN4)

PARAMETERS
expN1 - Upper row
expN2 - Left col
expN3 - Bottom row
expN4 - Right col

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To draw a shadow on the screen.

RETURNS
[]

NOTES
DRAWSHADOW() automatically offsets the shadow to:

                 expN1+1,expN2-1,expN3+1,expN4-1

Shadows are always black.


EDITING()

SYNTAX
EDITING()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if a user is in the add mode in fdi89 lib.

RETURNS
.T. if editing, .F. if not editing



ESC()

SYNTAX
ESC()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if the last key pressed was the escape key

RETURNS
.T. if LASTKEY() = 27, otherwise .F.

NOTES
Just a shorter and clearer syntax than LASTKEY() = 27



ESCBREAK()

SYNTAX
ESCBREAK()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if the last key pressed was the escape key, and clean up the
environment if escape was pressed.

RETURNS
.T.

NOTES
If escape is pressed three things occur:

           CLOSE DATA
        
         DO closeit    (If device is printer, device and console         
             are reset for screen)

           BREAK

             Very useful during reporting:

    DO WHILE ! EOF() .AND. ESCBREAK()

Also nice to gracefully exit READ statements:

    @ x,y GET mem
    READ
    ESCBREAK()

Assumes that the developer is using a logical BEGIN / END SEQUENCE
hiearchy in programming.


FIL_LOCK()

SYNTAX
FIL_LOCK(expN1)

PARAMETERS
expN1 - Number of seconds to try to lock file
      - Default = 0, forever

TYPE / SOURCE / LANGUAGE
Function / Std_Keys.Prg / Clipper

PURPOSE
To lock a file on a local area network.

RETURNS
.T. if file succesfully locked, otherwise .F.

NOTES

If no parameter is sent FIL_LOCK() will attempt to lock the file
until succesful.


FRAMEBOX()

SYNTAX
FRAMEBOX(expN1,expN2,expN3,expN4)

PARAMETERS
expN1 - Upper row
expN2 - Left col
expN3 - Bottom row
expN4 - Right col

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To draw a box on the screen and include a shadow.

NOTES
DRAWSHADOW() automatically offsets the shadow to:

                 expN1+1,expN2-1,expN3+1,expN4-1

Shadows are always black.

FULL_SCR

SYNTAX
DO full_scr

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Browse.Prg / Clipper

PURPOSE
The engine for full screen maintenance in all FDI89 browse routines.

NOTES
See the section on the BROWSE procedure.

Called by browse if the variable full_screen is sety to .T. in the
application program XX_maint.prg.

Assumes that there will be procedures called XX_frame and XX_gets in the
application program XX_maint.prg.

Automatically displays standard menu from the array scr_menu:

     scr_menu[1] = [Edit]
     scr_menu[2] = [Add]
     scr_menu[3] = [Delete]
     scr_menu[4] = [Find]
     scr_menu[5] = [Print]
     scr_menu[6] = [Next]
     scr_menu[7] = [Back]
     IF allow_browse
        scr_menu[8] = [View]
        scr_menu[9] = [Quit]
     ELSE
        scr_menu[8] = [Quit]
     ENDIF

The scr_menu array can be customized by intializing the memory variable
scrmenu in XX_maint. See the documentation for BROWSE.


GET_KEY()

SYNTAX
GET_KEY()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Browse.Prg / Clipper

PURPOSE
To get the next keystroke during FDI89 scrolling routines.

RETURNS
The character value of the keystroke pressed.

NOTES

An internal FDI89 routine. Never called by an application.

GET_KEY() does some preprocessing of key strokes :

        Enter (Scan 13) is changed to [E] for edit

        Delete (Scan 7) is changed to [D] for delete

        Slash (Scan 47) calls the browse menu to be displayed from the
        brow_menu array. See notes for BROWSE.PRG.




GLOBAL_REPL

SYNTAX
GLOBAL_REPL(expC1,expC2,expC3,expN1,expL1)

PARAMETERS
expC1  -     The name of the field or key expression in the source database
expC2  -     The name of the target alias
expC3  -     The name of the field or key expression in the target alias
expN1  -     The number of the order to set in the target database
       -     Default = 0
expL1  -     Whether to ask the user if the key value should be changed
       -     Default = .F.

TYPE / SOURCE / LANGUAGE
Function / Global.Prg / Clipper

PURPOSE
To replace data in related databases during replace procedures called from
FDI89 library.

RETURNS
.T. if the data in related databases was updated, otherwise .F.

NOTES
Invoked from custom replace procedure in XX_maint.prg. For example,
assume the customer maintenance is being edited since customer AAA has
bought customer BBB. All outstanding orders for customer BBB must be
updated to customer AAA.

In the customer maintenance file, CU_MAINT.PRG:

Before the DO browse statement :

mreplace = .T.


Somewhere in the file:

PROC cu_repl
  IF GLOBAL_REPL([custnum],[orders],[custnum],2)
     DO std_repl
  ENDIF
RETU


HCSAVE()

SYNTAX
HCSAVE()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Hc_help.Prg / Clipper

PURPOSE
To save a section of the screen that can be restored after displaying hard
coded help messages.

RETURNS
[]

NOTES
An internal FDI89 routine. Never called by an application.


HCSETUP()

SYNTAX
HCSETUP(expC1)

PARAMETERS
expC1 - Title for hard coded help screen

TYPE / SOURCE / LANGUAGE
Function / Hc_help.Prg / Clipper

PURPOSE
To display a box and title for hard coded help screen

RETURNS
[]

NOTES
An internal FDI89 routine. Never called by an application.


HC_HELP

SYNTAX
DO hc_help WITH expC1

PARAMETERS
expC1 - Name of procedure contaning help screen passed as a literal.

TYPE / SOURCE / LANGUAGE
Procedure / Hc_help.Prg / Clipper

PURPOSE
To display hard coded help screens for memoedit, browse and window
procedures.

NOTES
A call to HC_HELP must be included in the application help.prg file for
memoedit:

IF call_prg = [MEMOEDIT]
   DO hc_help WITH [memokeys]
   CO_POP()
   RETU
ENDIF



ISLAST()

SYNTAX
ISLAST(expD1)

PARAMETERS
expD1 - Date to check

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if a date is the last day of a month

RETURNS
.T. if date is last day of month, .F. if not last day of month
or date is empty



KBHIT

SYNTAX
DO kbhit WITH expC1

PARAMETERS
expC1 - Prompt to display on 24th line.
      - Default = [Anykey Continues...]

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To display a status message and wait for anykey to continue.

NOTES
Used for virtually every status message in our systems.


LAZ()

SYNTAX
LAZ(expN1,expN2)

PARAMETERS
expN1 - Any numeric expression
expN2 - Any numeric expression

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To find the minimum of two values above zero.

RETURNS
Minimum of two values above zero.


LDATE()

SYNTAX
LDATE(expD1)

PARAMETERS
expD1 - Any date value

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To translate a date into a letter format.

RETURNS
LDATE(CTOD([01/01/89])) = [January 1, 1989]



LDOM()

SYNTAX
LDOM(expD1)

PARAMETERS
expD1 - Any date value

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To find the last day of the month for any date.

RETURNS
Last day of the month for any date.

NOTES
Very useful when prompting for a date range in reporting. After
getting the first date value seed the second value with LDOM(date1).





LEAVE

SYNTAX
DO leave

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To quit a system.

NOTES
Stops escape key from backing all the way out to DOS.



LIST_EM

SYNTAX
DO list_em

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Browse / Clipper

PURPOSE
To list data by expanding &wfields in all FDI89 scrolling windows.

NOTES
An internal FDI89 procedure, never called by an application.


LOOKUP()

SYNTAX
LOOKUP(expC1,expX1,expL1)

PARAMETERS
expC1 -      The name of the alias to look in, as a literal.
expX1 -      The value to look for. Any data type.
expL1 -      If .T., Warn the user if not found, else do nothing.
      -      Default = .F.
expC2 -      Name of field in target database to display as a literal 
expN1 -   Row to display target description 
      -   Default = ROW()
expN2 -      Column to dispay target description
      -   Default = COL()+2

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To look up a value in another database., and to display a description from
a related database if requested.

RETURNS 
.T. if value found, otherwise .F.

NOTES
Very useful in VALID routines:

    @ x,y GET M->custnum PICT [9999] VALID LOOKUP([customer],M->custnum,.T.,[name])

Assumes expC1 is a selectable alias, and that the primary index is
appropriate for the seek of expX1.

ExpX1 may be any data type that matches the primary index in area expC1.

MAKE_NTX

SYNTAX
DO make_ntx WITH expC1,expC2,expC3

PARAMETERS
expC1 - Filename to index
expC2 - Index file to create
expC3 - Key expression of index file

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To create all permanent index files.

NOTES
Always called from a procedure with the same name as the database in the
application file PRC.PRG in all of our systems.

Do not add extensions to expC1 or expC2.

If the file expC2 does not exist the file will be created.

During development this allows reindexing by issueing DEL *.NTX from DOS.



MEMOKEYS

SYNTAX
DO memokeys

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Hc_Help.Prg / Clipper

PURPOSE
To display a help screen for memoedit routines.

NOTES
Called from the application help routine by the lines:

IF call_prg = [MEMOEDIT]
   DO hc_help WITH [memokeys]
ENDIF

Never called any other way.


MENUFIX()

SYNTAX
MENUFIX(expA1,expC1)

PARAMETERS
expA1 - The arrays scr_menu or brow_menu in the in BROWSE.PRG.
expC1 - The memory variables scrmenu or browmenu in BROWSE.PRG.

TYPE / SOURCE / LANGUAGE
Function / Browse.Prg / Clipper

PURPOSE
To modify the standard menus in browse and full screen.

NOTES
See the discussion in BROWSE.

An internal FDI89 routine, never called from the application.


MU_ADD

SYNTAX
DO mu_add

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To call the ADD_REC function and the replace procedure in a network
environment.

NOTES
Called from PROCEDURE STD_A in STD_KEYS.PRG.

Rarely called directly from the application.


ODD()

SYNTAX
ODD(expN1)

PARAMETERS
expN1 - Any numeric value

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To test if a value is an odd number

RETURNS
.T. if value is odd, otherwise .F.



OFF()

SYNTAX
LOOKUP()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To allow data subsets to be created and accessed by use of a primaryu key.

RETURNS
If group and group_key are defined:
  .T. if record pointer is off of the group setting, otherwise .F.

If group and group_key are not defined:
  .T. if at EOF() or at BOF()

NOTES
See discussion of group and group_key under BROWSE.

Used thoughout FDI89 library instead of EOF() and BOF() in order to allow
groupings to occur.

See TOP(), and BOTT()


OPENIT

SYNTAX
DO openit WITH expC1

PARAMETERS
expC1 - literal containg all or asubset of output devices: [PSF]

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To allow the user to choose the output device for a report.

NOTES
A menu will appear on line 24 with the appropriate choices
according to the parameter sent to OPENIT.

The memory variable mdevice is redefined as [P], [S] or [F].

See PRINTIT and CLOSEIT

If the user chooses a file they are prompted to enter a filename.



OPEN_FILE()

SYNTAX
OPEN_FILE(expC1,expC2,expC3,expC4,expC5,expC6)

PARAMETERS
expC1 - Name of database
expC2 - Index file to open - Optional
expC3 - Index file to open - Optional
expC4 - Index file to open - Optional
expC5 - Index file to open - Optional
expC6 - Index file to open - Optional

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To check that files open successfully in multi user mode.
To make sure that the same alias is not opened in multiple areas.

RETURNS
.T. if files opened successfully, .F. otherwise

NOTES
Usually used in the file opening procedures in the application program
PRC.PRG.



PACK_INDEX

SYNTAX
DO pack_index WITH expC1

PARAMETERS
expC1 - name of database to pack and reindex.

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To pack and reindex databases

NOTES
In multi user systems be sure to SET EXCLUSIVE ON in the utility
program that packs and reindexes, and to SET EXCLUSIVE OFF after
packing and reindexing.

PACK_INDEX will not run if SET EXCLUSIVE is OFF.

PACK_INDEX requires that there is a procedure that opens the databases and
all indices that is named the same as the database. See the example in
REINDEX.PRG and PRC.PRG in Rolodisk.


The memory variable mdevice is redefined as [P], [S] or [F].

See PRINTIT and CLOSEIT

If the user chooses a file they are prompted to enter a filename.




PICKS

SYNTAX
DO picks WITH expN1,expN2,expN3,expN4,expA1

PARAMETERS
expN1 -  Upper Row
expN2 -  Left Col
expN3 -  Lower Row
expN4 -  Right Col
expA1 -  Array to hold record numbers marked

TYPE / SOURCE / LANGUAGE
Procedure / Picks.Prg / Clipper

PURPOSE
To allow the user to choose a subset of records from a database

NOTES
A window is displayed as in a browse screen. The user may mark records with
the enter key, and press escape to leave the screen.

See example in Rolodisk.

Marked record numbers are kept in an array sent as a parameter from the
calling program.

Corner points (expN1 .. expN4) may be sent as 0,0,0,0 and FDI*( will
automatically center the window.

If the user picks as many records as the array is initialized to hold PICKS
warns the user.


PRINTIT

SYNTAX
DO printit WITH expC1

PARAMETERS
ExpC1 - Text to appear on 24th line.
      - Default = [Please set up printer. Any key to continue, Esc to
exit.]

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To set devices for printing.

NOTES
ISPRINTER() is used to check that the printer is on line.

ESCBREAK should be used to capture escape keys from PRINTIT.
The memory variable mdevice is redefined as [P], [S] or [F].

See OPENIT and CLOSEIT

Usually called in application programs by the lines:

     DO printit
     ESCBREAK()



PROLOGUE

SYNTAX
DO prologue

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Prologue.Prg / Clipper

PURPOSE
To set the environment for the FDI89 library.

NOTES
The following set commands are issued:

     SET BELL       OFF
     SET PRINT      OFF
     SET SCOREBOARD OFF
     SET EXACT      OFF
     SET CONFIRM    ON
     SET DELETED    ON
     SET WRAP       ON


The following PUBLIC variables are declared:

     stdbox ....... Constant for standard box characters
     single ....... Constant for single box characters
     double ....... Constant for double box characters
     myn .......... Constant for yes_no return value
     c_frame ...... Constant used to select frame color
     c_text ....... Constant used to select text color
     c_sayget ..... Constant used to select get color
     c_title ...... Constant used to select title color
     videotype .... variable to hold selected video mode
     c_backdrop ... Constant to select backdrop color group
     c_menus ...... Constant to select menu color group
     c_status ..... Constant to select status color group
     c_browse ..... Constant to select browse screen color group
     c_fullscr .... Constant to select full screen color group
     c_window ..... Constant to select window/pick screen color group
     c_help ....... Constant to select help window color group
     c_pop1 ....... Constant to select pop-up window #1 color group
     c_pop2 ....... Constant to select pop-up window #2 color group
     c_pop3 ....... Constant to select pop-up window #3 color group
     c_error ...... Constant to select error message color
     mdevice ...... Current Output device (S,P or F; Screen, Print or File)
     mquit ........ For returning to calling programs
     mdevice ...... The current output device (P,S or F)
     msta ......... User's Local Area Network station number
     myn .......... Value of last Yes/No question
     scr_prompt ... Prompt at bottom of full screen maintenance
     mprompt ...... Prompt at bottom of browse screen
     wait_box ..... Characters under blinking WAIT box at upper right
     curr_grp ..... Current color group
     curr_attr .... Current color attribute
     co_stack ..... Used by color poush and pop routines
     cursoron ..... Flag if cursor is on
     rpt_name ..... Name of report when saved to file or ascii file
     mhead_1 ...... First line of TOPSCREEN
     mhead_2 ...... Second line of TOPSCREEN
     mcomp_name ... Company name
     normal ....... Old color variables for pre1989 versions of FDI library
     intense ...... Old color variables for pre1989 versions of FDI library
     blink ........ Old color variables for pre1989 versions of FDI library
     reverse ...... Old color variables for pre1989 versions of FDI library
     blinkrev ..... Old color variables for pre1989 versions of FDI library
     gets ......... Old color variables for pre1989 versions of FDI library
     condense ..... Print variable
     bold ......... Print variable
     init ......... Print variable
     sideways ..... Print variable


The following variables are seeded:


     msta       = STATION()                     &&  Our Assembler Function
     mprompt    = '[F1] for Help, / for Menu'
     scr_prompt = 'Fill in fields, [PgDn] to save, [Esc] to abort.'
     mdevice    = [S]
     co_stack   = [011]
     curr_grp   = 1
     curr_attr  = 1
     single     = [Ŀ]
     double     = [ͻȺ]
     stdbox     = [͸Գ]
     c_sayget   = 1
     c_frame    = 2
     c_text     = 3
     c_title    = 4
     c_backdrop = 1
     c_menus    = 2
     c_status   = 3
     c_browse   = 4
     c_fullscr  = 5
     c_window   = 6
     c_help     = 7
     c_pop1     = 8
     c_pop2     = 9
     c_pop3     = 10
     c_error    = 11
     mdevice    = "S"
     rpt_name   = SPAC(1)
     vieotype   = IF(ISCOLOR(),[CGA],[MONO]) && further defined in STD_SET.PRG


PR_STR()

SYNTAX
PR_STR(expC1)

PARAMETERS
expC1 - Any printer code as a string

TYPE / SOURCE / LANGUAGE
Function / Std_Set.Prg / Clipper

PURPOSE
To accept printer codes in the Lotus 123 format.

RETURNS
If expC1 is in the format [\027\069], then CHR(15)+CHR(69), else
expC1 with no changes.



REC_LOCK()

SYNTAX
REC_LOCK(expN1)

PARAMETERS
expN1 - Number of seconds to try to lock record
      - Default = 0, forever

TYPE / SOURCE / LANGUAGE
Function / Std_Keys.Prg / Clipper

PURPOSE
To lock a record on a local area network.

RETURNS
.T. if record succesfully locked, otherwise .F.

NOTES

If no parameter is sent REC_LOCK() will attempt to lock the record
until succesful.


REVERSE()

SYNTAX
REVERSE(expS1)

PARAMETERS
expS1 - A saved section of the screen

TYPE / SOURCE / LANGUAGE
Function / Dimit.C / C

PURPOSE
To set any section of the screen to reverse colors

RETURNS
Section of the screen rewritten in reverse colors.

NOTES
REVERSE() redefines the saved screen value, so to use by reference
REVERSE() must be called from a Clipper UDF.


REV_LINE

SYNTAX
DO rev_line

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Browse.Prg / Clipper

PURPOSE
To reverse the line in FDI89 scroll routines.

NOTES
REV_LINE calls the C function REVERSE(), which does not work on some
machines - in particular Compaq's with Compaq video boards. To make it work
put a file called COMPAQ in the application directory. The videotype will
become COMPAQ and the system will perform slower, but cleanly.



SCOUNT()

SYNTAX
SCOUNT(expC1,expC2)

PARAMETERS
expC1 - Any character expression
expC2 - Any character expression

TYPE / SOURCE / LANGUAGE
Function / Special.Prg / Clipper

PURPOSE
To count the number of occurences of one string within another string.

RETURNS
The number of occurences of expC1 within expC2


SCREENGRAB()


SYNTAX
SCREENGRAB(expN1,expN2,expN3,expN4)

PARAMETERS
expN1 - Top row
expN2 - Left Col
expN3 - Bottom row
expN4 - Right Col

TYPE / SOURCE / LANGUAGE
Function / Special.Prg / Clipper

PURPOSE
To create a string from a portion of the screen

RETURNS
String that appears on screen with no attributes.

NOTES
Uses "C" routines unless there is a file called COMPAQ in the application
directory.



SCRTITLE

SYNTAX
DO scrtitle WITH expC1,expN1,expN2,expN3

PARAMETERS
expC1 - literal to SAY as the title.
expN1 - Row to SAY title on.
expN2,expN3 - Startand End Column to Center title between.


TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To display a title, centered, with the correct colors. 



SCRUNCH()

SYNTAX
SCRUNCH(expC1)

PARAMETERS
expC1 - saved portion of screen

TYPE / SOURCE / LANGUAGE
Function / Dimit.C / C

PURPOSE
Used in SCREENGRAB() to test screen values against database.

RETURNS
Literals contained within expC1 without screen attributes.

NOTES
Used in SCREENGRAB() to test screen valeus against database.



SEEDBACK

SYNTAX
Called by SET KEY statement in library

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Browse / Clipper

PURPOSE
To allow the up arrow to move the pointer to the previous record while in
a MENU TO wait state.


NOTES
An internal FDI89 procedure, never called by an application.

SEEDNEXT

SYNTAX
Called by SET KEY statement in library

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Browse / Clipper

PURPOSE
To allow the down arrow to move the pointer to the next record while in a
MENU TO wait state.


NOTES
An internal FDI89 procedure, never called by an application.


SEEKHELP

SYNTAX
DO seekhelp WITH expC1

PARAMETERS
expC1 - name of alias to seek in as a literal.

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To line up the target database prioir to displaying a help screen in the
application program help.prg. See Rolodisk as an example.



SETUP_FRAME

SYNTAX
DO setup_frame

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Set.Prg / Clipper

PURPOSE
To display the frame for hardware definition in std_define.

NOTES
An internal FDI89 procedure, never called by an application.


SETUP_GETS

SYNTAX
DO setup_gets WITH expC1

PARAMETERS
expC1 - Alias to diiplay from  ( M-> or ALIAS() )

TYPE / SOURCE / LANGUAGE
Procedure / Std_Set.Prg / Clipper

PURPOSE
To display the gets for hardware definition in std_define.

NOTES
An internal FDI89 procedure, never called by an application.


SET_BROWSE

SYNTAX
DO set_browse

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Browse / Clipper

PURPOSE
To calculate corner points and prepare for display of all ToolBox data
windows.


NOTES
An internal FDI89 procedure, never called by an application.


SOFTSEEK()

SYNTAX
SOFTSEEK(expC1)

PARAMETERS
expC1 - Any character value

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To create a string that will cause a SEEK with SOFTSEEK ON to move one
record past expC1. 

RETURNS
expC1 with the last character stripped off and replaced by the next
character in the ASCII chart.



STATION()

SYNTAX
STATION()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Station.Asm / Assembler

PURPOSE
To return the staion number on a NOVELL network.

RETURNS
The station number on a NOVELL Network, 0 otherwise.


STDCOLOR

SYNTAX
DO stdcolor

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Co_procs.Prg / Clipper

PURPOSE
To open and index (if newcessary) the stdcolor database.

NOTES
An internal FDI89 routine. Never called by an application.



STD_A

SYNTAX
DO std_a

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To allow data to be added to a database.

NOTES
This is the standard add routine used by the library. See the discussion
in BROWSE.

Generally called by the application from within a non-standard add in the
format:

   PROC xx_a
      IF <condition allowing add>
         DO std_a
      ELSE
         DO kbhit WITH [No data may be added to this database ...]
      ENDIF
   RETU



STD_B

SYNTAX
DO std_b

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To move the pointer to the previous record.

NOTES
This is the standard back routine used by the library. See the discussion
in BROWSE.

Generally not called by the application.



STD_D

SYNTAX
DO std_d

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To delete a record.

NOTES
This is the standard delete routine used by the library. See the discussion
in BROWSE.

Generally called by the application from within a non-standard add in the
format:

   PROC xx_d
      IF <condition allowing add>
         DO std_d
      ELSE
         DO kbhit WITH [No data may be deleted from this database ...]
      ENDIF
   RETU



STD_DEFINE

SYNTAX
DO std_define

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Set.Prg / Clipper

PURPOSE
To aloow the user to define the hardware environment and certain default
data.

NOTES
Generally called by the application from the chores or utility menu.


STD_E

SYNTAX
DO std_e

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To edit a record.

NOTES
This is the standard edit routine used by the library. See the discussion
in BROWSE.

Generally called by the application from within a non-standard add in the
format:

   PROC xx_e
      IF <condition allowing add>
         DO std_e
      ELSE
         DO kbhit WITH [No data may be edited in this database ...]
      ENDIF
   RETU



STD_F

SYNTAX
DO std_f

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To find a record.

NOTES
This is the standard find routine used by the library. See the discussion
in BROWSE.

Often replaced with a xx_f procedure that allows finds on different keys.
See Rolodisk as an example.


STD_INIT

SYNTAX
DO std_init WITH expC1

PARAMETERS
expC1 - A literal [A] or [E]  (Adding or Editing)     

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To initialize memory variables with the same name as the fields with the
M-> prefix.

NOTES
If [A] is sent as a parameter the system initializes data off the EOF()
record.

Often replaced with a xx_init procedure that allows calls std_init and then
redefines certain memvars.

PROC xx_init
   PARA add_edit
   DO std_init WITH add_edit
   IF ADDING()
      M->date = DATE()
   ENDIF
RETU


STD_N

SYNTAX
DO std_n

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To move the pointer to the next record.

NOTES
This is the standard next routine used by the library. See the discussion
in BROWSE.

Generally not called by the application.



STD_P

SYNTAX
DO std_p

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To print the data.

NOTES
If there is a full screen mode, only one record will print.

If there is no full screen mode, all data will list to the printer.


STD_REPL

SYNTAX
DO std_repl

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To replace memory variables into fields after an edit or an add.

NOTES

Often replaced with a xx_repl procedure that allows calls std_repl and then
does other steps.

PROC xx_repl
   DO std_repl
   SELE xyz
   REPL a WITH b
RETU


STD_V

SYNTAX
DO std_v

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To toggle from full screen to browse mode.

NOTES
Generally not called by the application


STUFF_IT()

SYNTAX
STUFF_IT(expX1,expC2)

PARAMETERS
expX1 - The name of a memory variable, or a value
expC2 - The name of a memory variable as a literal

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To seed a variable in a GET stack.

RETURNS
.T.       ( so that it cn be used in a VALID)

NOTES
Very useful when prompting for date ranges:

@ x,y       GET date1 VALID STUFFIT(LDOM(date1),@date2)
@ ROW()+2,y GET date2 

FUNC stuff_it   && used to stuff an input value into another variable during valid
   PARAM stuff_value, stuff_var
   stuff_var = stuff_value 
RETURN .T.



SUB_MENU_CLEAN

SYNTAX
DO sub_menu_clean

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To clean up screen while going from. 

   RESTORES SCREEN from variable called menuscreen
   CLOSE DATA          
   DO closeit    (Resets device to screen if the device was printer or   
                file)

NOTES
Always called from a sercond level menus in application programs.

* mai_menu.prg     maintenance menu
PRIVATE xchoice,menuloop
menuloop = .T.
DO WHIL menuloop
   BEGIN SEQUENCE                                                    && break construct
      CO_CHG(c_menus)                                                && fdi89 - co_procs
      @ 24,0                                                         
      DO box WITH 8,20,7,40,[Data Maintenance]                       && fdi89 - std_prc
      CO_CHG(curr_grp,c_sayget)                                      && fdi89 - co_procs
      @ 11,25 PROMPT [1. Rolodisk Data                ] MESSAGE [Maintain names and addresses]
      @ 12,25 PROMPT [2. Business Codes Data          ] MESSAGE [Maintain a lookup table of business codes]
      @ 13,25 PROMPT [3. Spreadsheet Data Maintenance ] MESSAGE [Use Clipper to emulate spreadsheet data entry]
      MENU TO xchoice
      DO CASE
         CASE xchoice = 1
            DO ro_maint                                              && ro_maint.prg
         CASE xchoice = 2
            DO co_maint                                              && co_maint.prg
         CASE xchoice = 3
            DO ss_maint                                              && ss_maint.prg
         OTHERWISE
            menuloop = .F.
            BREAK
     ENDCASE
  END SEQUENCE
  DO sub_menu_clean                                                  && fdi89 - std_prc
ENDDO
RETURN


TOP()

SYNTAX
TOP()

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Function / Std_prc.Prg / Clipper

PURPOSE
To go to the top of a file, or grouping of data

RETURNS
[]

NOTES
See notes on TOP(), BROWSE


TOPSCREEN

SYNTAX
DO topscreen

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To display a header on the top of the screen.

NOTES

Displays the variables mhead_1 and mhead_2 as the title.

Mhead_1 is set in STD_DEFINE and stored in SETUP.DBF.
Mhead_2 is set in MENU.PRG.

On NOVELL networks, the station number is displayed.


ULINE()

SYNTAX
ULINE()

PARAMETERS
expC1 - Literal to underline.

TYPE / SOURCE / LANGUAGE
Function / Std_prc.Prg / Clipper

PURPOSE
To underline data in a report.

RETURNS
[]

NOTES

ULINE([999,999])

if the picture is in a variable:

mpict = [@Z]
ULINE(TRAN(0,mpict))


UNIQUE()

SYNTAX
UNIQUE(expN1)

PARAMETERS
expN1 - Index order to set for unique check.

TYPE / SOURCE / LANGUAGE
Function / Std_prc.Prg / Clipper

PURPOSE
To check that a key value is unique.

RETURNS
.T. if key is unique
.F. if key is not unique

NOTES

Used from Clipper VALID.

Resets index to pre-function call status.



UP_ONE

SYNTAX
DO up_one

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Keys.Prg / Clipper

PURPOSE
To move the pointer up one record in all FDI89 scroll routines.

NOTES
An internal FDI89 routine. Never called by an application.
V_FILE()

SYNTAX
VFILE(expC1)

PARAMETERS
expC1 - Filename to check.

TYPE / SOURCE / LANGUAGE
Procedure / Special.Prg / Clipper

PURPOSE
To check that a file name is a legitimate DOS file name from a VALID.


V_SUBS()

SYNTAX
VSUBS(expC1,expC2)

PARAMETERS
expC1 - Input variable to check.
expC2 - Legitimate responses.

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To check that a GET variable is a legitimate choice, and to warn the user
of the correct choices if the variable is incorrect.



WAIT_OFF

SYNTAX
DO wait_off 

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To turn off a Lotus style blinking light in the upper right corner.

NOTES
The PUBLIC variable wait_box is used to store the characters under the box
so that wait_off can restore the correct characters.



WAIT_ON

SYNTAX
DO wait_on WITH expC1

PARAMETERS
expC1 - Message to appear on 24th line
      - Default = []

TYPE / SOURCE / LANGUAGE
Procedure / Std_Prc.Prg / Clipper

PURPOSE
To put a Lotus style blinking light in the upper right corner.

NOTES
The PUBLIC variable wait_box is used to store the characters under the box
so that wait_off can restore the correct characters.


WINDOW

SYNTAX
DO window WITH expN1,expN2,expN3,expN4

PARAMETERS  
expN1 -  Upper Row  
expN2 -  Left Col
expN3 -  Lower Row
expN4 -  Right Col
All parameters optional

TYPE / SOURCE / LANGUAGE
Procedure / Window.Prg / Clipper

PURPOSE
To allow the user to choose a record from a database.

NOTES
A window is displayed as in a browse screen. The user may leave window with
either ESCAPE or ENTER, in either case the pointer is lined up in the
target database.

See examples in Rolodisk.

Used extensively in help.prg for dynamic help in data base lookups.


WINDOWHELP

SYNTAX
DO windowhelp

PARAMETERS
None

TYPE / SOURCE / LANGUAGE
Procedure / Hc_help.Prg / Clipper

PURPOSE
To display a help screen for the lookup windows.

NOTES
Hc_help is a hardcoded text display procedure that accepts as a
parameter the name of the procedure containing the text to display.


YES_NO()

SYNTAX
YES_NO(expC1)

PARAMETERS
expC1 - Question to ask on 24th line.
      - Default = [Continue ?]

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To ask a yes/no question.

RETURNS
.T. if answer is yes
.F. if answer is no

NOTES
Used for every yes/no question.



ZERO()

SYNTAX
ZERO(expN1,expN2)

PARAMETERS
expN1 - Value to test
expN2 - Decimals to test  

TYPE / SOURCE / LANGUAGE
Function / Std_Prc.Prg / Clipper

PURPOSE
To determine if a value is truly zero and avoid C floating point errors.

RETURNS
.T. if value is zero
.F. if value is not zero

