OVERVIEW.............Functions Supported
LIBRARIES............A brief description of the dCLIP libraries
_dcbrow2_*().........Functions for calling browse-system sub-routines
_dcedit2_*().........Functions for calling edit-system sub-routines
dc_abigelem()........Return the element number of the longest string in an array
dc_abrowse().........Browse a multi-dimensional array or object
dc_achoice().........A moused replacement for ACHOICE()
dc_acompare()........Compare two arrays
dc_aconvert()........Convert a Ragged array to a Parallel array and vice-versa
dc_addcargo()........Add cargo to the GetList
dc_addrec()..........Append a Blank record or search for a Blank record and lock it
dc_aedit()...........Edit a multi-dimensional array or object
dc_afields().........Load an array with a list of parent and child fields
dc_alert()...........A "moused" replacement for Clipper's ALERT() function
dc_altshadow().......Define which side of boxes and menus to paint shadows
dc_andbits().........Logical AND of two integers
dc_append()..........Pop-up a user-prompt menu for appending records
dc_appendmode()......Set the mode of operation for DC_ADDREC()
dc_appshared().......Append records to a shared database
dc_ar2str()..........Convert a multidimensional array to a character string
dc_arestore()........Restore a multidimensional array from a binary file
dc_areverse()........Reverse all the elements of an array
dc_array2prg().......Create source-code file from a multi-dimensional array
dc_array_read()......Create a multi-dimensional array from an array text file
dc_array_write().....Write contents of a multi-dimensional array to file
dc_arrayfield()......Read or replace a value in a dCLIP "Array Field"
dc_arrayrec()........Return the array element number chosen by DC_DBCHOICE()
dc_asave()...........Save a multidimensional array to a binary file
dc_ase().............Swap to another suspended DOS program
dc_assist()..........Database manager assist menu
dc_assistuser()......Run a User-Defined Database manager assist menu
dc_astrtran()........Strtran() for arrays
dc_asymtest()........Test for symmetry of a multi-dimensional array or object
dc_at_clear()........Clear all prompts added by DC_At_Prompt()
dc_at_prompt().......A mouseable replacement for AT..PROMPT
dc_atnext()..........Find the next occurrence of a string in another string
dc_atoattr().........Convert a Clipper color string to a screen color attribute
dc_attrtoa().........Convert a screen color attribute to a color string
dc_average().........Pop-up a user-prompt menu for averaging selected fields
dc_b()...............Determine if DC_BROWSEDB() is running.
dc_batch()...........Load and execute a .DCB batch file
dc_bigclock()........Display a clock with large letters
dc_bin2num().........Convert a binary character string to an integer number
dc_bittest().........Tests the value of a bit of any integer
dc_blank()...........Blank all fields of the current record
dc_brow2()...........A function for calling browse-system sub-routines
dc_browarest().......Restore a browse configuration array
dc_browasave().......Save the browse array object for a selected work area
dc_browdel().........Delete a Browse configuration in the Browse Dictionary
dc_browflag()........Set or Get specific information about a browse object
dc_browfld().........Get the field name of the currently selected browse field
dc_browget().........Get the value of the currently selected browse field
dc_browimp().........Import Browse(s) from the Import Browse Dictionary
dc_browkdis()........Disable specified keys is the browse system
dc_browload()........Load a browse array from browse dictionary or array file
dc_browlocal().......Allows GET/SET access to the Local array in DC_BROWSEDB()
dc_browmenu()........Restore a Browse Menu from an Array or Data-Dictionary
dc_browmode()........Set the default mode for tile-browsing
dc_browpick()........Pick a browse configuration from the browse dictionary
dc_browrela()........Invoke a One-to-many, relational, tiled browse
dc_browrestore().....Restore and execute a Browse configuration
dc_browsave()........Save a browse array to dictionary, array file or source code
dc_browscan()........Merge a Browse-view and Edit-view window on the screen
dc_browse()..........Invoke a full-screen browse of current work area
dc_browsedb()........Invoke a multi-window browse of all work areas
dc_browsource()......Write Multiple-Window Browse configuration to source code
dc_browtile()........Invoke set of browse windows for specified list of work areas
dc_browvalue().......Get the value of an instance variable from the browse array
dc_capfirst()........Capitalize the first letter of each word in a string
dc_cdxext()..........Return default extension of a combined index
dc_cgierror()........Standard CGI system error handler
dc_cgigetenvval()....Get the value of a CGI environment setting
dc_cgigetparmval()...Get the value of a "POST" or "GET" parameter
dc_cgigetvarparm()...Determine if a parameter was passed to the CGI program
dc_cgiheader().......Send an HTML "header" response to the Web Browser
dc_cgiinit().........Initialize the CGI system
dc_cgiparamarray()...Return an array of all "POST" or "GET" parameters
dc_cgiread().........Read all "POST" URL-encoded variables into a static array
dc_cgisend().........Send an HTML response to the Web Browser
dc_cgitable()........Send an HTML "TABLE" of information to the Web Browser
dc_chdir()...........Change dos directory
dc_childcount()......Get the number of children to the current database parent
dc_choice()..........Pick list of database files to select from a wildcard
dc_chrinkey()........Return a character value from an Inkey value
dc_chrsel()..........Choose from a Pick list of 256 ASCII characters
dc_clrarr()..........Initialize or modify the Color Array
dc_clrscope()........Clear scoping values for the current work area
dc_clrsel()..........Pick a color from a pop-up color selector
dc_clrsetup()........Configure system colors
dc_codeedit()........Edit the Code Table Dictionary
dc_codeget().........Get a Code from a Code Table (Pop-up list)
dc_codeimp().........Import Code Table(s) from the Import Code Table Dictionary
dc_codeload()........Load a Code Table array from the Code Dictionary
dc_codepick()........Pick a code table from the code dictionary
dc_codesave()........Save a Code Table array to the Code Dictionary
dc_color()...........Set the current screen color value
dc_color2array().....Convert a color string to an array
dc_coloradd()........Add a new color set to the Color Array
dc_colordel()........Delete a color set from the Color Array
dc_colormode().......Enable or Disable Color / Monochrome display mode
dc_colorrest().......Restore a color set
dc_colorsave().......Save the current color set
dc_colorsel()........Select a color set from the Color Array
dc_commadd().........Add a command to the dot-prompt SET COMMAND array
dc_command() *......Send a command string to the interpreter
dc_compile().........Compile a specified .PRG or all changed .PRGs
dc_condition().......Pop-up user-prompt menu for creating database FOR conditions
dc_condset().........Set conditional index parameters and load odometer codeblock
dc_conmem()..........Report contiguous memory available for "dynamic linking"
dc_copy()............Extract data from fields and copy to other fields
dc_copyfile()........Pop-up a user-prompt menu for copying a file
dc_copynew().........Copy files that are newer than destination files
dc_copystru()........Pop-up user-prompt menu for copying the database structure
dc_copyto()..........Pop-up a user-prompt menu for copying database records
dc_count()...........Pop-up a user-prompt menu for counting records
dc_crdata()..........Pop-up a user-prompt menu for creating a new database
dc_crdlb()...........Pop-up a user-prompt menu for creating a dynamic library
dc_create()..........Create new database from a menu for defining the structure
dc_createindex().....Create an index file and display a Progress Bar
dc_crindex().........Pop-up a user-prompt menu for creating a new index
dc_curpath().........Get the current dos directory
dc_datarest()........Restore all Work Areas from info in an array
dc_datasave()........Save all Work Area information to an array
dc_datestamp().......Returns a numeric value of the date stamp of a file
dc_datetime()........Returns the date and time of a file as a string
dc_dbch() *.........A browse-style database pick-list
dc_dbchcreate()......Create a database or array pick-list object
dc_dbchoice()........A browse-style, moused, database/array pick-list
dc_dbcreate()........Create a .DBF file from a set of parallel arrays
dc_dbeval()..........Evaluate set of expression for a database with active Escape
dc_dbfext()..........Get default extension of database based on RDD selection
dc_dbfhandle().......Get the dos handle of a work area's database file
dc_dbfile()..........Open a database file the right way
dc_dbfname().........Get the full dos name of the current database file
dc_dbfopen().........Invoke a menu to prompt operator for opening a data file
dc_dbfrdd()..........Get the name of a .DBF RDD that is linked into program
dc_dbfsel()..........Select a database from a pick list of open files
dc_dbindex().........Open an array of index files
dc_dbisel()..........Pop-up a user-prompt menu to select/open an index file
dc_dbsel()...........Select an alias if it exists and report status
dc_dbstru()..........Display or Print the structure of the current database
dc_dbstruct()........Return the structure of current database in parallel arrays
dc_dbstruw().........Display database structure in wide format
dc_dbt2fpt().........Convert .DBT memo file(s) to .FPT memos
dc_dbtext()..........Get default extension of the current memo file based on RDD
dc_dbthandle().......Get the handle of the current memo file
dc_dbtname().........Get the name of the current memo file
dc_dbxadd()..........Store an array, screen, object, etc. to a DBX file record
dc_dbxclose()........Close a DBX database
dc_dbxcreate().......Create a new DBX database for storing any data type
dc_dbxget()..........Get the value of a stored element in a DBX database
dc_dbxopen().........Open a DBX database file for storing any data type
dc_dbxrestore()......Restore any memory value or array from a .DBX-style file
dc_dbxsave().........Save any memory value or array to a .DBX-style file
dc_decrypt().........Decrypt a value that was encrypted by DC_Encrypt()
dc_delete()..........Pop-up a user-prompt menu for deleting database records
dc_dictadd().........Add an array of field definitions to dCLIP's dictionary
dc_dictcheck().......Check if a dictionary is loaded
dc_dictclose().......Set flag to determine Open/Close behavior of DC* Files
dc_dictedit()........Edit field name descriptors
dc_dictexp().........Automatically Export changes to Dictionaries
dc_dictimp().........Import all Import Dictionaries
dc_dictrdd().........Post or get name of RDD to be used for dictionary files
dc_dictrest()........Restore user-defined field name descriptors from DCDICT.DBF
dc_dictsave()........Save user-defined field name translations to DCDICT.DBF
dc_dicttran()........Translate a field name to Dictionary name
dc_dimat()...........Dim an area of the screen
dc_dir().............Display a listing of files by wildcard
dc_dirdata().........Display a listing of database files and status
dc_directory().......Pop-up user-prompt for displaying files in current directory
dc_dirpick().........A Pick-list of Directories, Drives and Files
dc_disparr().........Display the contents of a multi-dimensional array
dc_dispbegin().......Begin buffering screen output
dc_dispclear().......Clear the screen output buffers
dc_dispend().........End buffering screen output
dc_dispmem().........Display the contents of memory
dc_dllfree().........Release a Blinker-compatible Dynamic-link Library
dc_dllload().........Load a Blinker-compatible Dynamic-Link Library
dc_do()..............A handy method of creating a late-binding call to a function
dc_docase()..........Evaluate a set of expressions based on a CASE
dc_dot().............Full dot-prompt interpreter for all Clipper/dCLIP commands
dc_dotdoskey().......Set Clipper command stack operation to Dos-Key emulation
dc_dotsize().........Increase/Decrease the size of the Dot-prompt command stack
dc_dotstatus().......Set the Dot-Prompt Status area ON or OFF
dc_dowhile().........Evaluate series of expressions while an expression is true
dc_drag()............Drag window coordinates and return a coordinate array
dc_drivepick().......A Pick-List to choose a disk-drive
dc_dump()............Dump the contents of a binary file in Ascii-Hex
dc_editimp().........Import Edit(s) from the Import Editing Dictionary
dc_editkdis()........Disable specified keys in the editing system
REPLACE ARRAY........Read or replace a value in a dCLIP "Array Field"

OVERVIEW

Functions Supported

Description:

All functions included in the DCLIP libraries may be used
in expressions which are part of commands entered at the
dCLIP dot-prompt or in any application code that is dynamic-
linked from the DCLIP.EXE engine or linked into the
DCLIP.EXE engine. Any feature of dCLIP can also be
included in your own .EXEcutable applications by using
appropriate functions that start with the prefix DC_*().
For example, a dot-prompt interpreter can be included in
your application by simply calling the function DC_DOT() or
the Browse system can be included by calling the function
DC_BROWSEDB().

The DCLIP.EXE engine supports all DC_*() functions that
are included in the DCLIP*.LIB libraries, all functions
that are included in the Clipper libraries, and any
functions linked into the DCLIP.EXE from third-party
libraries that have been.

Only the DC_*() functions are listed in this documentation.
See the Clipper guides for information on how to use
Clipper functions and third-party documentation for infor-
mation on how to use third-party functions.

LIBRARIES

A brief description of the dCLIP libraries

Description:

The five (5) DCLIP*.LIB libraries contain all the DC_*()
functions listed in this documentation.

DCLIP.LIB

This library contains all the usable functions that can
be "overlayed" in a BEGINAREA...ENDAREA by dynamic overlay
linkers. 95% of the functions in this library are written
and compiled by Clipper. The remainder is C and ASM that
is also overlayable.

DCLIPR.LIB

This library contains functions written in C or ASM that
cannot be overlayed. This library must be placed in the
"root".

DCLIPNL.LIB

This library contains all functions that support the
"dynamic-linking" features of dCLIP. This library can
be used without any dependency on other libraries except
the Clipper libraries.

DCLIPS.LIB

This library contains all the "stub" functions that are
used to resolve "missing external declarations" during
linking. A stubs library makes it uncessary to have 2
separate versions of the dCLIP libraries for 5.01 and 5.2.
This library must ALWAYS be listed as the LAST library
in your link script or command line, even after CLIPPER.LIB.

DCLIPEXO.LIB

This library should be linked before any other dCLIP library
when linking with ExoSpace or Blinker 3.0 in Extended or
Dual mode.

See the LIBRARIES section or chapter of this documentation
for more information on using the dCLIP libraries.

_dcbrow2_*()

Functions for calling browse-system sub-routines

Syntax:



Returns:

    NIL
   

Description:

See DC_BROW2() for details:

EDIT OPTIONS: _DCBrow2_e( cCode ) or DC_Brow2('E',cCode)
FILE OPTIONS: _DCBrow2_f( cCode ) or DC_Brow2('F',cCode)
SEARCH OPTIONS: _DCBrow2_s( cCode ) or DC_Brow2('S',cCode)
VIEW OPTIONS: _DCBrow2_v( cCode ) or DC_Brow2('V',cCode)

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_brow2()

_dcedit2_*()

Functions for calling edit-system sub-routines

Syntax:



Returns:

    NIL
   

Description:

See DC_EDIT2() for details:

EDIT OPTIONS: _DCEdit2_e( cCode ) or DC_Edit2('E',cCode)
FILE OPTIONS: _DCEdit2_f( cCode ) or DC_Edit2('F',cCode)
SEARCH OPTIONS: _DCEdit2_s( cCode ) or DC_Edit2('S',cCode)
VIEW OPTIONS: _DCEdit2_v( cCode ) or DC_Edit2('V',cCode)

Source/Library:

_DCEDIT2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_edit2()

dc_abigelem()

Return the element number of the longest string in an array

Syntax:



Arguments:

    (aArray) is the name of any single-dimensional array that is
   
fill with character strings.

@(nLength) is the name of a variable to place the length
of the item returned.


Returns:

    A number equivalent to the element of the array with the
   
longest string.

Description:

DC_ABIGELEM() will return the element number of the longest
string in a single-dimensional array.

Examples:

    LOCAL aTest, nLength
   
aTest := { 'abc','abcdef','abcde','abcd' }
? DC_ABIGELEM( aTest, @nLength )
2
? nLength
6


Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

dc_abrowse()

Browse a multi-dimensional array or object

Syntax:



Arguments:

    (aArray) is the name of any multidimensional array or subarray
   
to browse.

(lSymmetry) if .TRUE. will browse using a columnar style
browse system. If .FALSE. the browse will be an indented
style browse. Use .FALSE. if you are browsing an asymetrical
ragged array. If no parameter is passed, then the array will
automatically be tested for symmetry and will use the best
browsing method.

(cTitle) is the title to display on the browse screen.

(aDesc) is an array of descriptors for the browse columns.
If no argument is passed, then the number of the array
element will be displayed. The length of (aDesc) must be
equal to the length of (aArray)[1].

(aWidth) is an array of column widths for the browse columns.
If no argument is passed, then the column widths will be
equal to the maximum of the column descriptor or the length
of the first data item.


Returns:

    The modified contents of (aArray).
   

Description:

DC_ABROWSE() is a full-screen array/object browser that gives a
full-view of all elements in a multi-dimensional array or
object. A symetrical array may be browsed using a columnar
style browse or any type of array may be browsed using an
indented-style browse.

Indented style browsing displays sub-elements as automatically
indented and the type and value of each element is displayed.
Indented-style browsing allows you to change the type, value, or
length of any element or sub-element. You can grow or shrink
arrays or change elements of any type to an array or arrays to
any other type.

Examples:

    . aDir := directory()
   
. DC_ABROWSE( aDir, .t. )

Source/Library:

_DCDARR.PRG/.OBJ, DCLIP.LIB

See Also:

ABROWSE
dc_achoice()
dc_dbchoice()
DISPLAY ARRAY

dc_achoice()

A moused replacement for ACHOICE()

Syntax:



Arguments:

    (nTop), (nLeft), (nBottom), (nRight) are the screen
   
coordinates.

(aMenuItems) is an array of character strings to include
in the pick-list.

(aSelItems) is an array of logical values. There is one
element in this optional array for each element in
(aMenuItems). Each element in (aSelItems) that is a
.TRUE. will make the item in the window a "selectable"
item, otherwise it will be a non-selectable item and will
be displayed in "grayed" form.

(cUserFunc|bUserFunc) is the name of an optional User-Defined
function to call on exception keystrokes. See the Clipper
documentation of ACHOICE() for more information on how to use
a UDF. If the parameter is passed as a character string then
the function must be a PUBLIC, not STATIC function.

(nInitialItem) is the item to high-light in the window on
startup.

(nWindowRow) is the item to display as the first item in
the pick-list.

(aButtons) is an array of mouse-keys that conforms to the
specification for DC_MOUSEKEY(). See DC_MOUSEKEY() for
more information.

(aOptions) is a multi-dimensional array of the following
options:

Element Type Description
------- ---- ----------------------------------------------
[1] L If .TRUE. will display a scrollbar and box
around the menu items.
[2] A A sub-array of colors to use if element [1] is
.FALSE. If passed as a NIL then the Clipper
default colors will be used.

Element Type Description
------- ---- ----------------------------
[1] C Menu items color
[2] C Select bar color
[3] C Frame/scrollbar color
[4] C Spare
[5] C Unselectable items color

[3] C Title on top of box. Default is none.
[4] L If .TRUE. then the operator will be allowed to
drag the box with the mouse. Default is .FALSE.
[5] L If .TRUE. then the display will be restored
upon exit, otherwise it will remain.
[6] L If .TRUE. then the frame, scroll-bar and title
will be painted, otherwise only the items will
be painted.
[7] L If .TRUE. then after painting the scroll-bar,
items and frame, DC_ACHOICE() will exit without
waiting for a key or mouse-click.

(aHelpCodes) is an array of character string HELP CODES.
There is one element in this optional array for each element in
(aMenuItems). The HELP CODE will be passed on to the
DC_HelpF1() function for context-specific help if the operator
presses F1 on a selected item.

(aMenu) is an array defining a Top-Bar/Pull-Down menu. This
array must conform to the specification for the array passed
to the DC_MENUMAIN() function. This Top-Bar menu will be
painted at the screen coordinates defined in the menu if
(lAttachMenu) is .FALSE. or directly attached to the top of
the pick-list window if (lAttachMenu) is .FALSE. (default).
The menu will be energized if the operator presses a key
matching one of the hightlighted characters in the menu, or
if the mouse is clicked on one of the top-bar menu items.
The menu array must contain code-blocks for each menu item
to execute functions based on the menu selection. See
DC_MENUMAIN() for more information.

Description:

DC_ACHOICE() is a moused replacement for ACHOICE(). It
functions identical to ACHOICE() except it is also activated by
a mouse. The left button of the mouse is used to select the
item in the window. The right button or double-clicking works
identical to the ENTER key.

Hot keys can be activated by passing an array of screen
coordinates (mouse-buttons) and key definitions.

An options array is used to define scroll-bars, colors, exit
options, title, drag options, etc.

An optional array of Help-Codes may be passed for context-
specific help on any selected item with the F1 key.

Examples:

    local nChoice
   
local aButtons := { { 17,13,17,18,'C'},;
{ 18,13,18,18,'D'},;
{ 19,13,19,18,'M'} }
local aDir := directory()
set key asc('C') to myfunc
set key asc('D') to myfunc
set key asc('M') to myfunc
cls
@5,10 to 20,30
@16,11 to 16,29
@17,13 say 'Copy'
@18,13 say 'Delete'
@19,13 say 'Move'
aDir := dc_aconvert( aDir )
nChoice := DC_ACHOICE( 6,11,15,29,aDir[1],,,,,aButtons )
set key asc('C') to
set key asc('D') to
set key asc('M') to
return

function myfunc

@ 22,10 say ''
do case
case lastkey() = asc('C')
?? 'C button pressed'
case lastkey() = asc('D')
?? 'D button pressed'
case lastkey() = asc('M')
?? 'M button pressed'
endcase
return nil

Source/Library:

_DCACHOI.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbchoice()
dc_readapick()

dc_acompare()

Compare two arrays

Syntax:



Arguments:

    (aArray1) and (aArray2) are the arrays to compare.
   

Returns:

    A logical .TRUE. if the arrays are identical, .FALSE. otherwise.
   

Description:

DC_ACOMPARE() is used to test the contents of two arrays to
determine if they are identical.

Examples:

    aArray1 := { 1,2,3 }
   
aArray2 := { '1',2,3, }
? DC_ACOMPARE(aArray1,aArray2)
.F.

Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

dc_aconvert()

Convert a Ragged array to a Parallel array and vice-versa

Syntax:



Arguments:

    (aInput) is a Parallel Symmetrical array or Ragged Symmetrical
   
array.

Example of a "Parallel Symmetrical array":

Type Contents

aStru[1] A
aStru[1,1] C CUST_NAME
aStru[1,2] C SHIP_DATE
aStru[1,3] C BALANCE
aStru[1,4] C PRINT_FLAG
aStru[2] A
aStru[2,1] C C
aStru[2,2] C D
aStru[2,3] C N
aStru[2,4] C L
aStru[3] A
aStru[3,1] C 25
aStru[3,2] C 8
aStru[3,3] C 9
aStru[3,4] C 1
aStru[4] A
aStru[4,1] N 0
aStru[4,2] N 0
aStru[4,3] N 2
aStru[4,4] N 0


Example of a "Ragged Symmetrical array":

Type Contents

aStru[1] A
aStru[1,1] C CUST_NAME
aStru[1,2] C C
aStru[1,3] C 25
aStru[1,4] N 0
aStru[2] A
aStru[2,1] C SHIP_DATE
aStru[2,2] C D
aStru[2,3] C 8
aStru[2,4] N 0
aStru[3] A
aStru[3,1] C BALANCE
aStru[3,2] C N
aStru[3,3] C 9
aStru[3,4] N 2
aStru[4] A
aStru[4,1] C PRINT_FLAG
aStru[4,2] C L
aStru[4,3] C 1
aStru[4, ] N 0

Returns:

    An array whose elements contain the same information as the
   
input array but are in "inverted" order.

Description:

DC_ACONVERT() is used to changed the format of a symmetrical
array from "Ragged" to "Parallel" or vice-versa. This function
is handy when information in an array may not be stored in a
required format. For example, it is not easy to perform
"pick-list" operations from "Ragged" arrays or to AEVAL()
"Parallel" arrays.

Examples:

    // Converting a Ragged array to a Parallel array
   
aRaggedDir := Directory()
aParallelDir := DC_ACONVERT( aRaggedDir )
nChoice := Achoice( 10,10,20,40, aParallelDir[1] )
? 'The size of ' + aParallelDir[1,nChoice] + ' is ' + ;
Str( aParallelDir[2,nChoice] )

Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

See Also:

dc_areverse()

dc_addcargo()

Add cargo to the GetList

Syntax:



Arguments:

    (xCargo) can be one of several numeric values or an array.
   

xCargo Description
------ ----------------------------------------
101 Force this GET to validate
102 Display Pick-list pointer icon (arrow)
{103,bBlock} Pre-Evaluate Code-Block
{104,bBlock} Post-Evaluate Code-Block
{105,aMsg} Message to display on screen
106 Protect this GET from editing
107 Capitalize first character of each word
{108,aData} SAY prompt and coordinates

Returns:

    A pointer to the (GetList) passed to DC_ADDCARGO().
   

Description:

DC_ADDCARGO() is used to add cargo to the an array that
is contained in the CARGO instance variable of the last
GET in a GetList array.

DC_READMODAL() automatically looks at the information in
CARGO to give added functionality to the GET system.
CARGO is used to store array pointers, screen SAY
information and other GET options.

Examples:

    #include "dcget.ch"
   

LOCAL GetList := {}, aData, i

use (cDataFile)
aData := Array(Fcount())
FOR i := 1 TO LEN( aData )
aData[i] := FieldGet(i)
NEXT
DC_ReadWindow( { 10, 10, 20, 60 } )
FOR i := 1 TO LEN(aData)

DC_GetDevOut( i, 12, PadL(Field(i),10), )
SetPos( Row(), Col()+1 )
AAdd( GetList,_GET_(aData[i],"aData[i]",,,) )
DC_GetDisplay( GetList )

/* -- Add array element pointer -- */
GetList := DC_ADDCARGO(GetList,-1*i)

/* -- Add SAY Prompt and location -- */
GetList := ;
DC_ADDCARGO(GetList,{ 108, { i, 12, PadL(Field(i),10) }})

/* -- Add CAPFIRST flag -- */
GetList := DC_ADDCARGO(GetList,107)

NEXT
DC_ReadModal( GetList,,aReadArea )
RETURN nil

Source/Library:

_DCGETSY.PRG/.OBJ, DCLIP.LIB

See Also:

dc_readmodal()
dc_readbox()

dc_addrec()

Append a Blank record or search for a Blank record and lock it

Syntax:



Arguments:

    (nWaitTime) is the number of seconds to wait for the system to
   
return a lock before returning the status or the error message.
(0 = wait forever).

(lDisplayError) if .true. will display an operator error
message if the record cannot be locked. (default) or if .false.
will not display an error message to the operator.

(nAppendMode) is a number from 0 to 2 (0 is the default) to
establish the mode for reusing deleted or blank records, if
they exist, or appending a new record. See DC_APPENDMODE().

Returns:

    .TRUE. if record appended.  The new record is current and locked.
   

Description:

The function of DC_ADDREC() is dependent on the APPEND MODE of
operation that was previously selected by the DC_APPENDMODE()
function.

If the Append Mode is 0 (default), then DC_ADDREC() will always
append a Blank record.

If the Append Mode is 1, then DC_ADDREC() will first try to
locate any existing Blank record in the database. If a Blank
record is found, the record pointer will be set to the found
record and the record will be locked. This mode functions
differently based on whether or not the current work area
has an index selected. If an index is selected, then it is
assumed that blank records will always appear at the TOP of
the database so only the first record is tested, otherwise
the entire database will be search for a blank record.

If the Append Mode is 2, then DC_ADDREC() will first try to
locate any existing record that is marked for deletion. If
a deleted record is found, the record pointer will be set
to the found record, the record will be recalled (undeleted),
all fields will be blanked, and the record will be locked.

Examples:

    dc_appendmode(1)  // reuse blank records
   
use sales
if DC_ADDREC()
replace date with date()
else
break
endif

Source/Library:

_DCLOCK.PRG/.OBJ, DCLIP.LIB

See Also:

dc_appendmode
dc_reclock()

dc_aedit()

Edit a multi-dimensional array or object

Syntax:



Arguments:

    (aArray) is the name of any multidimensional array or subarray
   
to browse.

(aDesc) is an array of descriptors for the array items.
If no argument is passed, then the number of the array
element will be displayed. The length of (aDesc) must be
equal to the length of (aArray)[1].

(cTitle) is the title to place at the top of the edit screen.

(nStrow), (nStcol), (nEnrow), (nEncol) are the screen
coordinates.

@(lUpdated) is the name of the variable to store whether or
not the array was modified.

Returns:

    The modified contents of (aArray).
   

Description:

DC_AEDIT() is a full-screen array/object editor that allows
editing of any type of multidimensional array.

Examples:

    . aDir := directory()
   
. DC_AEDIT( aDir )

Source/Library:

_DCDARR.PRG/.OBJ, DCLIP.LIB

See Also:

AEDIT
ABROWSE
dc_abrowse()

dc_afields()

Load an array with a list of parent and child fields

Syntax:



Arguments:

    (lRelation) if .TRUE. will include all fields from all
   
parent-child relations in the returned array preceded by the
ALIAS. If .FALSE. (default), only the fields from the
currently selected work area will be returned.

Returns:

    A single-dimensional array with each element containing a character
   
type value for all fields in the current work area and (optionally)
all child work areas.

Description:

DC_AFIELDS() is used to create an array of field names from the
currently selected work area and (optionally) all child work
areas.

Examples:

    use invoice
   
use invitems new
set relation to inv_nmbr into invoice
aFields := DC_AFIELDS( .t. )
nChoice := ACHOICE( 10, 10, 20, 30, aFields )
? nChoice

INVOICE-)SHIP_DATE

Source/Library:

_DCFLDS.PRG/.OBJ, DCLIP.LIB

See Also:

dc_fields()

dc_alert()

A "moused" replacement for Clipper's ALERT() function

Syntax:



Arguments:

    (cText) is the message to place in the alert box.  Use
   
semicolons in the text to separate lines of text.

(aMenuItems) is an array of menu choices. The character
following the '~' character will be highlighted.

(cColorString) is an optional color string containing
exactly 4 colors separated by commas:

(1) box and message.
(2) unselected menu items.
(3) hot-key character of each unselected menu item
(4) selected menu item

(lJustify) if .TRUE. will left-justify the message items.
Default is .FALSE.

(aMenuId) - An optional array of unique Menu ID codes (up to 8
characters) for each menu item in (aItems). This array is
needed to enable the PERSISTENT MENU SELECTION feature. See
DC_MenuPull() for more information.

(cMenuName) - An optional parameter with a "unique" name for
this menu. This name is needed to enable the PERSISTENT MENU
SELECTION feature. See DC_MenuPull() for more information.

(nChoice) is the default menu selection.

Returns:

    A number equal to the menu choice.  Returns 0 if user
   
presses ESCape.

Description:

DC_ALERT() is a "moused" replaced for Clipper's ALERT()
function. It works identical to Alert() except it
recognizes the mouse.

Examples:

    LOCAL nChoice := DC_ALERT( "The printer is not ready",;
   
{ 'Retry','Abort','Output to a file' } )

Source/Library:

_DCMENU2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_msgbox()

dc_altshadow()

Define which side of boxes and menus to paint shadows

Syntax:



Arguments:

    (nMode) determines the shadow mode:
   

0 - will display no shadows
1 - will display shadows on left and bottom.
2 - will display shadows on right and bottom.

Returns:

    A logical value representing the current setting.
   

Description:

Many dCLIP functions that display information on the screen will
also paint a shadow on the box or menu. DC_ALTSHADOW() is used
to define an alternate to the default shadow.

Examples:

    DC_ALTSHADOW(2) // paint shadows on right side
   
dc_expl( 10,10,20,10 )

Source/Library:

_DCEXPL.PRG/.OBJ, DCLIP.LIB

See Also:

dc_expl()
dc_menupull()

dc_andbits()

Logical AND of two integers

Syntax:



Arguments:

    (nInteger1) and (nInteger2) are any integers between 0 and 255.
   

Description:

DC_ANDBITS() produces a logical AND of two integers.

Examples:

    ? DC_AndBits( 0, 1 )
   
0

? DC_AndBits( 1, 1 )
1

? DC_AndBits( 100, 99 )
96


Source/Library:

_DCAND.PBG/.OBJ, DCLIP.LIB

See Also:

dc_xorbits()

dc_append()

Pop-up a user-prompt menu for appending records

Syntax:



Arguments:

    NONE
   

Returns:

    A Logical value of .TRUE. if records were appended, .FALSE. if the
   
operation is aborted.

Description:

DC_APPEND() is a high-level function that provides a
user-interface menu for appending records to a work area.
DC_APPEND() prompts the user for information about files and
scoping conditions, then displays a progress-Odometer during
the append process.

Examples:

    @ 10,10 prompt "Append Records"
   
@ 11,10 prompt "Delete Records"
@ 12,10 prompt "Recall Records"
menu to nChoice
do case
case nChoice = 1
DC_APPEND()
case nChoice = 2
dc_delete()
case nChoice = 3
dc_recall()
endcase

Source/Library:

_DCAPPE.PRG/.OBJ, DCLIP.LIB

See Also:

APPEND
UTIL
dc_util()

dc_appendmode()

Set the mode of operation for DC_ADDREC()

Syntax:



Arguments:

    (nMode) is a number designating the desired append mode.
   

If the Append Mode is 0 (default), then DC_ADDREC() will always
append a Blank record.

If the Append Mode is 1, then DC_ADDREC() will first try to
locate any existing Blank record in the database. If a Blank
record is found, the record pointer will be set to the found
record and the record will be locked. This mode functions
differently based on whether or not the current work area
has an index selected. If an index is selected, then it is
assumed that blank records will always appear at the TOP of
the database so only the first record is tested, otherwise
the entire database will be search for a blank record.

If the Append Mode is 2, then DC_ADDREC() will first try to
locate any existing record that is marked for deletion. If
a deleted record is found, the record pointer will be set
to the found record, the record will be recalled (undeleted),
all fields will be blanked, and the record will be locked.

Returns:

    A numeric value representing the current append mode.
   

Description:

DC_APPENDMODE() is used to establish the default operation of
the DC_ADDREC() function. Depending on the mode selected
DC_ADDREC() will attempt to reuse blank records or deleted
before appending a new, blank record.

Notes:

The STATIC setting of the default append mode can be
overridden at the time that DC_ADDREC() is called by
passing a third parameter.

Examples:

    use sales
   
set index to month
DC_APPENDMODE(1) // re-use blank records
if dc_addrec()
replace date with date()
else
break
endif

Source/Library:

_DCLOCK.PRG/.OBJ, DCLIP.LIB

See Also:

dc_addrec

dc_appshared()

Append records to a shared database

Syntax:



Arguments:

    (cFromAlias) is the alias of the database to append from.  This
   
database must already be opened.

Returns:

    A Logical value of .TRUE. if records were appended, .FALSE. if the
   
operation is aborted.

Description:

DC_APPSHARED() is used to append records from another database
to the current workarea even though the current workarea may
be opened in shared mode.

NOTE: The structure of the databases must match exactly or an
error will occur.

Examples:

    USE customer SHARED
   
COPY TO temp FOR state='NE'
USE temp NEW
SELECT customer
DC_APPSHARED('temp')

Source/Library:

_DCAPPE.PRG/.OBJ, DCLIP.LIB

See Also:

APPEND SHARED

dc_ar2str()

Convert a multidimensional array to a character string

Syntax:



Arguments:

    (aArray) is any multidimensional array.
   

Returns:

    A character string.
   

Description:

DC_AR2STR() will convert any multidimensional array to a
character string for later conversion back to an array
with DC_STR2AR().

This function is handy when it is required to store an
array to a database field such as a character or memo
field.

Notes:

Array elements containing code-blocks will be converted to
NIL.

Examples:

    aDir := Directory()
   
USE dirs
REPLACE directory WITH DC_AR2STR( aDir )
aDir := DC_Str2Ar( directory )



Source/Library:

_DCASAVE.PRG/.OBJ, DCLIP.LIB

See Also:

dc_str2ar()

dc_arestore()

Restore a multidimensional array from a binary file

Syntax:



Arguments:

    (cFileName) is the name of the binary file that was previously
   
created with DC_ASAVE().

Returns:

    A multidimensional array if the array file was a valid file,
   
otherwise returns a NIL.

Description:

DC_ARESTORE() will create an multidimensional array from the
contents of a binary file that was created with DC_ASAVE().

Examples:

    aDir := Directory()
   
dc_asave( aDir, 'ADIR.ARX' )
aDir := DC_ARESTORE( 'ADIR.ARX' )

Source/Library:

_DCASAVE.PRG/.OBJ, DCLIP.LIB

See Also:

dc_asave()

dc_areverse()

Reverse all the elements of an array

Syntax:



Arguments:

    (aArray) is the name of the array to reverse.
   

Returns:

    An array of the same length as the original array.
   

Description:

DC_AREVERSE() is used to sort all the elements of an array
in reverse order from the original array.

Examples:

    myArray :=  { 1, 2, 'test', .t. }
   

outArray := DC_AREVERSE( myArray )

// contents of outArray : { .t., 'test', 2, 1 }

Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

See Also:

dc_aconvert()

dc_array2prg()

Create source-code file from a multi-dimensional array

Syntax:



Arguments:

    (aArray) is the name of the array to write.
   

(cFileName) is the name of the file to create.

(cFunction) is the name of the function to call that will
return the array contents. If this parameter is not passed
then the function will be given the same name as the file.

(cComments) is any comment heading to place at the top of
the file.

(cCode) is any source code that should be executed at the
beginning of the function before returning the array
contents.

Returns:

    A logical .t. if the file was created.
   

Description:

DC_ARRAY2PRG() is used to create a .PRG file from the contents
of a multi-dimensional array. This allows the programmer
to capture the contents of any array to a source code file
that can be compiled and run to rebuild the array.

Notes:

If the file being created already exists, then the user
will be prompted to Append, Overwrite or Abort the
operation.

Examples:

    -- Example 1 --
   

. aMyArray := directory()
. DC_ARRAY2PRG( aMyArray, "MYDIR" )
. clip mydir // compile mydir.prg
. obj mydir // load mydir.obj
. aNewArray := MYDIR()


-- Example 2 --

. use all like cust*
. browse tile // configure browse windows
. DC_ARRAY2PRG( DCBROWSE, 'MYBROWSE' )
. clip mybrowse // compile mbrowse.prg
. obj mybrowse // load mybrowse.obj
. release dcbrowse // kill old browse array
. dcbrowse := MYBROWSE()

Source/Library:

_DCAPRG.PRG/.OBJ, DCLIP.LIB

dc_array_read()

Create a multi-dimensional array from an array text file

Syntax:



Arguments:

    (cArrayFile) is the name of the array text file to read.
   

Returns:

    A multi-dimensional array built from the contents of (cArrayFile).
   

Description:

DC_ARRAY_READ() is used to create a multi-dimensional array
from the contents of an array text file. Only elements of the
type L (logical), N (numeric), C (character), D (date), A
(array) can be saved and restored.

Examples:

    . aMyArray := directory()
   
. dc_array_write( aMyArray, "DIR.AR" )
. aDirectory := DC_ARRAY_READ( "DIR.AR" )

Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

See Also:

RESTORE ARRAY
dc_array_write()

dc_array_write()

Write contents of a multi-dimensional array to file

Syntax:



Arguments:

    (aArray) is the name of the multi-dimensional array to save.
   

(cArrayFile) is the name of the array text file to write.

Returns:

    .TRUE. if the array file was created, .FALSE. otherwise.
   

Description:

DC_ARRAY_WRITE() is used to save a multi-dimensional array to
an array text file for later restoring with the DC_ARRAY_READ()
function for RESTORE ARRAY command. Only elements of the type
L (logical), N (numeric), C (character), D (date), A (array)
can be saved and restored.

Examples:

    . aMyArray := directory()
   
. DC_ARRAY_WRITE( aMyArray, "DIR.AR" )
. aDirectory := dc_array_read( "DIR.AR" )

Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

See Also:

SAVE ARRAY
dc_array_read()

dc_arrayfield()

Read or replace a value in a dCLIP "Array Field"

Syntax:



Arguments:

    (cFieldName) is the name of a Character or Memo field that
   
is a "dCLIP Array Field".

(nElement) is the array element.

(xValue) is the value to store in the array element.

Returns:

    A logical .TRUE. if the array file was created, .FALSE.
   
otherwise.

Description:

DC_ARRAYFIELD() is used to easily read or replace the value of any
element of a dCLIP array field. dCLIP array fields are essentially
character or memo fields in which an array is converted to a string
during storage and back to an array during retrieval.

Examples:

    // Field name ARRAYFIELD is a Memo Field
   

aDir := Directory()
REPL ARRAYFIELD WITH DC_Ar2Str(aDir)

aFileData := DC_ARRAYFIELD( "ARRAYFIELD", 1 )

Source/Library:

_DCASAVE.PRG/.OBJ, DCLIP.LIB

See Also:

REPLACE ARRAY

dc_arrayrec()

Return the array element number chosen by DC_DBCHOICE()

Syntax:



Arguments:

    @(nSubPointer) is the name of a numeric variable to store the
   
sub-element number selected by the user.

Returns:

    A numeric value equivalent to the array element chosen by
   
the operator.

Description:

DC_ARRAYREC() is called after returning from the DC_DBCHOICE()
multi-dimensional array browser to get the array element number
and sub-element number that was chosen by the operator.

Examples:

    local aObject, aDirectory := Directory('*.*'), nInkey, nChoice,;
   
nSubElement

aObject := ;
DC_DBCHCREATE( {2,7,20,73, ' Pick a file ',,,,,,,,,,,.t.},;
{ { 1,'Name',12 } ,;
{ 2,'Size',10 } ,;
{ 3,'Date',8 } ,;
{ 4,'Time',8 } ,;
{ 5,'Attr',5 } } ,, aDirectory )

aObject := DC_DBCHOICE( aObject, @nInkey,, .f., .f. )
nChoice := DC_ARRAYREC( @nSubElement )

IF nChoice ) 0
? aDirectory[ nChoice, nSubElement ]
ENDIF

Source/Library:

_DCDBCHO.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbchoice()

dc_asave()

Save a multidimensional array to a binary file

Syntax:



Arguments:

    (aArray) is any multidimenstional array.
   

(cFileName) is the name of the binary file to create with
the array contents.

Returns:

    A logical .TRUE. if the array file was created, .FALSE.
   
otherwise.

Description:

DC_ASAVE() will save the contents of any multi-dimensional
array to a binary file for later restoring with DC_ARESTORE().

Examples:

    aDir := Directory()
   
DC_ASAVE( aDir, 'ADIR.ARX' )
aDir := DC_Arestore( 'ADIR.ARX' )

Source/Library:

_DCASAVE.PRG/.OBJ, DCLIP.LIB

See Also:

dc_arestore()

dc_ase()

Swap to another suspended DOS program

Syntax:



Source/Library:

_DCASE.PRG/.OBJ, DCLIP.LIB

dc_assist()

Database manager assist menu

Syntax:



Arguments:

    NONE
   

Returns:

    NIL
   

Description:

DC_ASSIST() is a high-level function that can be used to
include a full database assistant into an application.
DC_ASSIST() is a menu- driven application that is basically a
front-end to all the DBMS features in the dCLIP libraries.

Source/Library:

_DCASSIS.PRG/.OBJ, _DCASSI2.PRG/.OBJ, DCLIP.LIB

See Also:

ASSIST
dc_turbo()
START =

dc_assistuser()

Run a User-Defined Database manager assist menu

Syntax:



Arguments:

    (cMenuTag) is the tag name of the menu to execute.  If no
   
argument is passed, then the menu name will default to
"ASSIST".

Returns:

    NIL
   

Description:

DC_ASSISTUSER() is a front-end function that passes a
user-defined menu to the DC_ASSIST() function.

The DC_ASSIST() function has a hard-code built-in menu which
can be overridden by using the DC_ASSISTUSER() function. A
template for the standard hard-coded menu is contained in the
DCMENU.DBF Menu Dictionary under the menu tag name "ASSIST".
This menu can be modified with the menu editor to delete or
add menu options. Use the command MENU EDIT ASSIST from the
dot-prompt or the function DC_MENUEDIT("ASSIST") in your
source code to modify the "ASSIST" template.

Examples:

    DC_ASSISTUSER("MYASSIST")
   

Source/Library:

_DCASSIS.PRG/.OBJ, _DCASSI2.PRG/.OBJ, DCLIP.LIB

See Also:

ASSIST
dc_assist()
dc_turbo()
START

dc_astrtran()

Strtran() for arrays

Syntax:



Arguments:

    (aArray) is the array to traverse.
   

(cString1) is the contents in each element to replace.

(cString2) is the new value.

Returns:

    An array whose elements have been modified.
   

Description:

DC_ASTRTRAN() will traverse any multidimensional array and
replace all occurrences of (cString1) in all character string
elements with the contents of (cString2).

This function works identical to Clipper's STRTRAN() except it
works on each element of an array.

Source/Library:

_DCARRAY.PRG/.OBJ, DCLIP.LIB

dc_asymtest()

Test for symmetry of a multi-dimensional array or object

Syntax:



Arguments:

    (aArray) is the name of any multidimensional array or subarray
   
to test.

Returns:

    A logical .TRUE. if the array is symmetrical, .FALSE. otherwise.
   

Description:

DC_ASYMTEST() will test whether an array is symmetrical of
non-symmetrical. A symmetrical array is one in which the
number of elements of each sub-array are equal.

Examples:

    . aDir := directory()
   
. ? DC_ASYMTEST( aDir )
.t.
. aJunk := { 1, 2, { date(), time() }, .f. }
. ? DC_ASYMTEST( aJunk )
.f.

Source/Library:

_DCDARR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_abrowse()

dc_at_clear()

Clear all prompts added by DC_At_Prompt()

Syntax:



Arguments:

    None
   

Returns:

    NIL
   

Description:

DC_AT_CLEAR() is used to clear the array that holds the
menu prompts created with DC_AT_PROMPT(). This array
is automatically cleared after calling DC_MENU_TO() so
it is not necessary to call this function unless you
wish to simply display menu prompts and not call the
DC_MENU_TO() function to get a user selection.

Examples:

    dc_at_prompt( 10, 10, "Open a File", "Use a new database" )
   
DC_AT_CLEAR() // changed my mind

Source/Library:

_DCMENU2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_at_prompt()
dc_menu_to()

dc_at_prompt()

A mouseable replacement for AT..PROMPT

Syntax:



Arguments:

    (nRow) is the screen row to display the prompt.
   

(nCol) is the screen column to display the prompt.

(cPrompt) is the prompt to display on the screen.

(cMessage) is an optional message to display at the coordinates
defined by the SET MESSAGE environment variable or by the
message coordinates passed to DC_MENU_TO().

Returns:

    NIL
   

Description:

DC_AT_PROMPT() is used with DC_MENU_TO() to replace Clipper
@..PROMPT / MENU TO commands with a "mouseable" menu prompt
system. The prompts and menu will behave exactly like the
Clipper MENU TO system except the left button of the mouse will
high-light the selected prompt, and the right button performs
the same function as the (ENTER) key.

Examples:

    // display prompts
   
DC_AT_PROMPT( 10, 10, "Open a File", "Use a new database" )
DC_AT_PROMPT( 12, 10, "Open an Index", "Use an Index file" )
DC_AT_PROMPT( 14, 10, "Edit database", "Browse all records" )

// get a user selection and display message at row 20, col 25
nChoice := dc_menu_to( 1, 20, 25 )

Source/Library:

_DCMENU2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_at_clear()
dc_menu_to()

dc_atnext()

Find the next occurrence of a string in another string

Syntax:



Arguments:

    (cCharacter) is the character or substring to search.
   

(cString) is the string to search.

(nOccurrence) is the occurrence of (cCharacter) in (cString) to
find.

Returns:

    The numeric location of the (nOccurence) of (cCharacter) in
   
(cString). If not found then 0 is returned.

Description:

DC_ATNEXT() is used to return the location of the nth occurence
of a substring within a string.

Examples:

    . cString := 'this is a test'
   
? DC_ATNEXT( 'is', cString, 1 )

3

? DC_ATNEXT( 'is', cString, 2 )

6

Source/Library:

_DCATNXT.PRG/.OBJ, DCLIP.LIB

dc_atoattr()

Convert a Clipper color string to a screen color attribute

Syntax:



Arguments:

    (cColorString) is a valid Clipper color string.
   


Returns:

    A character string.
   

Description:

DC_ATOATTR() is used to convert a Clipper color string to
a numeric screen attribute. Screen attributes are represented
as a number from 0 to 255 for a total of 256 colors. Clipper
functions require that a color string be used for setting
colors rather than a number.

Examples:

    ? DC_ATOATTR( 'R/GR' )
   
100

? DC_ATOATTR( 'N/N' )
0

? DC_ATOATTR( 'W+*/W' )
255

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_attrtoa()

dc_attrtoa()

Convert a screen color attribute to a color string

Syntax:



Arguments:

    (nColor) is a number from 0 to 256.
   


Returns:

    A character string.
   

Description:

DC_ATTRTOA() is used to convert a screen attribute to a
color string. Screen attributes are represented as a
number from 0 to 255 for a total of 256 colors. Clipper
functions require that a color string be used for setting
colors rather than a number.

Examples:

    ? DC_ATTRTOA( 100 )
   
R/GR

? DC_ATTRTOA( 0 )
N/N

? DC_ATTRTOA( 255 )
W+*/W

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_atoattr()

dc_average()

Pop-up a user-prompt menu for averaging selected fields

Syntax:



Arguments:

    NONE
   

Returns:

    A Logical value of .TRUE. if records were averaged, .FALSE. if the
   
operation is aborted.

Description:

DC_AVERAGE() is a high-level function that provides a
user-interface menu for averaging the value of specified fields
in a work area.

DC_AVERAGE() prompts the user for information about files,
fields, and scoping conditions (with pick-list options), then
displays a progress-Odometer during the averaging process
followed by the final results.

Examples:

    . use invoice
   
. use invitems new
. set relation to inv_nmbr into invoice
. DC_AVERAGE()

Source/Library:

_DCSUM.PRG/.OBJ, DCLIP.LIB

See Also:

AVERAGE
UTIL
dc_util()

dc_b()

Determine if DC_BROWSEDB() is running.

Syntax:



Arguments:

    None.
   

Returns:

    A logical .TRUE. if DC_EDIT() is running, .FALSE. otherwise.
   

Description:

DC_B() is a function that is used to determine if the user
is running a routine that was originally called from
DC_BROWSEDB(). This function will help prevent recursive
calls to DC_BROWSEDB() if they are not desired.

Source/Library:

_DCBROW.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()

dc_batch()

Load and execute a .DCB batch file

Syntax:



Arguments:

    (cFileName) is the name of the batch file to run.  If the
   
extension is not given then .DCB is assumed.

(c1) - (c5) are optional parameters that are subsituted by %1
- %5 respectively in the batch file commands.

Returns:

    nil
   

Description:

DC_BATCH() is used to open and execute a .DCB batch file. A
"batch" file can contain any commands that can be interpreted
at the dot prompt, including commands in .CH files which
have been loaded with the INCLUDE command or DC_PREINCLUDE()
function.

Examples:

    DC_BATCH('test.dcb')    // run TEST.DCB file
   

Source/Library:

_DCBATCH.PRG/.OBJ, DCLIP.LIB

See Also:

BATCH
dc_program()
dc_interpret()

dc_bigclock()

Display a clock with large letters

Syntax:



Arguments:

    (nStrow) and (nStCol) are the starting row and column of the
   
screen. If no parameters are passed the clock will be centered
in the screen.

(cColor) is the color of the numbers on the clock.

Returns:

    The Inkey() value of the key used to stop the clock.
   

Description:

DC_BIGCLOCK() is used to display a large digital clock in
military time until a key is pressed or the mouse is clicked.

Examples:

    DC_BIGCLOCK()
   

Source/Library:

_DCCHR.PRG/.OBJ, DCLIP.LIB

dc_bin2num()

Convert a binary character string to an integer number

Syntax:



Arguments:

    (cBinary) is binary number represented as a character string.
   

Description:

DC_BIN2NUM() is used to convert an binary number represented as
a character string into an integer.

Examples:

    ? DC_Bin2Num( '00000000' )
   
0

? DC_Bin2Num( '11111111' )
255

Source/Library:

_DCAND.PBG/.OBJ, DCLIP.LIB

See Also:

dc_bin2num()

dc_bittest()

Tests the value of a bit of any integer

Syntax:



Arguments:

    (nInteger) is any integer between 0 and 255.
   

(nBitToTest) is any integer between 1 and 8.

Description:

DC_BITTEST() is used to test the value of a specified BIT of an
integer.

Examples:

    ? DC_BitTest( 128, 8 )
   
1

? DC_BitTest( 127, 8 )
0

Source/Library:

_DCAND.PBG/.OBJ, DCLIP.LIB

See Also:

dc_andbits()

dc_blank()

Blank all fields of the current record

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. is the record was locked and blanked, .FALSE. if the record
   
could not be locked.

Description:

DC_BLANK() is used to blank the contents of all fields in the
current record of the current work area. It is not necessary
to lock the record because DC_BLANK() will also lock and unlock
the record before blanking the contents.

Source/Library:

_DCBLANK.PRG./.OBJ, DCLIP.LIB

See Also:

dc_isblank

dc_brow2()

A function for calling browse-system sub-routines

Syntax:



Arguments:

    (cMenu) is a single character designating the menu group.
   

cMenu Description
----- -------------------------------------
E Edit Options
V View Options
F File Options
S Search Options

(cCode) is a single or double character-set designating a
specific routine to execute. See below.

EDIT OPTIONS
------------
F Edit Currently selected Field
A Append a new record
R Replace record with VIRTUAL Record
U Update (Edit) VIRTUAL Record
B Blank Record (Empty all fields)
O Replace record with MAPPED Record (from import map)
D Delete Record using DEFAULT method
DD Delete/Recall Record (Toggle DELETED flag)
DM Set the Default Delete Method
BD Blow-Down
T Capture Current record to VIRTUAL record
S Set Append Mode
Y Set Data-Entry Mode
L Insert Blank Record(s)
N Insert Virtual Record(s)
I Import Text file to selected Memo Field
X Export selected Memo Field to Text File
C Create Field Replacement Macro
K Create Keyboard Macro


VIEW OPTIONS
------------
UDF Define a UDF (User-Defined Function Code-block)
A Auto-update of relational windows
I Toggle inclusion of relational fields in browse
M Many-to-One Browse
L Toggle locking of selected column
R Toggle display of record numbers
F Sort field list (or tag columns to browse)
V Size memo window
Z Toggle Zoom mode
BF Browse field (column) configuration
D Edit currently selected column properties
E Add a new browse column
J Insert a new browse column
K Delete selected browse column
B Browse using default configuration
P Pick a color set
C Select column width(s)
W Change browse window size
T Tile-Browse
N Toggle Display of shadow on window
Y Total all numeric columns
X Clear column totals
G Set Video display mode (25,34,50 rows)


FILE OPTIONS
------------
C Close database
F Close indexes
O Open a new database
D Select a different work area to browse
I Select a different index
T Select an index tag
A Delete an index tag
N Create an index tag
E Edit a Text file
M Edit a Label form file
R Edit a Report form file
P Load an Import map
U Save current record to Virtual Record File
V Restore Virtual Record from Virtual Record File
W Display work area status
S Save browse to Dictionary, Array file or source
SX Export browse to Dictionary, Array file or source
LA Load browse configuration from an Array file
LI Load browse configuration from Import dictionary
LF Load browse configuration from a Function
X Delete a browse configuration in dictionary
G Edit Field list (Field Dictionary)


SEARCH OPTIONS
--------------
I Select a Filtered-Index condition (Scope)
T Toggle Filtered-Index mode
S Set a filter
N Set a Scoping Condition
E Clear all Range Queries
O Go to Top Record in File
B Go to Bottom Record in File
G Go to a specified record in File
H Hunt for a record
U Resume the Hunt
F Find a Record by Index
Q Quick-Locate a Record
L Locate a Record by Condition
C Continue the Locate
P Pan to a selected field
M Mark current record
R Return to Marked record
AS Toggle Auto-Seek mode
AT Toggle Record-Tag mode
AC Clear all record tags
AN Skip to next tagged record
AP Skip to previous tagged record
AK Set Key to use for record tagging

Returns:

    NIL
   

Description:

DC_BROW2() is a function that interfaces to most of the
subroutines called by menu selections from the browse
pull-down menu.

CAUTION: This function is designed to be called ONLY from
menu selections that are attached to the DC_BROWSEDB()
function otherwise errors could occur. Most of the routines
called by this function require that the DCBROWSE array be
initialized and that a PRIVATE pointer named NBROWAREA be
set to the current work area. If you are going to use this
function or any of the _DCBROW2_*() functions, then make
sure that they are called only by menus attached to the
DC_BROWSEDB() function or by procedures/functions called
from the DC_BROWSEDB() function either via the menu or
hot keys.

NOTE: Alternative methods of calling browse-system routines
are documented here:

EDIT OPTIONS: _DCBrow2_e( cCode ) or DC_Brow2('E',cCode)
FILE OPTIONS: _DCBrow2_f( cCode ) or DC_Brow2('F',cCode)
SEARCH OPTIONS: _DCBrow2_s( cCode ) or DC_Brow2('S',cCode)
VIEW OPTIONS: _DCBrow2_v( cCode ) or DC_Brow2('V',cCode)

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

_dcbrow2_*()

dc_browarest()

Restore a browse configuration array

Syntax:



Arguments:

    (nArea) is the browse work area to restore.  If this argument
   
is not passed then the current work area is default.

(aBrowse) is the array with the contents of a browse array
saved by DC_BROWASAVE() or DC_BROWSAVE(). If (cBrowse) is a
character string instead of an array, then the value of (cBrowse)
must be equivalent to a BROWSE TAG NAME for a browse configuration
stored in the DCBROWSE.DBF edit-dictionary file. See DC_BROWSAVE()
for more information.

(lWorkRestore) if .TRUE. will also restore any work areas if a
WORK AREA Tag was saved in the Browse Array. A WORK AREA tag
is the name of a Work Group in the DCFILES.DBF database.
See DC_FILESAVE() for more information. The default is .FALSE.
meaning that databases matching the restored browse configuration
must already be open.

Returns:

    A logical .TRUE. if the browse array(s) were restored
   
successfully, .FALSE. otherwise.

Description:

DC_BROWAREST() is used to restore a browse array that was
previously saved with DC_BROWASAVE() or DC_BROWSAVE(). These
functions are used to capture the configuration of a browse
work area (or multiple work areas) and restore it at a later
time.


Examples:

    PROCEDURE main
   

LOCAL aBrowse
use sales
dc_browsedb()
aBrowse := DC_BROWASAVE( SELE('SALES') )
close all
do something
use sales new
DC_BROWAREST( SELE(), aBrowse )
dc_browsedb()

Source/Library:

_DCBROW5.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browasave
dc_browsedb()
BROWSE

dc_browasave()

Save the browse array object for a selected work area

Syntax:



Arguments:

    (nArea) is the browse work area to save.  If no parameter is
   
passed, then all browse configurations in all open work
areas will be saved.

Returns:

    A multi-dimensional array that is equivalent to the DC_BROWSEDB()
   
browse object for the specified work area.

Description:

DC_BROWASAVE() is used to save a browse array for later
restoring with DC_BROWAREST(). These functions are used to
capture the configuration of a browse work area and restore it
at a later time.

Examples:

    PROCEDURE main
   

LOCAL aBrowse
use sales
dc_browsedb()
aBrowse := DC_BROWASAVE( SELE('SALES') )
close all
do something
use sales new
DC_BROWAREST( SELE(), aBrowse )
dc_browsedb()

Source/Library:

_DCBROW5.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browarest()
dc_browasave()
BROWSE
dc_browsedb()

dc_browdel()

Delete a Browse configuration in the Browse Dictionary

Syntax:



Arguments:

    (cConfig) is the Tag Name of the Browse Configuration to
   
delete. If no argument is passed then a pick-list of all
Browse configurations will be displayed.

Description:

DC_BROWDEL() is used to delete a Browse Configuration from
the DCBROWSE.DBF Browse Dictionary file.

Examples:

    DC_BROWDEL("mybrowse")
   

Source/Library:

_DCBROW4.PRG/.OBJ,DCLIP.LIB

See Also:

BROWSE DELETE

dc_browflag()

Set or Get specific information about a browse object

Syntax:



Arguments:

    (cCode) is a word describing the value to GET or SET.
   

cCode GET SET Type Description
---------- --- --- ---- ----------------------------------
ZOOM X L .t. if ZOOM mode ON, .f. if OFF
PAINTROW X Repaint the current browse row
PAINTSCRN X Repaint the current browse screen

(nArea) is the browse work area. If this parameter is not
passed then the currently selected area is the default.

(lGetValue) if .TRUE. will GET the value of the configuration
parameter. If .FALSE. (default), then it is assumed to be
a SET option.

(xDefault) is a default value to return in the event that
the browse screen has not been initialized. Use this to
prevent errors in your code.

Returns:

    The GET Value.
   

Description:

DC_BROWFLAG() is used to set or get specific information about
a browse configuration in order to control the browse or
the screen from functions called by SET KEYS, menus or UDF's
when in the DC_BROWSEDB() function.

NOTE: This is an evolving function and has been provided to
meet specific needs for specific applications. The list of
options is constantly changing so it is recommended that
you look at the _DCBROW.PRG source code for the latest
information.

Examples:

    /* In this example DC_BROWFLAG() is used to determine
   
whether the user has ZOOMED the display. The code is
being called in a UDF that is evaluated from the
DC_BROWSEDB() function. The UDF is used to display a
status box in the area of the screen below the browse.
The status box must display ONLY if the browse has
not been ZOOMED to use the full-screen. */

IF !DC_BROWFLAG('ZOOM')
StatusDisplay()
ENDIF

Source/Library:

_DCBROW.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()

dc_browfld()

Get the field name of the currently selected browse field

Syntax:



Arguments:

    nArea is the browse work area ( 1 - 154 ).  If no argument is
   
passed then the current work area is default.

Description:

DC_BROWFLD() is used to report the name of the currently
selected database field for a specified browse work area.

Examples:

    use invoice
   
use invitems new
dc_browtile()
? DC_BROWFLD(1)
INV_NMBR
? DC_BROWFLD(2)
SHIP_DATE

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browget()
dc_browsedb()
BROWSE

dc_browget()

Get the value of the currently selected browse field

Syntax:



Arguments:

    (nArea) is the browse work area ( 1 - 154 ).  If no argument is
   
passed then the current work area is default.

Description:

DC_BROWGET() is used to report the value of the currently
selected database field for a specified browse work area.

Examples:

    use invoice
   
use invitems new
dc_browtile()
? DC_BROWGET(1)
23478
? DC_BROWFLD(2)
10/12/91

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browfld()
dc_browsedb()
BROWSE

dc_browimp()

Import Browse(s) from the Import Browse Dictionary

Syntax:



Arguments:

    (cBrowName) is the name of the browse.  This is a name of
   
up to eight (8) digits. If a browse name is passed then
the DXBROWSE.DBF database will be searched and all browse
items that match the browse name be imported into DCBROWSE.DBF.
If no name is passed, then a pick-list of all browses stored
in the DXBROWSE.DBF database will be displayed.

If "ALL" is passed as the browse name, then all browses in the
DXBROWSE.DBF will be imported into DCBROWSE.DBF.

Returns:

    A logical .TRUE. if the browse was imported successfully.
   


Description:

DC_BROWIMP() is used to import browse configurations from a
DXBROWSE.DBF file into the DCBROWSE.DBF file.

Notes:

The DCBROWSE.DBF file is the data-dictionary database that
contains all browse configurations. If this file does not exist
in your default directory or path then it will be created. The
DXBROWSE.DBF file is the data-dictionary database that contains
all browses that were exported from another system.

Source/Library:

_DCBROW4.PRG/.OBJ, DCLIP.LIB

See Also:

BROWSE IMPORT

dc_browkdis()

Disable specified keys is the browse system

Syntax:



Arguments:

    (aKeys) is an array of numeric (INKEY()) values.
   

Returns:

    An array containing the previous setting.
   

Description:

DC_BROWKDIS() is used to disable keys in the Browse system
(DC_BROWSEDB()). Pass this function an array of numeric INKEY()
values to disable keys that are normally active while in the
Browse loop.

Examples:

    To disable the SPACE bar key from popping up a Browse list and
   
the TAB key from tabbing to another browse area enter the
following code:

USE (myfile)
aKeys := DC_BROWKDIS( { K_SPACE, K_TAB } )
DC_BrowseDb()
DC_BROWDIS( aKeys ) // Restore old set




Source/Library:

_DCBROW.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()
BROWSE

dc_browload()

Load a browse array from browse dictionary or array file

Syntax:



Arguments:

    (cBrowName) is the name of the Browse configuration to
   
load (up to 8 characters). If no parameter is passed, then
a pick-list of all Browse configurations in the DCBROWSE.DBF
dictionary will be displayed.

(cMode) is a single character designating the source:
A - From an Array File. If this option is chosen then
the user will be prompted with a dialogue screen to
enter the name of the array file. The default file
name will be filled in as (cBrowName).DBR.
F - From a Function. If this option is chosen then the
function (cBrowName)_B() will be called to get the
array, if it exists.
D - From the DCBROWSE.DBF dictionary. A Browse
Configuration with the Tag Name (cBrowName) will be
loaded into the array, if it exists.
NONE - If no parameter is passed, then the array will be
loaded first from the function (cBrowName)_B(), if it
exists, and secondly from the file (cBrowName).DBR if it
exists, and thirdly from the DCBROWSE.DBF dictionary.

(lCache) if .TRUE. (default) will save the configuration
to a static cache so the next time it is requested it will
be reloaded from the cache for faster speed. If .FALSE. or
if the DC_MEMCACHE() setting is 0, then it will not be saved
to the static array.

(lMessage) if .TRUE. (default) will warn the operator if
the Browse configuration does not exist in the Browse
dictionary.

(lCreateDbf) if .TRUE. (default) will create the DCBROWSE.DBF
dictionary if it does not exist. If .FALSE. and the
DCBROWSE.DBF dictionary does not exist, then the function will
return a NIL.

(lImport) if .TRUE. will attempt to load the configuration
from a dictionary file named DXBROWSE.DBF rather than the
standard dictionary named DCBROWSE.DBF.

Returns:

    A browse array that conforms to the specification documented
   
in ARGUMENTS of the function named DC_BROWSAVE().

Description:

DC_BROWLOAD() is used to load a browse configuration from
the DCBROWSE.DBF dictionary file, a *.DBR array file, or
a function call.

Examples:

    use customer
   
aBrowse := DC_BROWLOAD( 'CUSTOMER' )
DC_BrowRestore( aBrowse )

Source/Library:

_DCBROW4.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsave()
dc_browsedb()
BROWSE

dc_browlocal()

Allows GET/SET access to the Local array in DC_BROWSEDB()

Syntax:



Arguments:

    NONE.
   

Returns:

    NIL.
   

Description:

DC_BROWLOCAL() is used to access an array of information
about the currently running DC_BROWSEDB() function. This
function is used to look at current browse configuration
conditions or to modify same.

The DC_BROWSEDB() function uses a PUBLIC array named DCBROWSE
and a local array named aBrowLocal. The local array is
released upon exiting the DC_BROWSEDB() function whereas the
public array is maintained throughout the application.
Sometimes it is necessary to get access to the local values
in this array.

Each array element is defined in the DCBROW.CH file.


Notes:

This function should be used only in procedures called
from within DC_BROWSEDB() such as an attached menu, a
SET KEY or a UDF, otherwise an error could result.

Examples:

    /* Get the array containing record CARRY forward values */
   

LOCAL aBrowLocal := DC_BrowLocal()

IF Valtype(aBrowLocal) = 'A' .AND.
Valtype(aBrowLocal[78]) = 'A'
aBrowLocal[78] := DC_VirtEdit(aBrowLocal[78])
ENDIF

Source/Library:

_DCBROW.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()
dc_browvalue()

dc_browmenu()

Restore a Browse Menu from an Array or Data-Dictionary

Syntax:



Arguments:

    (aMenu) is a menu array created by DC_MENUEDIT() or
   
restored from the Menu-Dictionary database via DC_MENULOAD().

If (aMenu) is not passed then (nMode) is used to determine
how to load the menu:

0 - Reserved
1 - Restore default menu
2 - Load a menu from the Data-Dictionary (choose from
pick-list)
3 - Edit and load menu in the Data-Dictionary (choose from
pick-list)



Returns:

    A "compiled" menu array that can be passed to DC_MENUMAIN().
   

Description:

DC_BROWMENU() is used to restore a browse menu from the
Menu-Dictionary or an array.

The Browse system, DC_BROWSEDB(), includes a default menu
that includes nearly every option to make the Browse
system into a complete Data-Base Manager. Often times,
the developer wants to provide the dCLIP browse system in
an application but limit the menu options available to the
user. This can be accomplished by designing a custom
browse menu using DC_MENUEDIT() or MENU EDIT and then
replacing the default menu via DC_BROWMENU(). The dCLIP
Menu-Dictionary database, DCMENU.DBF, contains a template
of the default browse menu named "DCBROWSE". It is
recommended that you load this menu into the menu editor
and give a custom name such as "MYBROWSE", make the
desired deletions, additions, or modifications, then save
it to the data-dictionary or to a source-code file for
restoring with DC_BROWMENU().



Examples:

    (-- Saving a Browse and Menu Configuration --)
   

/* -- Open databases -- */
OpenData()

/* -- design browse windows to fit requirements -- */
dc_browrela()

/* -- save browse configuration to source-code -- */
dc_browsource() // Save to MYBROWSE()

/* -- design browse menu to fit requirements -- */
dc_menuedit() // Save to MYBROWMENU()

RETURN



(-- Compile and Run the new Browse System --)

/* -- compile and link new source-code -- */

/* -- Run browse configuration in new .EXE -- */
OpenData()
DC_BROWMENU( MyBrowMenu() )
DC_BrowRestore( MyBrowse() )
RETURN



FUNCTION OpenData()
use customer
use invoice new index invoice
use invitems new index invitems
select customer
set relation to cust_nmbr into invoice
select invoice
set relation to inv_nmbr into invitems
RETURN nil

Source/Library:

_DCBROW3.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browrestore()
dc_browsedb()
BROWSE

dc_browmode()

Set the default mode for tile-browsing

Syntax:



Arguments:

    (nMode) is an optional argument for defining the method to
   
display the browse windows being opened for the relational
browsing.

nMode

0 Best fit (default)
1 Four windows ( screen split in half vertically and
horizonally )
2 Four windows ( screen split horizontally )
3 Three windows ( screen split horizontally )
4 Two windows ( screen split vertically )
5 Two windows ( screen split horizontally )
6 Six windows ( three across / two down )

Returns:

    The current browse-tile mode setting.
   

Description:

DC_BROWMODE() sets the default mode for "tile-browsing" when
calling DC_BROWTILE() or BROWSE TILE with no "window-style"
parameter.

Examples:

    . use all like DC*
   
. DC_BROWMODE(4)
. dc_browtile()

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browtile()
BROWSE TILE

dc_browpick()

Pick a browse configuration from the browse dictionary

Syntax:



Arguments:

    (cTitle) is the title to display on the pick-list box.
   

Returns:

    A character string.
   

Description:

DC_BROWPICK() is used to pick the name of a browse
configuration from the DCBROWSE.DBF browse dictionary.


Examples:

    cBrowName := DC_BROWPICK()
   
IF !Empty(cBrowName)
aBrowse := DC_BrowLoad( cBrowName )
ENDIF




Source/Library:

_DCBROW4.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browload()
dc_browsedb()
BROWSE

dc_browrela()

Invoke a One-to-many, relational, tiled browse

Syntax:



Arguments:

    (nMode) is an optional argument for defining the method to
   
display the browse windows being opened for the relational
browsing.

nMode

1 Four windows ( screen split in half vertically and
horizonally )
2 Four windows ( screen split horizontally )
3 Three windows ( screen split horizontally )
4 Two windows ( screen split vertically )
5 Two windows ( screen split horizontally )
6 Six windows ( three across / two down )

If no (nMode) argument is given, then a set of windows will
automatically be created in a "best-fit" screen configuration.

(aBrowArray) is a multi-dimensional array with the following
structure:

Element Type Description
------- --------- -------------------------------------------
[1] Character Alias name of the primary file.
[2] Character Alias name of a relational file.
[3] Character Name of a field common to both databases
for establishing the relationship (optional).
If no argument is given then the index key
of the relational file will be used as the
relational key.

Each relation requires a separate sub-array.

(lKeepCurrent) if .TRUE. will keep the existing browse
configuration and not resize the window(s).

Returns:

    NIL
   

Description:

DC_BROWRELA() provides a One-To-Many browse configuration for
browsing multiple databases with common key fields. The child
windows will display only the records that match the key value
passed by the primary window.

Relational windows will automatically be updated as the record
pointer is moved through the primary window. The TAB key can
be used at any time to select any window and make updates or
configure the view of data.

Examples:

    The following example demonstrates how DC_BROWRELA() can be
   
used to open 3 windows into a CUSTOMER, INVOICE, and INVITEMS
database to monitor invoices for selected customers.

The CUSTOMER and INVOICE databases contain a common field named
CUST_NMBR. The INVOICE and INVITEMS databases contain a common
field named INV_NMBR.

To create a relational browse enter the following commands:

use customer
use invoice new
index on cust_nmbr to invoice
use invitems new
index on inv_nmbr to invitems
DC_BROWRELA( ,{ {'CUSTOMER','INVOICE'},{'INVOICE','INVITEMS'} } )

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

BROWSE RELATION
BROWSE TILE
BROWSE
dc_browsedb()

dc_browrestore()

Restore and execute a Browse configuration

Syntax:



Arguments:

    (aBrowse) is a browse-definition array that conforms to the
   
specifications documented in ARGUMENTS of DC_BROWSAVE().

or

(cBrowse) is the "tag name" of a browse configuration that
was previously stored in the DCBROWSE.DBF dictionary.

(lWorkRestore) if .TRUE. (default) will also restore any
work areas if a FILES tag is included in the (aBrowse)
array. If .FALSE. then it is assumed that the files
associated with this browse configuration are already open.

(lBackground) if .TRUE. (default) will display a background
screen that will fill the entire screen area. This is the
same background displayed when using the BROWSE command.
If .FALSE. then the browse screen will be displayed over
any existing screen.

(lPickRec) if .TRUE. will establish the browse mode as
"PICKLIST" style which allows the operator only to search
for records and then return from the browse when the
operator hits the ENTER key or double-clicks the mouse on
a record.

(lPickEdit) if .TRUE. will establish the browse mode as
"PICKLIST" style (same as (lPickRec)) except that the user
is allowed to edit or append records from a menu selection.

(lSaveKeys) if .TRUE. will save all SET KEYS, then clear
them and restore them after returning from the Browse.

(lNoOne2Many) if .TRUE. will display ALL records even if the
work area selected is a child of another work-area.

(lProtect) if .TRUE. will protect records from being modified
by the user.





Returns:

    NIL
   

Description:

DC_BROWRESTORE() is used to restore a browse configuration
that was previously saved with DC_BROWSOURCE(). These
functions are used to capture the configuration of a single
browse work area or all browse work areas.

Examples:

    (-- Design and Save the Browse Configuration --)
   

/* -- Open databases -- */
OpenData()

/* -- design browse windows to fit requirements -- */
dc_browrela()

/* -- save browse configuration to source-code -- */
dc_browsave() // Save to MYBROWSE()

RETURN



(-- Compile and Run the new Browse Configuration --)

/* -- compile and link new source-code -- */

/* -- Run browse configuration in new .EXE -- */
OpenData()
DC_BROWRESTORE( MyBrowse() )
RETURN



FUNCTION OpenData()
use customer
use invoice new index invoice
use invitems new index invitems
select customer
set relation to cust_nmbr into invoice
select invoice
set relation to inv_nmbr into invitems
RETURN nil

Source/Library:

_DCBROW4.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsave()
dc_browsedb()
BROWSE

dc_browsave()

Save a browse array to dictionary, array file or source code

Syntax:



Arguments:

    (aBrowse) is an array of 2 sub-arrays:
   

Sub-Array #1 is an array of options:

Element Type Description
------- ---- -----------------------------------
1 C Browse Tag Name (up to 10 chars)
2 C Browse Files Tag Name (up to 8 chars)
used for opening files when restoring
browse.
3 C Browse Menu Tag Name (up to 8 chars)
used for restoring a specified menu.
4 C Browse Keys Tag Name (up to 8 chars)
used for restoring a set of keys.
5 C Description (up to 50 chars)

The elements in Sub-array #1 will be edited by the user
before saving the browse configuration. If no array is
passed, then the user will be given blanks to fill out.
If no FILES, MENU or KEYS tags are entered by the user, the
BROWSE configuration will be restored with default
conditions.


Sub-array #2 consists of a sub-array containing the browse
configuration for each work area.

Each browse configuration array consists of 2 sub-arrays:

Sub-sub-array #1 is an array of general options for the
browse configuration. See DCBROW.CH for the definitions of
this array.

Sub-sub-array #2 is an array consisting of one field-array for
each browse column. See DCFIELDS.CH for the definition of the
Fields sub-array.


(cSaveMode) is a character string of up to 3 characters to
establish the default save mode. Include 1 character for
each mode to save.

D - Save to DCBROWSE.DBF dictionary
A - Save to a *.DBR array file
S - Save to source code

(lGets) if .TRUE. (default) will allow the operator to
edit the save parameters or abort the operation. If .FALSE.,
then the browse configuration will be saved.

(lMessage) if .TRUE. (default) will display a message if the
browse configuration already exists in the dictionary and allow
the operator to abort the save. If .FALSE. the browse will be
overwritten if it already exists.

(nArea) is the work area of the browse configuration to save.
If this parameter is not passed, then the currently selected
work area is the default.

Returns:

    A logical .TRUE. if the configuration was successfully saved,
   
.FALSE. otherwise.

Description:

DC_BROWSAVE() is used to save a browse configuration to
the DCBROWSE.DBF dictionary file, a *.DBR array file or
source-code or any combination.

Browse configurations, when saved, may also included a
TAG reference to a set of FILES for restoring work areas,
a MENU and/or a set of KEYS. This allows for completely
restoring a browse configuration at a later time from the
browse dictionary, an array file or by running a function
saved as source code.

Examples:

    use customer
   
dc_browsedb() // create dCBROWSE array configuration
aBrowse := {{},dCBROWSE }
DC_BROWSAVE( aBrowse )

Source/Library:

_DCBROW4.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browload
dc_browrestore()
dc_browsedb()
BROWSE

dc_browscan()

Merge a Browse-view and Edit-view window on the screen

Syntax:



Arguments:

    (cFieldName) is the name of a reference field to browse on
   
the left third of the screen. If no argument is passed,
then the first database field will be displayed as the
starting field.

Returns:

    NIL
   

Description:

DC_BROWSCAN() is a database browser that allows a full-screen
view of all fields of the current record on the right two-thirds
of the screen while moving through records in a record browser
on the left one-third of the screen. This is a handy method
of viewing data in both full-screen edit mode and and browse
mode at the same time.

Examples:

    use customer
   
DC_SCAN('ZIP_CODE')

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()
BROWSE
dc_editdb()
EDIT

dc_browse()

Invoke a full-screen browse of current work area

Syntax:



Arguments:

    (lProtect) if .TRUE. will protect the contents of the workarea
   
from being modified by the user. Default is .FALSE.

(cUdfName) is the name of a user-defined function to call
between keystrokes.

(cField1) - (cFieldN) are the names of the fields to browse.

Returns:

    NIL
   

Description:

DC_BROWSE() is provided for compatability with previous
versions of dCLIP. DC_BROWSE() will always re-build the browse
array for the current work area using the entire screen. For
more functionality it is recommended that you use
DC_BROWSEDB().

Examples:

    USE CUSTOMER
   
DC_BROWSE()

Source/Library:

_DCBROW.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()
BROWSE

dc_browsedb()

Invoke a multi-window browse of all work areas

Syntax:



Arguments:

    (aOptions) is an array of parameters to define the size and
   
style of the browse window.

Element Type Description
------- ---- ---------------------------------------------
[ 1] L .t. - Pick-list operation. Will only display
menu options for window configuration and
searching for a record. Use this mode
when you want the user to choose a field
and/or record and exit with the RETURN key.
.f. - Normal operation. (default).
[ 2] L .t. - Protect data from being changed by user
.f. - Allow data modification ( Default )
[ 3] N Start Display Row ( 0 is default )
[ 4] N Start Display Column ( 0 is default )
[ 5] N End Display Row ( 24 is default )
[ 6] N End Display Column ( 79 is default )
[ 7] L .t. - Display File Data at bottom of window
.f. - Don't Display File Data ( Default )
[ 8] L .t. - Don't display a shadow around the window
.f. - Display a shadow around window ( Default )
[ 9] L .t. - Display a record number column ( Default )
.f. - Don't display record numbers
[10] L .t. - Set the TAB for this window ( Default )
.f. - Don't set the TAB
[11] L .t. - Automatic update of Relational Windows
.f. - Don't update Relational Windows ( Default )
[12] L .t. - One-To-Many Browse configuration
.f. - Standard configuration ( Default )
[13] L .t. - Sticky-Browse mode ON
.f. - Sticky-Browse mode OFF ( Default )
[14] L .t. - Display all child relational fields (Default)
.f. - Don't display child fields
[15] L .t. - Automatic update of Full-screen edit window
.f. - Don't update Edit window (Default)
[16] L .t. - Display a Record Tagging Column.
[17] N Inkey value of keyboard key to use for record
tagging with [16] is .TRUE. Default is SPACE BAR
(32)
[18] L .t. - Fast Paint option. Paints browse screens
faster if they contain long memo fields. This
option will not display memo fields with the
capitalized "MEMO" when they are not empty.
.f. - Display "MEMO" when memo fields are not empty
otherwise display "memo". (Default)
[19] L .t. - Display totals at the bottom of all numeric
columns. This option can take a long time to
start-up the browse while totals are being
calculated.
.f. - Don't display totals. (Default)
[20] L .t. - Display menu bar at the top of the physical
screen (Row 0, Column 0)
.f. - Display menu bar at the top of the browse
window (Default).
[21] L .t. - PICK-EDIT mode. In this mode, pressing the
ENTER key will exit the browse with the record
pointer at the selected record. This is
different than PICK-LIST mode above, however,
because this option still allows editing by
selecting ADD or EDIT from the menus.
.f. - ENTER key will edit currently selected field.

[22] L .t. - AUTOSEEK mode. Overrides setting of Autoseek
that was saved in Browse configuration.

(aFields) is a 2-dimensional array of field names and headings.
If this argument is not passed, then all fields will appear in
the display with the field name used as the heading. There
should be one element in the second array for each element in
the first array.

Example:

{ { 'CUST_NAME','CUST_NMBR','STREET1','CITY','STATE','ZIP' }, ;
{ 'Customer;Name','Number','Street','City','State','Zip' } }

Note: Use semicolon (;) character(s) in the heading to break the
heading display into multiple rows.


(cUdfName) is the name of a User-Defined Function to call
after each keystroke.

(lExit) if .TRUE. will paint the display and items on the
screen then return. .FALSE. is Default.

(lReSize) if .TRUE. will simply resize the browse window to
the new coordinates passed in (aOptions) and not affect the
previous browse configuration.

(lRestoreScreen) if .TRUE. (default) will restore the screen
upon exiting the browse, otherwise all the browse screens
will remain on the display.

(cConfigFile) is the name of a *.DBR file to use as the
browse configuration. A *.DBR file is created by the
"Save Configuration to a File" selection from the FILES
menu after configuring the browse screen as desired. If no
path is included in the file name, then the file must exist
in the same directory as the currently selected database.

(lEditDb) if .TRUE. will automatically paint a full-screen
EDIT window and update it every time the record pointer
changes in the browse window. Use this parameter when you
want to see both a full-screen edit view and a browse view
at the same time. Using this parameter is the same as
selecting "Automatic Update of Edit Window ON" from the
VIEW menu. The default is .FALSE. or OFF.

(lProtect) if .TRUE. will protect the database from being
modified by the user. The default is .FALSE.

(aMenu) is an optional array which is used to replace the
default Browse pull-down menus. The menu array must conform
to the specification of the array returned by the
function DC_MENUEDIT() or DC_MENULOAD(). If (aMenu) is
a character string, then the string must contain the
NAME of the menu as contained in the menu dictionary file
(DCMENU.DBF).

(aKeys) is an optional array which is used to replace, add
or delete hot-keys from the Browse defaults. The key array
must conform to the specification of the array returned by
the function DC_KEYEDIT() or DC_KEYLOAD(). If (aKeys) is
a character string, then the string must contain the
NAME of the key-set as contained in the key dictionary file
(DCKEY.DBF).

(aMouse) is an optional array which is used to add to the
default mouse-actions. The mouse array must conform
to the specification of the array defined for use by the
function DC_MOUSEKEYS() or returned by the function
DC_MOUSEEDIT() or DC_MOUSELOAD(). If (aMouse) is a
character string, then the string must contain the
NAME of the mouse-set as contained in the mouse dictionary
file (DCMOUSE.DBF).

(lBackGround) if .TRUE. (default) will paint a default
background and all browse screens for all work areas. If
.FALSE., then only the browse screen for the current work
area will be displayed over the existing screen.

Returns:

    NIL
   

Description:

DC_BROWSEDB() is a Multi-Window database browsing system that
can be used as a complete menu-driven DBMS. DC_BROWSEDB() is
the base system for all dCLIP browsing features. This is an
array-driven system, ie, a multi-dimensional array ( DCBROWSE )
object is used to store all the parameters for all work areas.

DC_BROWSEDB() supports a complete set of menus and options:
Edit, View, File, Search, Print, Utilities, etc. The dCLIP
browse system supports the following features:

1. Cut and Paste
2. Keyboard Macros
3. User-configuration
4. Multi-window browsing
5. Relational browsing
6. Sticky browsing
7. Pick-list operation

See the section titled BROWSE for a complete description of how
to use the DC_BROWSEDB() function.

Notes:

See DC_BROWVALUE() for the dCBROWSE array API.

Examples:

    use customer
   
DC_BROWSEDB()
use invoice new
DC_BROWSEDB( { , , 0, 0, 24, 39 } )
use invitems new
set relation to inv_nmbr into invoice
DC_BROWSEDB( { , , 0, 40, 24, 79, , , .t., .f., , .t., .t. } )

Source/Library:

_DCBROW.PRG/.OBJ, DCLIP.LIB

See Also:

OVERVIEW
BROWSE

dc_browsource()

Write Multiple-Window Browse configuration to source code

Syntax:



Arguments:

    None.
   

Returns:

    Nil
   

Description:

DC_BROWSOURCE() is used to write the contents of the browse
arrays to source code for compiling and linking into an
application. The generated source code will create a
function that can be called in an application. This
function will return an array containing all information
about the browse-windows including window sizes, columns,
options, headings, and relational update information.
The array can then be passed to DC_BROWRESTORE() to run
the browse.

DC_BROWSOURCE() makes designing of relational browsing
systems very simple and also provides the option of
saving the browse configuration to an ARRAY file rather
than source code. This eliminates the need to compile
the browse configuration but instead allows the user to
restore the configuration on-the-fly from a file.

When used in conjuction with DC_BROWMENU(), a browse
configuration can be restored that will also include custom
menu selections or even a complete replacement to the default
menu.

Examples:

    (-- Design and Save the Browse Configuration --)
   

/* -- Open databases -- */
OpenData()

/* -- design browse windows to fit requirements -- */
dc_browrela()

/* -- save browse configuration to source-code -- */
DC_BROWSOURCE() // Save to MYBROWSE()

RETURN



(-- Compile and Run the new Browse Configuration --)

/* -- compile and link new source-code -- */

/* -- Run browse configuration in new .EXE -- */
OpenData()
DC_BrowRestore( MyBrowse() )
RETURN



FUNCTION OpenData()
use customer
use invoice new index invoice
use invitems new index invitems
select customer
set relation to cust_nmbr into invoice
select invoice
set relation to inv_nmbr into invitems
RETURN nil

Source/Library:

_DCBROW3.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browrestore()
dc_browsave()
dc_browsedb()
BROWSE

dc_browtile()

Invoke set of browse windows for specified list of work areas

Syntax:



Arguments:

    (nMode) is an optional argument for defining the method to
   
display the browse windows being opened for the relational
browsing.

nMode

1 Four windows ( screen split in half vertically and
horizonally )
2 Four windows ( screen split horizontally )
3 Three windows ( screen split horizontally )
4 Two windows ( screen split vertically )
5 Two windows ( screen split horizontally )
6 Six windows ( three across / two down )

If no (nMode) argument is given, then a set of windows will
automatically be created in a "best-fit" screen configuration.

(aAlias) is an array of database ALIASes to browse. If no
array argument is passed, then all open work areas will be
included in the tile browse.

(lBrowse) if .TRUE. (default) will initiate the browse (apply
focus to first browse window) after painting all the browse
windows on the screen. If .FALSE., then the browse windows
will be created and painted only.

(lOneToMany) if .TRUE. will establish all work areas that have
relations as One-To-Many relations. In "One-To-Many" mode,
each "parent" work area passes its current value to the
associated "child" work area to display only the child records
that match the parent value.

(lEditDb) if .TRUE. will also display full-screen edit windows.

(lCascade) if .TRUE. will paint the windows in overlapping
"cascade" fashion.

(aConfig) is a configuration array defining the menus at the top
of the browse windows. See DC_BROWSEDB() for the specifications.

Description:

DC_BROWTILE() is a front-end to DC_BROWSEDB() that creates
multiple browse windows.

"Tile-Browsing" is a term describing the placement of multiple
browse windows in the display in a "pattern" to work with
several databases at the same time. Use tile-browsing to
establish one-to-many relations, to facilitate cut-and-paste
operations between several databases, or to simply make it
easier to monitor data in several work areas at the same time.

Examples:

    . use all like DC*
   
. DC_BROWTILE()
. close all
. use all
. DC_BROWTILE( 3, { 'CUSTOMER','INVOICE','SALES' } )

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

BROWSE TILE
BROWSE
dc_browsedb()
BROWSE RELATION

dc_browvalue()

Get the value of an instance variable from the browse array

Syntax:



Arguments:

    (nArea) is the browse work area.  If argument is not passed,
   
then the current work area is default.

(nValue) is the browse array object value to return or modify.

nValue Type Description
------ ---- -------------------------------------------
1 N Start Display Row of Browse Display
2 N Start Display Column of Browse Display
3 N End Row of Browse Display
4 N End Column of Browse Display
5 N First Field Column Displayed
6 N Current record pointer
7 L .t. - Display file data
8 L .t. - Protect data from being modified
9 N Default column width ( 0 - dynamic )
10 C Currently selected Field Name
11 L .t. - Repaint screen
12 N Currently selected Data Row
13 N Top record of database
14 N Bottom record of database
15 L .t. - Are we in the top page?
16 L .t. - Are we in the bottom page?
17 Any Currently displayed field value
18 L .t. - Repaint the screen
19 L .t. - Reedit flag
20 L .t. - Display Record Number column
21 C Last selected condition expression
22 C Last locate string
23 C This window alias name
24 C Current relation
25 N Row number of locked column
26 L .t. - Scroll Down Flag
27 L .t. - Scroll Up Flag
28 L .t. - Flag to repaint items
29 N Number of keys in active index
30 L .t. - Update all Relational Browse windows
31 C File Name of Current database
32 N Top Displayed Record
33 N Total fields including relations
34 N Selected field number
35 L .t. - Rebuild field arrays
36 C Last key hit char value
37 N Last key hit inkey value
38 U Reserved
39 L .t. - Append mode
40 C Index Tag Information String
41 C Index Tag Filter Condition
42 C Parent Alias name
43 N Last alias updated pointer
44 N Current Browse Item Column
45 N Last displayed browse column
46 C This window index key expression
47 C This window data filter
48 C File Name of Current Index
49 C Screen Image of Current Window
50 N Current Screen Row
51 N Current Screen Column
52 N This Work Area Record Count
53 N This Work Area Field Count
54 L Explode the screen on next repaint
55 U Reserved
56 L .t. - One-To-Many browse mode flag
57 C 1 to many relational value
58 L .t. - Zoom display to full screen
59 N Record Marker
60 N Field Marker
61 L .t. - Don't paint a shadow
62 L .t. - Window TAB set
63 C Macro expression
64 C Box heading
65 C Column lines (save screen for speed)
66 N Color Palette number
67 C Keyboard macro - Alt K
68 C Append Mode Code
69 C Default Label Form
70 C Default Report Form

(xWriteValue) is an optional parameter. If not passed or NIL
then the contents of (nValue) are not modified. If any other
value the browse contents is changed to the contents of
(xWriteValue).

Returns:

    The value of the Browse array element pointed to by (nArea) and
   
(nValue).

Description:

DC_BROWVALUE() is used to query or modify the value of any
instance variable in the browse array. This function allows
you full control of all browse screens.

Examples:

    use sales
   
use customer new
dc_browtile()
? DC_BROWVALUE(1,10) // display selected field name (area 1)
EXPENSES
? DC_BROWVALUE(2,10) // display selected field name (area 2)
CUST_NMBR

Source/Library:

_DCBROW2.PRG/.OBJ, DCLIP.LIB

See Also:

dc_browsedb()
BROWSE

dc_capfirst()

Capitalize the first letter of each word in a string

Syntax:



Arguments:

    (cString) is the string to Capitalize.
   

Returns:

    A character string.
   

Description:

DC_CAPFIRST() will capitalize the first letter of each word in
a string. Names starting with "Mc" and "O'" will also be
properly capitalized.

Examples:

    . use customer
   
. ? cust_name
COMPUTER ASSOCIATES
. replace cust_name with DC_CAPFIRST(cust_name)
. ? cust_name
Computer Associates
. replace all cust_name with DC_CAPFIRST(cust_name)
. ? DC_CAPFIRST("mcdonald and o'brien")
McDonald And O'Brien

Source/Library:

_DCCAPF.PRG/.OBJ, DCLIP.LIB

dc_cdxext()

Return default extension of a combined index

Syntax:



Arguments:

    (cRdd) is the name of the replaceable data driver.  If no
   
argument is given, then the currently selected RDD will be
used.

(cFileName) is an optional parameter provided for
convenience only. If the file name contains an extension,
then the extension in the file name will be returned.

Returns:

    A character string.
   

Description:

DC_CDXEXT() returns the default value of the index file name
extension for the selected database driver or any specified
database driver for combined indexes.

Examples:

    -- Example 1 --
   

set rdd to DBFCDX
? DC_CDXEXT()
.CDX
? DC_CDXEXT('SIXCDX')
.CDX


-- Example 2 --

set rdd to SIXCDX
accept 'Enter new index to create' to cIndex
if file( trim( cIndex ) + DC_CDXEXT() )
? "File already exists"
else
dc_crindex( cIndex )
endif

Source/Library:

_DCDBFX.PRG/.OBJ, DCLIP.LIB

dc_cgierror()

Standard CGI system error handler

Syntax:



Arguments:

    None.
   

Returns:

    A character string.
   

Description:

DC_CGIERROR() is a custom error handler for CGI programs.
When an error occurs in a CGI program it must terminate the
program so it will not use up all the resources on the Web
Server. DC_CGIERROR() insures that error information is
automatically sent back to the web browser rather than locking
up the DOS CGI session.

Examples:

    -- Example 1 --
   

FUNCTION Main()

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )

/* --- Send response back to the Http Server ---- */
DC_CGIHead( )

lError := Date() * Time() // This will generate an error

DC_CgiSend('(HEAD)(/HEAD)')
DC_CgiSend('(BODY BACKGROUND="/backgrnd.gif" TEXT="#000000"')
DC_CgiSend('Thank you for visiting our web site.')
DC_CgiSend('(/BODY)(/HTML)')
QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

dc_cgigetenvval()

Get the value of a CGI environment setting

Syntax:



Arguments:

    (cEnvVar) is the name of the environment variable data to
   
retrieve. The Manifest constants for environment variable types
is included in DCCGI.CH. They are listed below:

AUTH_TYPE
CONTENT_LENGTH
CONTENT_TYPE
GATEWAY_INTERFACE
HTTP_USER_AGENT
HTTP_ACCEPT
HTTP_FROM
PATH_INFO
PATH_TRANSLATED
QUERY_STRING
REFERER_URL
REMOTE_ADDR
REMOTE_HOST
REMOTE_IDENT
REMOTE_USER
REQUEST_METHOD
SCRIPT_NAME
SERVER_NAME
SERVER_PORT
SERVER_PROTOCOL
SERVER_SOFTWARE
SERVER_ADMIN
GMT_OFFSET
HTTP_REFERRER

Returns:

    A character string.
   

Description:

DC_CGIGETENVVAL() is used to get the data pointed to by an
environment variable. All data is passed from the Web Browser
to the CGI program via the Web Server as DOS environment variables.

Notes:

DC_CGIINIT() and DC_CGIREAD() must be called first before using
this function.

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    #include "DCCGI.CH"
   

IF DC_CGIGetEnvVal(REQUEST_METHOD) = "POST"
nContentLength := Val(DC_CGIGetEnvVal(CONTENT_LENGTH))
cInputString := FREADSTR( STD_IN, nContentLength )
ELSE
cInputString := DC_CGIGetEnvVal(QUERY_STRING)
ENDIF

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiread()

dc_cgigetparmval()

Get the value of a "POST" or "GET" parameter

Syntax:



Arguments:

    (cVarName) is the name of the variable passed from the Web
   
Browser. This is case sensitive.

Returns:

    A character string.
   

Description:

DC_CGIGETPARMVAL() is used to get the data that is passed from
a web browser when calling a CGI program. The data is passed
either as a URL-encoded string of data stored in the QUERY_STRING
environment variable GETENV("QUERY_STRING") or as a POST method
which is passed from the Web Server via the STANDARD INPUT device
(FREADSTR(STD_IN)).

All data is passed in delimeted form and is decoded and stored
(by name) in a static array with DC_CGIINIT() and DC_CGIREAD().
DC_CGIGETPARMVAL() is used to extract the data from the static
array by it's variable name.

Notes:

DC_CGIINIT() and DC_CGIREAD() must be called first before using
this function.

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    -- Example 1 --
   

STEP 1

Data is passed from the web browser to the CGI program as a URL:

http://www.dclip.com/cgi-dos/webbbs.exe?login=RDONNAY&password=DCLIP


STEP 2

Data is received by the Web Server and passed to the CGI program
in the QUERY_STRING environment variable. The CGI program
WEBBBS.EXE (a Clipper program) is called by the web browser.
This program looks like this:

#include "DCCGI.CH"

FUNCTION Main()

LOCAL cLogin, cPassword

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )


/* ---- Initialize (aEnvVals) ---- */
DC_CGIInit()

/* ---- Read the Passed Variables into (aParams) ---- */
DC_CGIRead()


/* --- Send response back to the Http Server ---- */
DC_CGIHead( )
BEGIN HTML
SEND '(HEAD)(/HEAD)'
SEND '(BODY BACKGROUND="/backgrnd.gif" TEXT="#000000"'
SEND 'LINK="#008000" VLINK="#800000")'

DO CASE

CASE !Empty(DC_CGIGETPARMVAL( "login", @cLogin ) .AND. ;
!Empty(DC_CGIGETPARMVAL( "password", @cPassword )

USE BBSUSERS INDEX BBSUSERS
SEEK cLogin
IF !Eof() .AND. BBSUSERS-)password = cPassword
SEND 'Thank you ' + BBSUSERS-)name + ' for visiting us.'
ELSEIF !Eof()
SEND 'Invalid Password. Click your back button and re-enter'
ELSE
SEND 'Invalid User ID. Click your back button and re-enter'
ENDIF

OTHERWISE

SEND 'Your browser called CGI program with invalid parameters'

ENDCASE

END BODY
END HTML
QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiinit()
dc_cgiread()

dc_cgigetvarparm()

Determine if a parameter was passed to the CGI program

Syntax:



Arguments:

    (cVarName) is the name of the variable passed from the Web
   
Browser. This is case sensitive.

Returns:

    A character string equal to (cVarName) if the variable was
   
passed otherwise a null string.

Description:

DC_CGIGETVARPARM() is used to determine whether or not a parameter
was passed from the Web Browser to the CGI program.

Notes:

DC_CGIINIT() and DC_CGIREAD() must be called first before using
this function.

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    -- Example 1 --
   

STEP 1

Data is passed from the web browser to the CGI program as a URL:

http://www.dclip.com/cgi-dos/webbbs.exe?login=RDONNAY&password=DCLIP


STEP 2

Data is received by the Web Server and passed to the CGI program
in the QUERY_STRING environment variable. The CGI program
WEBBBS.EXE (a Clipper program) is called by the web browser.
This program looks like this:

#include "DCCGI.CH"

FUNCTION Main()

LOCAL cLogin, cPassword

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )


/* ---- Initialize (aEnvVals) ---- */
DC_CGIInit()

/* ---- Read the Passed Variables into (aParams) ---- */
DC_CGIRead()


/* --- Send response back to the Http Server ---- */
DC_CGIHead( )
BEGIN HTML

DO CASE

CASE Empty(DC_CGIVARPARM( "login")
SEND 'You did not send a "login" parameter'

CASE(Empty(DC_CGIVARPARM( "password" )
SEND 'You did not send a "password" parameter'

OTHERWISE
SEND 'Thank you for the "login" and "password" parameters'

ENDCASE

END BODY
END HTML
QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgigetparmval()
dc_cgiinit()
dc_cgiread()

dc_cgiheader()

Send an HTML "header" response to the Web Browser

Syntax:



Arguments:

    (aHeader) is an optional array of characters strings to send in
   
the header. Some Web Servers support features that are invoked
by data in the header response, such as "redirecting", setting
of "cookies", etc. This type of reponse is included in the
array.

Returns:

    A character string.
   

Description:

DC_CGIHEADER() is used to send an "HTML header" response to
the Web Browser via the Web Server. CGI programs must start
all HTML response with a correct header or the Web browser
will not recognize the response as HTML.

Notes:

DC_CCIHEADER() must be called at the beginning of the CGI
program after first calling DC_CGIINIT() and DC_CGIREAD().

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    #include "DCCGI.CH"
   

FUNCTION Main()

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )

/* ---- Initialize (aEnvVals) ---- */
DC_CGIInit()

/* ---- Read the Passed Variables into (aParams) ---- */
DC_CGIRead()


/* --- Send response back to the Http Server ---- */
DC_CGIHEADER( )

DC_CgiSend('(HTML)')
DC_CgiSend('(HEAD)(/HEAD)')
DC_CgiSend('(BODY BACKGROUND="/backgrnd.gif" TEXT="#000000"')
DC_CgiSend('Thank you for visiting our web site.')
DC_CgiSend('(/BODY)(/HTML)')
QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiinit()
dc_cgiread()

dc_cgiinit()

Initialize the CGI system

Syntax:



Arguments:

    None.
   

Returns:

    A logical .TRUE. if everything initialized properly.
   

Description:

DC_CGIINIT() should be called at the beginning of every CGI
program to initialize the CGI arrays to prepare them for
reading in the passed parameters from the web browser.

Notes:

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiread()

dc_cgiparamarray()

Return an array of all "POST" or "GET" parameters

Syntax:



Arguments:

    None.
   

Returns:

    A 2-dimensional array.
   

Description:

DC_CGIPARAMARRAY() is used to return a 2-dimensional array that
contains all the parameters passed from the web browser to the
CGI program. Each array element consists of two sub-elements:

[1] - The name of the passed parameter.
[2] - The value of the passed parameter.

Notes:

DC_CGIINIT() and DC_CGIREAD() must be called first before using
this function.

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    -- Example 1 --
   

STEP 1

Data is passed from the web browser to the CGI program as a URL:

http://www.dclip.com/cgi-dos/webbbs.exe?login=RDONNAY&password=DCLIP


STEP 2

Data is received by the Web Server and passed to the CGI program
in the QUERY_STRING environment variable. The CGI program
WEBBBS.EXE (a Clipper program) is called by the web browser.
This program looks like this:

#include "DCCGI.CH"

FUNCTION Main()

LOCAL cLogin, cPassword

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )

/* ---- Initialize (aEnvVals) ---- */
DC_CGIInit()

/* ---- Read the Passed Variables into (aParams) ---- */
DC_CGIRead()


/* --- Send response back to the Http Server ---- */
DC_CGIHead( )
BEGIN HTML

aArray := DC_CGIPARMARRAY()
IF Len(aArray) # 2
SEND 'You must send at least two parameters'
ENDIF
aArray := DC_AConvert(aArray)
SENDBR 'Here is what you sent:'
DC_CGIAsend( aArray[1] )
DC_CGIAsend( aArray[2] )

QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiinit()
dc_cgiread()

dc_cgiread()

Read all "POST" URL-encoded variables into a static array

Syntax:



Arguments:

    None.
   

Returns:

    A logical .TRUE. if everything initialized properly.
   

Description:

DC_CGIREAD() should be called at the beginning of every CGI
program, after calling DC_CGIINIT() to read the passed parameters
from the web browser into a static array.

Parameters are passed as environment variables to DOS CGI
programs from the Web Server. DC_CGIREAD() gets the environment
variable data, decodes the data and stores it in a static array
for later retreiving with DC_CGIGETPARMVAL().

Notes:

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgigetparmval()

dc_cgisend()

Send an HTML response to the Web Browser

Syntax:



Arguments:

    (cString) is the response to send to the Web browser.
   

Returns:

    A character string.
   

Description:

DC_CGISEND() is used to send data to the Web Browser via the
Web Server. CGI DOS programs use the "Standard Output" method
of sending data to the Web Browser via the Web Server by
writing to STD_OUT with the FWRITE() function. DC_CGISEND()
simply uses FWRITE(STD_OUT,(text)) to send the output. The web
server retrieves the output and stores it in a file. When the
CGI program quits, the file is closed and the contents are
sent from the Web Server to the Web Browser.

Notes:

There are a variety of commands in DCCGI.CH that are pre-processed
to send HTML tags via DC_CGISEND(). It is recommend that you use
these commands instead of the DC_CGISEND() function.

BEGIN HTML
END HTML
BEGIN BODY
END BODY
LINE BREAK
BEGIN TABLE
END TABLE
BEGIN TABLE ROW
END TABLE ROW
HORZ LINE
SENDNOCRBR (text
SENDNOCR (text)
SENDBR (text)
SEND (text)

DC_CGIINIT() and DC_CGIREAD() must be called first before using
this function.

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    -- Example 1 --
   

STEP 1

Data is passed from the web browser to the CGI program as a URL:

http://www.dclip.com/cgi-dos/webbbs.exe?login=RDONNAY&password=DCLIP


STEP 2

Data is received by the Web Server and passed to the CGI program
in the QUERY_STRING environment variable. The CGI program
WEBBBS.EXE (a Clipper program) is called by the web browser.
This program looks like this:

#include "DCCGI.CH"

FUNCTION Main()

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )

/* ---- Initialize (aEnvVals) ---- */
DC_CGIInit()

/* ---- Read the Passed Variables into (aParams) ---- */
DC_CGIRead()


/* --- Send response back to the Http Server ---- */
DC_CGIHead( )
DC_CgiSend('(HTML)')
DC_CgiSend('(HEAD)(/HEAD)')
DC_CgiSend('(BODY BACKGROUND="/backgrnd.gif" TEXT="#000000"')
DC_CgiSend('Thank you for visiting our web site.')
DC_CgiSend('(/BODY)(/HTML)')
QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiinit()
dc_cgiread()

dc_cgitable()

Send an HTML "TABLE" of information to the Web Browser

Syntax:



Arguments:

    (aData) is a 2-dimensional array of Rows and Columns of data.
   
Each array element must contain a character string.

(aHeader) is an optional 1-dimensional array of headers for the
table. This array should be the same length as each sub-array
(columns) in (aData).

(cType) is a single character designating the type of table
to create with the data:

A - A Standard row/column format.

B - Data is grouped with each sub-array of information displayed
in lines rather than columns.

(nBorder) is the size of the border around the table. See HTML
specifications. 0 - no border, 1 - 1 pixel, etc. Default is
1 for type "A" tables, 0 for any other type.

(nCellPadding) is the amount of pixels of padding to use in the
table cells.

Returns:

    A character string.
   

Description:

DC_CGISEND() is used to send data to the Web Browser via the
Web Server. CGI DOS programs use the "Standard Output" method
of sending data to the Web Browser via the Web Server by
writing to STD_OUT with the FWRITE() function. DC_CGISEND()
simply uses FWRITE(STD_OUT,(text)) to send the output. The web
server retrieves the output and stores it in a file. When the
CGI program quits, the file is closed and the contents are
sent from the Web Server to the Web Browser.

Notes:

There are a variety of commands in DCCGI.CH that are pre-processed
to send HTML tags via DC_CGISEND(). It is recommend that you use
these commands instead of the DC_CGISEND() function.

BEGIN HTML
END HTML
BEGIN BODY
END BODY
LINE BREAK
BEGIN TABLE
END TABLE
BEGIN TABLE ROW
END TABLE ROW
HORZ LINE
SENDNOCRBR (text
SENDNOCR (text)
SENDBR (text)
SEND (text)

DC_CGIINIT() and DC_CGIREAD() must be called first before using
this function.

CGI functions are used to handle CGI requests from a Web Server.
These functions are compatable with DOS CGI standards. With these
functions, the dCLIP engine (or library) can be used as a forms or
query processor for HTML Web Pages. This code has been tested with
Website 1.1e. (http://www.ora.com)

Examples:

    -- Example 1 --
   

STEP 1

Data is passed from the web browser to the CGI program as a URL:

http://www.dclip.com/cgi-dos/webbbs.exe?login=RDONNAY&password=DCLIP


STEP 2

Data is received by the Web Server and passed to the CGI program
in the QUERY_STRING environment variable. The CGI program
WEBBBS.EXE (a Clipper program) is called by the web browser.
This program looks like this:

#include "DCCGI.CH"

FUNCTION Main()

// Initialize error handler
ERRORBLOCK( {|e| DC_CGIError(e)} )

/* ---- Initialize (aEnvVals) ---- */
DC_CGIInit()

/* ---- Read the Passed Variables into (aParams) ---- */
DC_CGIRead()


/* --- Send response back to the Http Server ---- */
DC_CGIHead( )
DC_CgiSend('(HTML)')
DC_CgiSend('(HEAD)(/HEAD)')
DC_CgiSend('(BODY BACKGROUND="/backgrnd.gif" TEXT="#000000"')
DC_CgiSend('Thank you for visiting our web site.')
DC_CgiSend('(/BODY)(/HTML)')
QUIT

Source/Library:

_DCCGI.PRG, DCLIP.LIB

See Also:

dc_cgiinit()
dc_cgiread()

dc_chdir()

Change dos directory

Syntax:



Arguments:

    (cDirectory) is the drive and directory to select.
   

Returns:

    .TRUE. if the drive and/or directory exists and is selected.
   
.FALSE. if the drive and/or directory does not exist.

Description:

DC_CHDIR() is used to select a new dos drive and directory.

Examples:

    DC_CHDIR('A:')
   
DC_CHDIR('C:\DCLIP')
DC_CHDIR('\DCLIP\DATA')

Source/Library:

_DCCHDIR.PRG/.OBJ, DCLIP.LIB

See Also:

CD

dc_childcount()

Get the number of children to the current database parent

Syntax:



Arguments:

    (nArea) is the work area.  If argument is not passed, then the
   
current work area is default.

Returns:

    The numeric value of the total number of child relations.
   

Description:

DC_CHILDCOUNT() is used to report the total number of
parent-child relations for a specified work area.

Examples:

    . use customer
   
. use invoice new
. use sales new
. sele customer
. set rela to cust_nmbr into invoice, to so_nmbr into sales
. ? DC_CHILDCOUNT()
2

Source/Library:

_DCAREA.PRG/.OBJ, DCLIP.LIB

dc_choice()

Pick list of database files to select from a wildcard

Syntax:



Arguments:

    (cFileSpec) is a wildcard argument for type of file to choose
   
from the picklist. If no argument is given, then "*.*" is
assumed. If a directory argument is included, then the
directory passed will be selected, otherwise the DEFAULT
directory will be selected.

(nStartRow), (nStartCol), (nEndRow), (nEndCol) are the screen
coordinates for the pick list. If no arguments are passed then
the default coordinates are 2, 5, 21, 75.

If (lDosDir) is .TRUE. and no directory is included in the
file spec, then the currently selected DOS directory will be
used, otherwise the DEFAULT directory will be used.

If (lWildCard) is .TRUE., then the wildcard in the file-spec
will be included in the file-list. This allows the operator
to click on the item for selecting ALL files.

Returns:

    A character string containing the name of the file selected from the
   
pick list.

Description:

DC_CHOICE() is used to pop-up a pick-list of files from the
currently selected DEFAULT directory or any other specified
directory to choose a file.

Examples:

    . cFile := DC_CHOICE("*.DBF")
   
. use &cFile
. cIndex := DC_CHOICE("\DCLIP\DATA\*.NTX")
. set index to &cIndex

Source/Library:

_DCCHOIC.PRG/.OBJ, DCLIP.LIB

See Also:

dc_filepick()
dc_dirpick()

dc_chrinkey()

Return a character value from an Inkey value

Syntax:



Arguments:

    (nInkey) is any numeric value from 33 to 306.
   

Returns:

    A character value.
   

Description:

DC_CHRINKEY() is used to return a character value that is
representative of a key hit value. DC_CHRINKEY() is used
in many dCLIP menu systems so that pressing a letter key
or the equivalent (ALT)-letter key will return the same
result. For example passing the INKEY() value for the A
key or the ALT-A key will return the character "A".

Notes:

Keys which have no equivalent character value will return
a null "" string. These Inkey() values are:

1. -39 to 31
2. Any Inkey() value over 272 which is not Alt-A thru Alt-Z.

Examples:

    ? DC_CHRINKEY(274)
   
E
? DC_CHRINKEY(88)
X

Source/Library:

_DCCHRIN.PRG/.OBJ, DCLIP.LIB

See Also:

dc_inkey()

dc_chrsel()

Choose from a Pick list of 256 ASCII characters

Syntax:



Arguments:

    NONE
   

Description:

DC_CHRSEL() is used to choose an ASCII character from a pick
list of all 256 available characters.

Examples:

    . nAscii := DC_CHRSEL()
   
. ? nAscii
136

Source/Library:

_DCCHR.PRG/.OBJ, DCLIP.LIB

See Also:

CHR
CHRKEY =

dc_clrarr()

Initialize or modify the Color Array

Syntax:



Arguments:

    NONE
   

Description:

DC_CLRARR() is used to initalize or the dCLIP system color
array. The color array is a PUBLIC array named DCCOLOR and is
automatically initialized by any dCLIP function that uses the
array. This function is normally not needed unless you are
using the dCLIP color system in your own functions.

The first time the color array is initialized in an application
using dCLIP functions, if a file named DCCOLOR.AR is found in
the SET DCLIP directory, then the contents of the file will be
used to intialize the array, otherwise the default colors will
be used.

dCLIP also provides multiple "palettes" of colors which can be
saved to DCCOLOR.AR and modified or selected via DC_CLRSETUP().

Notes:

dCLIP Color Manifest Constants from DCCOLOR.CH

Manifest
constant Element Description
------------ ----------------------- ----------------------------
cC_DOTPROMPT dCCOLOR[dCCOLOR[1]+1,1] Main dot-prompt
cC_BRMENUF dCCOLOR[dCCOLOR[1]+1,2] Browse menus frame
cC_BRMENUD dCCOLOR[dCCOLOR[1]+1,3] Browse menus data
cC_BRMENUH dCCOLOR[dCCOLOR[1]+1,4] Browse menus header
cC_BRMENUB dCCOLOR[dCCOLOR[1]+1,5] Browse menus menu bar
cC_BRMENUS dCCOLOR[dCCOLOR[1]+1,6] Browse menus select bar
cC_POPMENF dCCOLOR[dCCOLOR[1]+1,7] Popup / pulldown menu frames
cC_POPMENI dCCOLOR[dCCOLOR[1]+1,8] Popup / pulldown menu items
cC_POPMENS dCCOLOR[dCCOLOR[1]+1,9] Popup / pulldown menu select bars
cC_MEMOBOX dCCOLOR[dCCOLOR[1]+1,10] All memos box
cC_MEMOTXT dCCOLOR[dCCOLOR[1]+1,11] All memos contents
cC_EXPBOXF dCCOLOR[dCCOLOR[1]+1,12] Exploding boxes frame
cC_EXPBOXC dCCOLOR[dCCOLOR[1]+1,13] Exploding boxes contents
cC_DBUGGER dCCOLOR[dCCOLOR[1]+1,14] DBUGGER main screen
cC_WARNBOX dCCOLOR[dCCOLOR[1]+1,15] Warning boxes frame
cC_WARNTXT dCCOLOR[dCCOLOR[1]+1,16] Warning boxes contents
cC_DBUGBOX dCCOLOR[dCCOLOR[1]+1,17] Debug boxes frames
cC_DBUGTXT dCCOLOR[dCCOLOR[1]+1,18] Debug boxes contents
cC_DBUGBAR dCCOLOR[dCCOLOR[1]+1,19] Debug boxes select bar
cC_SPECIAL dCCOLOR[dCCOLOR[1]+1,20] Special codes
cC_SAY dCCOLOR[dCCOLOR[1]+1,21] SAYs
cC_PENDGET dCCOLOR[dCCOLOR[1]+1,22] Pending GETs
cC_CURRGET dCCOLOR[dCCOLOR[1]+1,23] Current GET
cC_STAT1 dCCOLOR[dCCOLOR[1]+1,24] Dot-prompt status line / lines
cC_STAT2 dCCOLOR[dCCOLOR[1]+1,25] Dot-prompt status line / data
lC_BLINKBIT dCCOLOR[dCCOLOR[1]+1,34] Blink-bit or High Intensity
cC_SETNAME dCCOLOR[dCCOLOR[1]+1,35] Name of this color set
cC_COLORNAME 35 Numeric value of cC_SETNAME
nC_COLORPAL dCCOLOR[1] Default color palette

Examples:

    #include "dccolor.ch"
   

FUNCTION main

DC_CLRARR() // initalize array
dc_expl(10,10,15,70) // explode a box
setcolor(cC_EXPBOXC) // set color to box contents
@ 12,12 say 'Enter something below'
something := space(10)
@ 14,12 get something
read

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_clrsetup()
COLOR SETUP

dc_clrscope()

Clear scoping values for the current work area

Syntax:



Arguments:

    None.
   

Returns:

    Nil
   

Description:

DC_CLRSCOPE() is used to clear both the SCOPE TOP and
SCOPE BOTTOM "scoping range" values that were previously set
by DC_SETSCOPE().

Notes:

DC_SETSCOPE() does not establish the scoping range at the
RDD-layer level, but instead is just a handy way of storing
the SCOPE TOP and SCOPE BOTTOM to be retrieved by programs
that can use this information such as data-entry systems and
browse systems. It does not affect the behavior of the
data-driver nor does it set any filters on the data.

Examples:

    use customer
   
set index to custname
dc_setscope(0,"HARRIS")
dc_setscope(1,"HYBRID")
dc_browsedb()
DC_CLRSCOPE()
dc_browsedb()

Source/Library:

_DCAREA1.PRG/.OBJ, DCLIP.LIB

See Also:

dc_setscope()
CLEAR SCOPE

dc_clrsel()

Pick a color from a pop-up color selector

Syntax:



Arguments:

    (nStRow) is the start row to display the color table.
   

(cOldColor) is an optional argument with a color string to
start at the pick-list display.

(cTitle) is a message to display in the color table window.

Returns:

    A character string with the color selected from the table.
   

Description:

DC_CLRSEL() returns the selected color from a popup lookup
table. This is useful in routines where the operator is asked
to select a foreground and background color. Use the Up/Down
arrows to move through the color table and the PgUp/PgDn key to
select the pages of colors. The color chart will display
characters in all the possible combinations of foreground/
background colors. Move through the charts to select the
combination, then press key X to EXIT. The color chart can be
positioned vertically in the display by passing the start row
as a parameter. DC_CLRSEL() will use 11 rows of your display
and will restore your display when returned to the calling
program.

Page 1 - normal foreground/background
Page 2 - high intensity foreground/normal background
Page 3 - blinking foreground/normal background
Page 4 - high intensity blinking foreground/normal background

Examples:

    cCurrentColor := setcolor()
   
cNewColor := ;
DC_CLRSEL( , cCurrentColor, ' Select a new color ' )
setcolor( cNewColor )

Source/Library:

_DCCLRS.PRG/.OBJ, DCLIP.LIB

See Also:

COLOR

dc_clrsetup()

Configure system colors

Syntax:



Arguments:

    [ldClipFlag] if .TRUE. will also include color-setup for
   
special dCLIP functions like the Dot-Prompt and Source-
Level debugger. If .FALSE. (default) then only the
items that would be used by "popular" dCLIP functions
will be included.

Returns:

    NIL
   

Description:

DC_CLRSETUP() is used to modify dCLIP system colors or to add a
new color palette to the system. The default colors are posted
to the dCCOLOR color array during initialization with
DC_CLRARR(). DC_CLRSETUP() will create a file named DCCOLOR.AR
which will be used by DC_CLRARR() to initialize the color
array.

Examples:

    . DC_CLRSETUP()   // modify the color array file DCCOLOR.AR
   


Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

COLOR SETUP

dc_codeedit()

Edit the Code Table Dictionary

Syntax:



Arguments:

    (cCodeTable) is the name of the code table in DCCODES.DBF
   
to load and edit (up to 8 characters) or (aCodeTable) is a
Code Table array. See RETURNS for a specification of this
array. If no parameter is passed, a pick-list of all Code
Tables in DCCODES.DBF will be displayed.

Returns:

    A 2-dimensional array of two sub-arrays.
   

The first array contains general information about the
screen group.

Element Type Description
------- ---- --------------------------------------
[1] C Code Table Name (up to 8 characters)
[2] C Code Table Description

The second array contains one sub-array for each code
table item.

Element Type Description
------- ---- ---------------------------------------
[1] C Code Table Name (up to 8 chars)
[2] C Code Name (up to 10 chars)
[3] C Code Description (up to 50 chars)
[4] C Code Sequence (used for indexing file)
[5] C Code UR (reserved)

Description:

DC_CODEEDIT() is an editor that is used to maintain the
DCCODES.DBF dictionary file. Code Tables are groups of
records that are loaded into an array pick-list and used in
validations when using the dCLIP Browse and Edit (data-entry)
system. When a "T" validation is used in a field-array,
this pops-up a code table pick-list for the operator to
choose possible values.

For example a code table named "POSITION" can be added to
provide a picklist of available entries for a field of
baseball player positions. They would be entered in a code
table as follows:

1B - First Base
2B - Second Base
3B - Third Base
P - Pitcher
SS - Short Stop
RF - Right Field
LF - Left Field
CF - Center Field
C - Catcher

This table can then be used during editing by simply pressing
the ALT-Y key after selecting the POSITION field in the edit
screen and entering "T" as the Validation type and "POSITION"
as the code table name.

Code tables include "user" fields, so data can easily be extracted
from a code table via the DC_CODEGET() function.
The "definition" of the three fields is established under the
"options" for the code table. Each of the fields is a character
type field with a length of 50.

Notes:

The DCCODES.DBF file and its indexes will be created by
the DC_CodeOpen() function if it they do not already exist.

Examples:

    -- Example 1 --
   
// Load a code table from the dictionary and edit it //
DC_CODEDIT()

-- Example 2 --
// Edit code table "POSITION"
DC_CODEEDIT("POSITION")

-- Example 3 --
// Edit a code table array and save it to dictionary //
aCodeTable := DC_CodePick()
aCodeTable := DC_CODEDIT( aCodeTable )
DC_CodeSave( aCodeTable )



Source/Library:

_DCCODES.PRG/.OBJ, DCLIP.LIB

See Also:

CODE EDIT
VALIDATION-T
CODE-TABLE

dc_codeget()

Get a Code from a Code Table (Pop-up list)

Syntax:



Arguments:

    (cTableName) is the name of the code table in DCCODES.DBF.
   
to load (up to 8 characters).

(cCode) is an optional value to seek in the code table. If
the value is found and (lPickList) is .FALSE. then the
full value will be returned and the description will be
placed into the @(cDesc) variable. If the value is not
found or (lPickList) is .TRUE., a pick list will be
displayed for the user to choose a code.

(cTitle) is the title to place at the top of the picklist.
If no parameter is passed, then a default title is displayed.

@(cDesc) is a variable to be passed by reference. The value
in the description field (CODE_DESC) will be placed into
this variable.

@(aCode) is a variable to be passed by reference. The value
of all database fields for the selected code will be placed
into an array of 6 elements and placed into this variable.

Element Field Name
------- ------------
1 CODE_NAME
2 CODE_DESC
3 CODE_SEQ
4 CODE_UR
5 CODE_UDF1
6 CODE_UDF2

(lNoPick) if .TRUE. will not display a pick-list if the code
cannot be found.



Returns:

    The value of the code chosen (a Character string).
   


Description:

DC_CODEGET() is used to allow the operator to select a code
from a designated code table. All codes are stored in the
DCCODES.DBF database in separate tables.

"User defined fields" allow data to easily be extracted from a code
table via the DC_CODEGET() function.

The "definition" of the three fields is established under the "options"
for the code table. Each of the fields is a character type field with
a length of 50. For example, let's establish a code table named
"REPORTS" with the following data:

Code Description User Field 1 User Field 2
---- ------------------ ---------------- -----------------
R001 Inventory Report INVREPT.EXE Executable Program
R002 Sales Report {||SlsRept()} Code-Block
R003 End-of-Month EOF.RP1 R&R Report

Now, you can use DC_CODEGET() to place "virtual" fields on the screen
so you can display the Description, User Field 1 and User Field 2
based on the code entered into another field. See Example

Examples:

    --- Example 1 ---
   

LOCAL cScrn, GetList := {}, aReadArea, cTreatment

cTreatment := Space(10)
cScrn := DC_ReadBox( 10,10,14,70,,@aReadArea )
@ 12,12 SAY "Enter Treatment Plan Code" GET cTreatment ;
PICT '@!' VALID DC_ReadClick( cTreatment,;
{|c|DC_CODEGET('TRTMENT',c,,.t.)} ) PICKLIST

DC_ReadModal( GetList,,aReadArea )
DC_Impl(cScrn)


--- Example 2 ---

To display the description:
Eval({|a|DC_CodeGet('REPORTS',repttype,,,,@a,.t.),a[2]})

To display user field 1:
Eval({|a|DCC_odeGet('REPORTS',repttype,,,,@a,.t.),a[3]})

To display user field 2:
Eval({|a|DC_CodeGet('REPORTS',repttype,,,,@a,.t.),a[4]})

Source/Library:

_DCCODES.PRG/.OBJ, DCLIP.LIB

dc_codeimp()

Import Code Table(s) from the Import Code Table Dictionary

Syntax:



Arguments:

    (cTableName) is the name of the code table.  This is a name of
   
up to eight (8) digits. If a code table name is passed then
the DXCODES.DBF database will be searched and all code table
items that match the code table name will be imported into
DCCODES.DBF. If no name is passed, then a pick-list of all tables
stored in the DXCODES.DBF database will be displayed.

If "ALL" is passed as the table name, then all tables in the
DXCODES.DBF will be imported into DCCODES.DBF.

Returns:

    A logical .TRUE. if the menu was imported successfully.
   


Description:

DC_CODEIMP() is used to import code tables from a DXCODES.DBF file
into the DCCODES.DBF file.


Notes:

The DCCODES.DBF file is the data-dictionary database that
contains all code tables. If this file does not exist in your
default directory or path then it will be created. The
DXCODES.DBF file is the data-dictionary database that contains
all code tables that were exported from another system.

Source/Library:

_DCCODES.PRG/.OBJ, DCLIP.LIB

See Also:

CODE IMPORT

dc_codeload()

Load a Code Table array from the Code Dictionary

Syntax:



Arguments:

    (cCodeTable) is the name of the code table in DCCODES.DBF
   
to load (up to 8 characters). If no parameter is passed, a
pick-list of all Code Tables in the DCCODES.DBF dictionary
will be displayed.

(lSave2Static) if .TRUE. (default) will save the table to
a static array so the next time it is requested it will
be reloaded from the static array for faster speed. If
.FALSE. then it will not be save to the static array.

Returns:

    A logical .TRUE. if the array was saved successfully, .FALSE.
   
otherwise.

Description:

DC_CODELOAD() is used to load a code table array from the
DCCODES.DBF dictionary file.

Examples:

    aCodeTable := DC_CODELOAD( 'POSITION' )
   
aCodeTable := DC_CodeEdit( aCodeTable )
DC_CodeSave( aCodeTable )



Source/Library:

_DCCODES.PRG/.OBJ, DCLIP.LIB

See Also:

dc_codeedit()
dc_codesave()

dc_codepick()

Pick a code table from the code dictionary

Syntax:



Arguments:

    (cTitle) is the title to display on the pick-list box.
   

Returns:

    A character string.
   

Description:

DC_CODEPICK() is used to pick the name of a code table
from the DCCODES.DBF Code Table dictionary.

Examples:

    cCodeTable := DC_CODEPICK()
   
IF !Empty(cCodeTable)
aCodeTable := DC_CodeEdit( cCodeTable )
ENDIF




Source/Library:

_DCCODES.PRG/.OBJ, DCLIP.LIB

See Also:

dc_codeedit()

dc_codesave()

Save a Code Table array to the Code Dictionary

Syntax:



Arguments:

    (aCodeTable) is a code table array that conforms to the
   
specification of the array documented in RETURNS for the
function DC_CODEEDIT().

Returns:

    A 2-dimensional array that conforms to the specification
   
documented under RETURNS of the function DC_CODEEDIT().

Description:

DC_CODESAVE() is used to save a code table array to the
DCCODES.DBF dictionary file.

Examples:

    aCodeTable := DC_CodePick()
   
aCodeTable := DC_CodeEdit( aCodeTable )
DC_CODESAVE( aCodeTable )



Source/Library:

_DCCODES.PRG/.OBJ, DCLIP.LIB

See Also:

dc_codeedit()

dc_color()

Set the current screen color value

Syntax:



Arguments:

    (cColorString) is the color string value to set.  See the
   
color definitions in DCCOLOR.CH. String definitions start
with cC_*.

or

(nColorElement) is the number of the color based on the table
of Numeric color definitions in DCCOLOR.CH. Numeric definitions
start with nC_*.

(lSelectBar) if .TRUE. will set the color to "highlight" if
application is being run on a monochrome monitor or COLOR_MON
is .FALSE.

(lReverseVideo) is used only if (lSelectBar) is .TRUE. If
.TRUE., this argument will set highlight to "reverse video".




Returns:

    A numeric value equal to the palette number of the new color palette.
   

Description:

DC_COLOR() is a replacement for SETCOLOR(). DC_COLOR()
automatically tests the status of ISCOLOR() and a STATIC
variable named COLOR_MON to determine if the application is
being run on a color monitor. This allows the programmer or
user to enable all color output dynamically by simply turning
color on or off with the DC_COLORSET() function.

Examples:

    #include "dccolor.ch"
   

// Set color to Browse menus frame color
// Use numeric value - nC_BRMENUF is defined as 2
// This is the preferred method for speed and code size
// Use this method if you are using dCLIP colors
DC_COLOR( nC_BRMENUF )

// Set color to Browse menus frame color
// Use Character string value
// cC_BRMENUF is defined as DCCOLOR[DCCOLOR[1]+1,2]
// This method is provided only for backward compatability
DC_COLOR( cC_BRMENUF )

// Set color to 'BG+/W'
// Use Character string value
DC_COLOR( 'BG+/W' )

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

dc_color2array()

Convert a color string to an array

Syntax:



Arguments:

    (cColorString) is a valid Clipper color string.  If no
   
parameter is passed, then the current SETCOLOR() will be
used.

Returns:

    An array of 5 elements;
   

Element Type Color
------- ---- -------------------------
[1] C Standard (screen output)
[2] C Enhanced (GETS, hilites)
[3] C Border
[4] C Background (unsupported)
[5] C Unselected GETS

Description:

DC_COLOR2ARRAY() is a handy function which is used to convert
a standard "complex" Clipper color string to an array of
individual colors.

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_color()

dc_coloradd()

Add a new color set to the Color Array

Syntax:



Arguments:

    NONE
   

Description:

DC_COLORADD() will add a new color palette set to the color
array and save the contents to DCCOLOR.AR for restoring with
the DC_CLRARR() initialize function.

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

dc_colordel()

Delete a color set from the Color Array

Syntax:



Arguments:

    (nPalette) is the number of the color palette to delete.  You
   
cannot delete color palette number 0 or 1, so this number must
be greater than 1. If no argument is given, then a pick-list
of palette descriptors will be displayed.

Description:

DC_COLORDEL() is used to delete a color palette that was
created with DC_COLORADD().

Examples:

    . nPalette := dc_coloradd()
   
. DC_COLORDEL( nPalette )

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_coloradd()

dc_colormode()

Enable or Disable Color / Monochrome display mode

Syntax:



Arguments:

    (lMode) if .TRUE. will enable the color display, if .FALSE.
   
will enable monochrome display.

Description:

DC_COLORMODE() is used to enable or disable the color display.
Use this function to disable color mode when using dCLIP
functions in an application that is running on a monochrome
display with a color driver board that returns an ISCOLOR() of
.true.

Examples:

    . DC_COLORMODE(.f.)  // disable color display
   

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

COLOR =
dc_color()

dc_colorrest()

Restore a color set

Syntax:



Arguments:

    (nPalette) is the number of the palette that was saved with the
   
DC_SAVECOLOR() function.

Description:

DC_COLORREST() is used to restore a color palette that was
previously saved with DC_COLORSAVE().

Examples:

    . nPalette := dc_colorsave()  // save color palette
   
. do something
. DC_COLORREST( nPalette ) // restore old color palette

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_colorsave()

dc_colorsave()

Save the current color set

Syntax:



Arguments:

    NONE
   

Description:

DC_COLORSAVE() is used to save the number of the currently
selected color palette for later restoring with DC_COLORREST().
Use DC_COLORSAVE() and DC_COLORREST() if you are calling a
function that might select a different color palette such as
DC_BROWSEDB().

Examples:

    . nPalette := DC_COLORSAVE()  // save selected palette number
   
. do something
. dc_colorrest( nPalette ) // restore old color palette

Source/Library:

_DCCOLOR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_colorrest()

dc_colorsel()

Select a color set from the Color Array

Syntax:



Arguments:

    (nPalette) is the number of the color palette to select.  If no
   
argument is passed then the number of the currently selected
palette will be returned. If a 0 is passed or if the number is
not a valid palette number then a pick-list of available palette
descriptions will be displayed.

Description:

DC_COLORSEL() is used to select a color palette. The default
number of palettes in the dCLIP color system is one (1), so
this function is useful only after creating extra color
palettes with the DC_COLORADD() function.

Multiple color palettes are provided in the dCLIP system for
the following purpose:

1. To allow the user to select a different color set when using
dCLIP functions in applications that must be run on multiple
display systems. For example, if you work with dCLIP part
time on a color monitor and part time on an LCD display, you
can create color palettes that are "optimized" for you
display type.

2. To allow the user to select different color sets for
different windows in an application.

Examples:

    . nPalette := dc_colorsave()
   
. DC_COLORSEL(0) // select a color palette
. do something
. dc_colorrest( nPalette ) // restore the old palette

Source/Library:

_DCCLR2.PRG/.OBJ, DCLIP.LIB

See Also:

COLOR

dc_commadd()

Add a command to the dot-prompt SET COMMAND array

Syntax:



Arguments:

    (cVerb) is the command verb to assign to the new dot prompt
   
command.

(cCommand) is the DOS program, BATCH file, or FUNCTION.

(nMemory) is the amount of memory to release for running the
selected DOS program. (Needed only if (cType) is "C").

(cSwap) is the drive and directory to create a temporary file
for saving the current memory image. (Needed only if (cType)
is "C").

(cType) is the type of command to create.

cType Description
----- --------------------------------------------------
P Procedure - Execute procedure/function (cCommand)
C Command - Run DOS program (cCommand)
B Batch - Run BATCH file (cCommand).DCB

Description:

DC_COMMADD() is used to add user-defined commands to the
dot-prompt command array. Commands are invoked by a single
verb and translated to call a DOS program, function, or Batch
file.

Notes:

DC_COMMADD() is the function that is used to add commands to
the dot-prompt command array when using dot prompt commands:

SET COMMAND, SET PROCEDURE or SET BATCH

or when using DCLIP.SYS commands:

COMMAND=, PROCEDURE=, BATCH=

Examples:

    . DC_COMMADD("TAP","TAPCIS",360,"C:","C")
   
. DC_COMMADD("CALC","POPCALC()",,,"P")
. DC_COMMADD("SETUP","SETUP.DCB",,,"B")

Source/Library:

_DCTRAN1.PRG/.OBJ, DCLIP.LIB

See Also:

SET COMMAND
COMMAND =

dc_command() *

Send a command string to the interpreter

Syntax:



Source/Library:

_DCDOT.PRG/.OBJ, DCLIP.LIB

See Also:

dc_interpret()
dc_program()
dc_batch()
dc_dot()

dc_compile()

Compile a specified .PRG or all changed .PRGs

Syntax:



Arguments:

    (cFileName) is the name of the file to compile.  If this
   
argument is left blank, then all .PRG files which have a later
date stamp than the associated .OBJ file will be compiled.

(cCompOpt1) is a string of compiler options. If no argument is
given, then the options established by
DC_SETT('CLIPOPT',(cOptions)), SET CLIPOPT TO (cOptions) or
CLIPOPT=(cOptions) (DCLIP.SYS) are used as the default.

(lReedit) if .TRUE. (default) will cause the default editor to
be called if there are any compile errors. The line number
will be passed to the editor. If .FALSE., then re-editing will
not occur.

(lQuiet) if .TRUE. will prevent displaying the status after
compiling. If .FALSE. (default), then all errors will be
displayed.

Returns:

    An array consisting of two elements:
   

Element Type Description
------- ----- -----------------------------------------
[1] N Total number of compile errors
[2] N Line number of first error in source code

Description:

DC_COMPILE() recompiles all .PRG files which have been modified
and releases the corresponding .OBJ files from memory.

Use DC_COMPILE() after editing your source files. DC_COMPILE()
checks the date and time stamp on .PRG files and compares them
to the date and time on any corresponding .OBJ files. If the
date and/or time on a .PRG is later than the corresponding
.OBJ, the object will be released from memory and the .PRG will
be compiled with the /m option.

DC_COMPILE() also automatically calls your editor if a compile
error occurs.

Examples:

    accept 'Enter a file to edit and compile' TO cFile
   
dc_editprg(cFile)
DC_COMPILE(cFile,'/n/m/w/l')

Source/Library:

_DCMAKE.PRG/.OBJ, DCLIP.LIB

See Also:

CLIPPER

dc_condition()

Pop-up user-prompt menu for creating database FOR conditions

Syntax:



Arguments:

    None.
   

Returns:

    A character string.
   

Description:

DC_CONDITION() provides a handy menu with database field
listing and optional pop-up query builder. Use this function
when prompting the operator to enter a condition. The
condition will automatically be validated so the operator
cannot enter an invalid expression.

Examples:

    . use customer
   
. c := DC_CONDITION()
. report form customer for &c

Source/Library:

_DCCOND.PRG/.OBJ, DCLIP.LIB

See Also:

dc_query()

dc_condset()

Set conditional index parameters and load odometer codeblock

Syntax:



Arguments:

    DC_CONDSET() uses the exact same arguments as the _DTXCONDSET()
   
function included in the DBFNTXC (conditional) index driver.

See the Clipper documentation for details.

Returns:

    The same value as _DTXCONDSET().
   

Description:

DC_CONDSET() is a front-end replacement function for the
_DTXCONDSET() function included in the DBFNTX.LIB (conditional
index - DBFNTXC) library.

DC_CONDSET() installs a call to the DC_ODBLOCK() odometer
function to provide a progress indicator while indexing.

Source/Library:

_DCNTXC.PRG/.OBJ, DCLIP.LIB

dc_conmem()

Report contiguous memory available for "dynamic linking"

Syntax:



Arguments:

    NONE
   

Description:

DC_CONMEM() reports the largest block of contiguous memory
available for dynamic-linking a Clipper-compiled object file.
The amount of DC_CONMEM() required is (2 x .OBJ size) + 4k.

Examples:

    nHandle := fopen('demo.obj')
   
nObjSize := fseek( nHandle, 0, 2 )
fclose(nHandle)
if DC_CONMEM() ( ( 2 * nObjSize ) + 4
? 'Object too big'
break
else
dc_objload('demo.obj')
endif

Source/Library:

_DCLINK.PRG/.OBJ, DCLIP.LIB; _DCLNKST.PRG/.OBJ, DCLIPS.LIB

dc_copy()

Extract data from fields and copy to other fields

Syntax:



Arguments:

    (cFieldMap) is the name of the Import Map file (.DCF) to use.
   
If no argument is given, then the user will be given a set of
field pick lists to match FROM field to TARGET fields in the
database.

(bFor) is a code-block that defines the condition for the
import file records to be appended. If no argument is passed,
then all records in the import database will be appended.

(bWhile) is a code-block that is evaluated after each record
and terminates the importing of records when it evaluates
.FALSE.

(nNext) is an optional number that defines how many records to
process starting with the current record.

(nRecord) is an optional record number to process.

(lRest) is an optional logical value that determines whether
the scope of the import is all records, or starting with the
current record and proceeding to the end of the file.

Returns:

    A logical .TRUE. if data is successfully copied, .FALSE.
   
otherwise.

Description:

DC_COPY() will copy data from a list of FROM fields in a work
area to a list of TO fields in a work area. Data from fields
of different TYPES can be copied with DC_COPY().

A map file (.DCF) can be specified for determining how the data
fields from the FROM fields will be mapped to the TARGET
fields.

Examples:

    -- Example 1 --
   

use customer
DC_COPY() // user-prompt menu for copying fields


-- Example 2 --

// copy fields using CUSTTRAN.DCF map file for
// all records transacted today
DC_COPY( 'custtran.dcf',{||ship_date=date()} )

Source/Library:

_DCIMP.PRG/.OBJ, DCLIP.LIB

See Also:

dc_import()
dc_util()
UTIL

dc_copyfile()

Pop-up a user-prompt menu for copying a file

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if file is copied with no errors, .FALSE. otherwise.
   

Description:

DC_COPYFILE() is a high-level function that prompts a user with
menus and pick-lists for copying any file to any drive or
directory.

Examples:

    @ 10,10 prompt "Append Records"
   
@ 11,10 prompt "Delete Records"
@ 12,10 prompt "Recall Records"
@ 13,10 prompt "Copy a File"
menu to nChoice
do case
case nChoice = 1
dc_append()
case nChoice = 2
dc_delete()
case nChoice = 3
dc_recall()
case nChoice = 4
DC_COPYFILE()
endcase

Source/Library:

_DCCOPYF.PRG/.OBJ, DCLIP.LIB

See Also:

ASSIST

dc_copynew()

Copy files that are newer than destination files

Syntax:



Arguments:

    (cFromSpec) is the Drive / Directory / wildcard of the files
   
to be copied from.

(cToSpec) is the Drive / Directory / wildcard of the files
to be copied to.

Returns:

    A logical .TRUE. if the files were successfully copied.
   

Description:

DC_COPYNEW() is used to copy only files in a source directory
that are newer than the same files in a target directory.

Source/Library:

_DCCOPYN.PRG, DCLIP.LIB

dc_copystru()

Pop-up user-prompt menu for copying the database structure

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if file is copied with no errors, .FALSE. otherwise.
   

Description:

DC_COPYSTRU() is a high-level function that prompts a user with
a menu for copying the structure of the current work area to a
new data file.

Examples:

    @ 10,10 prompt "Append Records"
   
@ 11,10 prompt "Delete Records"
@ 12,10 prompt "Recall Records"
@ 13,10 prompt "Copy Structure"
menu to nChoice
do case
case nChoice = 1
dc_append()
case nChoice = 2
dc_delete()
case nChoice = 3
dc_recall()
case nChoice = 4
DC_COPYSTRU()
endcase

Source/Library:

_DCFCSTR.PRG/.OBJ, DCLIP.LIB

See Also:

UTIL
dc_util()
COPY STRU

dc_copyto()

Pop-up a user-prompt menu for copying database records

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if file is copied with no errors, .FALSE. otherwise.
   

Description:

DC_COPYTO() is a high-level function that provides a
user-interface menu for copying records in the current work
area to a new file. DC_COPYTO() prompts the user for
information about files and scoping conditions, then displays a
progress-Odometer during the copying process.

Examples:

    @ 10,10 prompt "Append Records"
   
@ 11,10 prompt "Delete Records"
@ 12,10 prompt "Recall Records"
@ 13,10 prompt "Copy Records"
menu to nChoice
do case
case nChoice = 1
dc_append()
case nChoice = 2
dc_delete()
case nChoice = 3
dc_recall()
case nChoice = 4
DC_COPYTO()
endcase

Source/Library:

_DCCOPY2.PRG/.OBJ, DCLIP.LIB

See Also:

UTIL
COPY TO
dc_util()

dc_count()

Pop-up a user-prompt menu for counting records

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if count is completed with no errors, .FALSE. otherwise.
   

Description:

DC_COUNT() is a high-level function that provides a
user-interface menu for counting the number of records that
meet a specified condition in the current work area.
DC_COUNT() prompts the user for information about files,
fields, and scoping conditions (with pick- list options), then
displays a progress-Odometer during the counting process
followed by the final results.

Examples:

    . use invoice
   
. use invitems new
. set relation to inv_nmbr into invoice
. DC_COUNT()

Source/Library:

_DCSUM.PRG/.OBJ, DCLIP.LIB

dc_crdata()

Pop-up a user-prompt menu for creating a new database

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if file is created with no errors, .FALSE. otherwise.
   

Description:

DC_CRDATA() is a high-level function that provides a
user-interface menu for creating a new data file.

DC_CRDATA() prompts the user for information about the file to
create and then calls DC_CREATE() to define the fields.

Examples:

    @ 10,10 prompt "Append Records"
   
@ 11,10 prompt "Delete Records"
@ 12,10 prompt "Recall Records"
@ 13,10 prompt "Create Database"
menu to nChoice
do case
case nChoice = 1
dc_append()
case nChoice = 2
dc_delete()
case nChoice = 3
dc_recall()
case nChoice = 4
DC_CRDATA()
endcase

Source/Library:

_DCFCSTR.PRG/.OBJ, DCLIP.LIB

dc_crdlb()

Pop-up a user-prompt menu for creating a dynamic library

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if file is created with no errors, .FALSE. otherwise.
   

Description:

DC_CRDLB() is a high-level function that provides a
user-interface menu for creating a new dynamic library from a
set of Clipper-compiled .OBJ files.

Examples:

    @ 11,10 prompt "Create New Database"
   
@ 12,10 prompt "Create Dynamic Library"
menu to nChoice
do case
case nChoice = 1
dc_crdata()
case nChoice = 2
DC_CRDLB()
endcase

Source/Library:

_DCLIB.PRG/.OBJ, DCLIP.LIB

dc_create()

Create new database from a menu for defining the structure

Syntax:



Arguments:

    (cFileName) is the name of the database to create.  If no
   
extension is given, then the default extension for the current
database driver will be used.

Returns:

    .TRUE. if file is created with no errors, .FALSE. otherwise.
   

Description:

DC_CREATE() is used to create a new database.

DC_CREATE() will give you a menu for adding the new fields to
the database.

Examples:

    Creating a new database requires that you first select the
   
driver that will support the file structure desired.

. SET RDD TO DBFSIX
. DC_CREATE('NEWFILE1') // Create NEWFILE.DBF/.FPT
. INDEX ON LAST TO LASTNAME // Create LASTNAME.IDX
. SET RDD TO DBFNTX
. DC_CREATE('NEWFILE2') // Build NEWFILE.DBF/.DBT
. INDEX ON LAST TO LASTNAME // Create LASTNAME.NTX
. SET RDD TO PDX
. DC_CREATE('NEWFILE3') // Build NEWFILE.DB
. INDEX ON LAST TO LASTNAME // Create LASTNAME.PX

Source/Library:

_DCFCSTR.PRG/.OBJ, DCLIP.LIB

dc_createindex()

Create an index file and display a Progress Bar

Syntax:



Arguments:

    (cFileName) is the name of the index file to create.  If no
   
extension is given, then .NTX is assumed.

(cKeyExpr) is the key expression for creating the index.

(lUnique) is an optional logical value logical value that
specifies whether a unique index is to be created. If
(lUnique) is omitted, the current global SET UNIQUE setting is
used.

Returns:

    NIL
   

Description:

DC_CREATEINDEX() is a replacement for dbCreateIndex(). This
function is intended to be used only when an index "progress
bar" is desired and when the standard DBFNTX driver is being
used.

Notes:

The parameters passed to DC_CREATEINDEX() are NOT the same as
for dbCreateIndex(). The Code block is not needed because
DC_CREATEINDEX() builds it's own code block for calling the
odometer function.

Examples:

    use baseball
   
DC_CREATEINDEX( 'team', 'team' )
DC_CREATEINDEX( 'league', 'league' )

Source/Library:

_DCNTXC.PRG/.OBJ, DCLIP.LIB

See Also:

dc_odometer()

dc_crindex()

Pop-up a user-prompt menu for creating a new index

Syntax:



Arguments:

    NONE
   

Returns:

    .TRUE. if file is created with no errors, .FALSE. otherwise.
   

Description:

DC_CRINDEX() is a high-level function that provides a
user-interface menu for creating a new index file.

Examples:

    @ 11,10 prompt "Create New Database"
   
@ 12,10 prompt "Create New Index"
menu to nChoice
do case
case nChoice = 1
dc_crdata()
case nChoice = 2
DC_CRINDEX()
endcase

Source/Library:

_DCDBIND.PRG/.OBJ, DCLIP.LIB

dc_curpath()

Get the current dos directory

Syntax:



Arguments:

    (cDrive) is the drive to report the currently selected
   
directory. If no argument is given, then the currently selected
drive is the default.

Returns:

    A character string representing the selected drive and directory.
   

Description:

DC_CURPATH() reports the currently selected DOS directory for
any specified drive.

Examples:

    . dc_chdir('C:\DCLIP')
   
. ? DC_CURPATH()
C:\DCLIP
. dc_chdir('\DCLIP\DATA')
. ? DC_CURPATH('C:')
C:\DCLIP\DATA

Source/Library:

_DCPATH.PRG/.OBJ, DCLIP.LIB

See Also:

dc_setdclip()
dc_setdefault()

dc_datarest()

Restore all Work Areas from info in an array

Syntax:



Arguments:

    (aWork) is a multidimensional array created by DC_DATASAVE().
   

Returns:

    A logical .TRUE. if the restoration was successful.
   

Description:

DC_DATASAVE() will store all work area info to an array.

DC_DATAREST(aWork) will reopen all databases, indexes and relations
from the array created by DC_DATASAVE(). This function is handy
when it is necessary to insure that database work areas are restored
to their original condition after calling a routine that may close
files, open files, select different indexes or clobber relations.

Examples:

    aWork := DC_DATASAVE()
   
CLOSE ALL
USE CUSTOMERS INDEX NAMES
USE INVOICES NEW
// do some stuff
CLOSE ALL
DC_DATAREST( aWork )

Source/Library:

_DCAREA1.PRG/.OBJ, DCLIP.LIB

dc_datasave()

Save all Work Area information to an array

Syntax:



Arguments:

    None.
   

Returns:

    An multi-dimensional array.
   

Description:

DC_DATASAVE() will store all work area info to an array.

DC_DATAREST(aWork) will reopen all databases, indexes and relations
from the array created by DC_DATASAVE(). This function is handy
when it is necessary to insure that database work areas are restored
to their original condition after calling a routine that may close
files, open files, select different indexes or clobber relations.

Examples:

    aWork := DC_DATASAVE()
   
CLOSE ALL
USE CUSTOMERS INDEX NAMES
USE INVOICES NEW
// do some stuff
CLOSE ALL
DC_DATAREST( aWork )

Source/Library:

_DCAREA1.PRG/.OBJ, DCLIP.LIB

dc_datestamp()

Returns a numeric value of the date stamp of a file

Syntax:



Arguments:

    (cFileName) is the name of the file to report the date stamp.
   
This must be a complete file name with drive, directory and
extension. The drive and directory are not necessary if the
file exists in the currently selected dos directory.

Returns:

    The numeric date/time value.
   

Description:

DC_DATESTAMP() returns the numeric date/time stamp of a dos
file.

Examples:

    . ? DC_DATESTAMP( 'DCLIP.SYS' )
   
418208800

Source/Library:

_DCDATE.PRG/.OBJ, DCLIP.LIB

dc_datetime()

Returns the date and time of a file as a string

Syntax:



Arguments:

    (cFileName) is the name of the file to report the date and
   
time. This must be a complete file name with drive, directory
and extension. The drive and directory are not necessary if the
file exists in the currently selected dos directory.

Description:

DC_DATETIME() returns a character value date and time stamp of
a dos file in the form MM/DD/YY HH:MM.

Examples:

    . ? DC_DATETIME( 'DCLIP.SYS' )
   
07/13/92 11:33

Source/Library:

_DCDATE.PRG/.OBJ, DCLIP.LIB

dc_dbch() *

A browse-style database pick-list

Syntax:



Arguments:

    The following arguments are listed in the order they must be
   
passed:

(nStRow) - Top Display Row
(nStCol) - Left Display Column
(nEnRow) - Bottom Display Row
(nEnCol) - Right Display Column
(cMenuBar) - Text for single line MENU BAR at bottom of
menu
(cHeadingBar - Text for single line HEADER BAR to name data
fields
(cMenuName) - Name of menu at top of window

(cBoxColor) - Color String for window and lines
(cDataColor) - Color String for DATA FIELDs
(cDBarColor) - Color String for DATA FIELDs bar selector
(cHeaderColor) - Color String for HEADER BAR
(cMenuBarColor) - Color String gor MENU BAR

If the above color parameters are passed as "" or NIL, then the
default dCLIP colors will be used depending on the color
palette selected.

(cExpr1) - Data field (or expression) number 1
(cExpr2) - Data field (or expression) number 2
(cExpr3) - Data field (or expression) number 3
(cExpr4) - Data field (or expression) number 4

(nCol1) - Column 1 location
(nCol2) - Column 2 location
(nCol3) - Column 3 location
(nCol4) - Column 4 location

(lPaintScrn) - .t.-paint fields in menu window,
.f.-return to menu with repaint

(lExplode) - .t.-explode box when painting menu,
.f.-no explode

(lPaintRow) - .t.-repaint the current row,
.f.-no repaint of row

(lAutoSeek) - .t.-Autoseek ON, .f.-Autoseek OFF

(cSeekValue) - Seek value of items to include in list

(cKeyField) - name of key field

(cSeekValue) and (cKeyField) are optional parameters that may
be used only with databases which are indexed on (cKeyField).
This provides a method of "filtering" out all records which do
not match the (cSeekValue). This is a faster method of
including only a specific set of records than the SET FILTER TO
command, however, only records which exactly match the indexed
value may be displayed with this method.

(cUdfName) - The name of a user-defined procedure or
function to call between keystrokes.

Description:

DC_DBCH() paints a browse-style menu for painting a pick-list
of database fields.

Notes:

DC_DBCH() is provided for compatability with previous versions
of dCLIP. A better implementation which does not generate a
PUBLIC array and offers better flexibility is available in
DC_DBCHOICE().

Public array:

_d_c_dbch[1] = current row pointer
_d_c_dbch[2] = current column pointer
_d_c_dbch[3] = current field pointer
_d_c_dbch[4] = top record number
_d_c_dbch[5] = bottom record number
_d_c_dbch[6] = flag designating top page of database
_d_c_dbch[7] = flag designating bottom page of database
_d_c_dbch[8] = row number of last displayed item

The above array will be released from memory if DC_DBCH() is
called with no parameters.

Examples:

    -- Example 1 --
   

This example demonstrates how to use DC_DBCH() as a main menu
for operations on a database.

USE invoice
* setup conditions for painting menu with DC_DBCH()
paint_scrn=.t.
explode=.t.
paint_row=.f.

DO WHILE .T.
SELECT invoice
* enter database select menu and return value of key
* hit after operator chooses record.
code = DC_DBCH(0,0,23,79,;
' E = Edit S = Search P = Print M = Maint.',;
' Inv. Nmbr Customer Name Date Balance ',;
' INVOICE MAINTENANCE MENU ','','','','','',;
'inv_nmbr','cust_name','inv_date','STR(balance,10,2)',;
6,20,52,66,paint_scrn,explode,paint_row,.f.)
paint_scrn=.f.
explode=.f.
paint_row=.f.
DO CASE
* (E)dit (V)iew or (A)dd record
CASE code='E'
DO edit
paint_row=.t.
* (S)earch
CASE code='S'
DO search
paint_scrn=.t.
CASE code = 'P'
DO print
CASE code = 'M'
DO maint
CASE code='X'
RETURN
ENDCASE
ENDDO


-- Example 2 --

This example demonstrates how to use DC_DBCH() as a
pop-up menu to select from a database of selections
using the AUTOSEEK capability.

USE customer INDEX custname
* key F2
SET KEY -1 TO custselect
mcust_name=SPACE(30)
@ 10,10 SAY 'Enter Customer Name ' GET mcust_name
@ 11,10 SAY 'Press key F2 for help'
READ
RETURN

* operator pressed F2 key
PROCEDURE custselect

* must pass FOUR expressions even if you need only one
DC_DBCH(13,15,23,65,;
' Press ESCape to exit after selecting',;
' Customer Name',;
' SELECT CUSTOMER ',;
box_color,data_color,sel_color,hdr_color,menu_color,;
'cust_name','','','',20,63,63,63,;
.t.,.t.,.f.,.t.)
mcust_name=cust_name
CLEAR GETS
RETURN


-- Example 3 --

This example demonstrates how to use DC_DBCH() as a pop-up
menu to select from an indexed database and include only a
specified group of records. In the example below, only
customers starting with the name "SOFT" will be displayed.
This example also shows how to use the call to a user-defined
procedure. In the below example, the current record's memo
will be displayed in a window when the record pointer is
moved up and down through the DC_DBCH() window.

USE customer INDEX custname
SEEK 'SOFT'
@ 13,41 TO 23,79 //paint a box for the memo
DC_DBCH(13,2,23,40,;
' Press ESCape to exit after selecting',;
' Customer Name',;
' SELECT CUSTOMER ','','','','','',;
'cust_name','','','',6,38,38,38,;
.t.,.t.,.f.,.t.,'SOFT','CUST_NAME','DISPMEMO')
mcust_name=cust_name
CLEAR GETS
RETURN

PROC dispmemo

KEYBOARD CHR(27) // send escape to exit view mode
MEMOEDIT(cust_memo,14,42,22,78,.f.)
RETURN


-- Example of a DC_DBCH() Menu --

ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ dCLIP HELP SYSTEM ÆÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ÇÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂĶ
º±³ Codes: (A)General, (C)ommand, (F)unction, (E)rror ³Code³ Comments ³±º
º±ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´±º
º ³ DCLIP.SYS is used to map your DOS programs to the ³ A ³DC ³ º
º±³ SET DCLIP=(drive/directory) (Put in AUTOEXEC.BAT)³ A ³DC ³±º
º±³ Press ALT-S for Code-View debug window in applicat³ A ³DC ³±º
º±³ (memvar) = (exp) ³ C ³DC-CL ³±º
º±³ ? (expression) ³ C ³DBUGGER ³±º
º±³ ?/?? (expression) ³ C ³DC-CL-DB3 ³±º
º±³ @ (expN1),(expN2),(expN3),(expN4) BOX (expC1) ³ C ³DC-CL ³±º
º±³ @ (expN1),(expN2) CLEAR [TO (expN3),(expN4)] ³ C ³DC-CL-DB3 ³±º
º±³ @ (expN1),(expN2) PROMPT (expC1) [MESSAGE (expC2)]³ C ³DC-CL ³±º
º±³ @ (expN1),(expN2) [SAY (exp) [PICTURE (expC1)]] [G³ C ³DC-CL ³±º
º±³ @ (expN1),(expN2) [SAY (exp) [PICTURE (expC1)]] [G³ C ³DC-CL-DB3 ³±º
º±³ @ (expN1),(expN2) TO (expN3),(expN4) [DOUBLE] ³ C ³DC-CL-DB3 ³±º
º±³ ACCEPT [(prompt)] TO (memvar) ³ C ³DC-CL-DB3 ³±º
º±³ APPEND ³ C ³DC- ³±º
º±³ APPEND BLANK ³ C ³DC-CL-DC3 ³±º
º±³ APPEND [NEXT (expN1)] [FIELD (field)] FROM (file)/³ C ³DC-CL-DB3 ³±º
ºÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄ´º
º±³  PgDn End X=EXIT ³±º
ÈÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏͼ
Edit View Memo Search Print Maintenance

Source/Library:

_DCDBCH.PRG/.OBJ, DCLIP.LIB

dc_dbchcreate()

Create a database or array pick-list object

Syntax:



Arguments:

    (aOptions) is an array defining the pick-list window size,
   
color, function, and array data when browsing an array.

Element Type Description
------- ---- -----------------------------------------------
1 N Start display row
2 N Start display column
3 N End display row
4 N End display column
5 C Heading at top of window
6 C Menubar at top or bottom of window. The first
character in each word will be highlighted
or the first character after any tilde ~
character will be highlighted.
7 C A color string for the box and lines
8 C A color string for the data items
9 C A color string for the data select bar
10 C A color string for column headings
11 C A color string for the menu bar at the bottom
of the window. This is a two-color string
(separated by a comma). The first color is
the bar and words, the second is the highlight
color.
12 L If .TRUE. then "Auto-Seek" mode will be enabled.
Auto-Seek will cause the pick-list to
automatically seek to the item whose index key
matches the sequence of keys pressed.
13 C/N/D/L A value to include in a "One-To-Many" style
pick-list. The type of this value must match
the index key of the database. Only database
items that match this value will be included
in the display. This is provided for compatability
with previous versions. Parameters 19/20 are
recommended for one-to-many browses.
14 L If .TRUE. then a "Tagging" Column will be
displayed. All records or array elements which
have been tagged will contain a check mark. The
operator may tag/untag records with the SPACE bar
key, TAG records with the LEFT mouse key, or UNTAG
records with the RIGHT mouse key.
15 N The INKEY() value of the key to assign as the
Record Tagging key. The default is 32 (Space bar).
16 L If .FALSE. will display menu at bottom.
If .TRUE. will display menu at top (default).
17 N Starting array element to browse
18 N Subscript number of data array that is used for
holding tags. This is required if Tag Mode is
enabled and you are browsing an array rather than
a database. The tags must all be initialized to
a logical value.
19 C/D/N/L A value that defines the SCOPE TOP of the database
for one-to-many browses.
20 C/D/N/L A value that defines the SCOPE BOTTOM of the
database for one-to-many browses.
21 A An optional array of 10 elements. Each element
is a character string to display as the mouse
"prompt" message when the mouse is placed over
one of the 10 mouse buttons at the bottom of
the window. The 10 default messages are defined
in the _DCDBCHO.PRG source code.

Note: If color elements are not passed, then the system
default colors will be used.

(aColumns) is a multi-dimensional array that defines the
columns in the pick-list window. One sub-array is required
for each column in the window.

Element Type Description
------- ------- --------------------------------------
1 C Expression to evaluate
or B Code-Block to evaluate
or N Array sub-element number (array browse mode)

2 C Column title

3 N Column width. If 0, then column will
automatically size to expression output
width.

4 C Code Block to pass to SETCOLOR()
For example, this could be the name of a color
field in a database and would be passed as
follows: {||APPT_COLOR} .OR. {||'W+/B'}.

(aTags) is an optional array of record numbers which will
may be modified by the operator. If no valid array name is
passed and the Tag Mode option was enabled in (aOptions)
then the DCTAGS public array will be used for storing the
record tags. If browsing an array, then the tags are handled
by including a sub-element in the array being browsed.

(aData) is an optional multi-dimensional array to browse.
If any value other than an array is passed then the current
database workarea will be browsed. If tagging is enabled,
then one of the elements of each sub-array is used to hold
the logical tag value.

Returns:

    A multi-dimensional array to be passed to DC_DBCHOICE() for
   
pick-list operations.

Description:

DC_DBCHCREATE() is used to create a database pick-list object
or an array pick-list object to be used with DC_DBCHOICE().

This function is used to create "fully-moused" database or
array pick-lists.

Examples:

    -- Example 1 --
   

// Using DC_DBCHCREATE() / DC_DBCHOICE() as a main menu for
// help database

local aObject := ;
DC_DBCHCREATE( { 0, 0, MaxRow(), 79, ' Help Menu ',;
' Edit View Search Print' },;
{ { 'TYPE','Function Type', 15 } ,;
{ 'COMMAND','Command Syntax' },;
{ 'SHORT','Description' } } )
local nInkey, lPaintScrn := lExplode := .t.

do while .t.

select dchelp
aObject := ;
dc_dbchoice( aObject, @nInkey,, lPaintScrn, lExplode )
cCode := chr(nInkey)
store .f. TO lPaintScrn, lExplode

do case

case nInkey=27
exit

case nInkey (= -101
dc_mousekey( { {MaxRow(),0,MaxRow(),9,'E'},;
{MaxRow(),11,MaxRow(),20,'V'},;
{MaxRow(),22,MaxRow(),29,'S'},;
{MaxRow(),31,MaxRow(),37,'P'} } )

case cCode='E'
do editmenu
case cCode='V'
do viewmenu
case cCode='S'
do searchmenu
case cCode='P'
do printmenu

endcase

enddo


-- Example 2 --

// Using DC_DBCHCREATE() / DC_DBCHOICE() to pick a printer
// record.

local nInkey
local aObject := ;
DC_DBCHCREATE( { 2,15,MAXROW()-1, 65, 'Select a Printer' } ,;
{ {'PTR_DESC','Description'} ,;
{'STR(RECNO(),6)','Number' } } )
DC_DBCHOICE( aObject, @nInkey )
IF nInkey = K_ENTER
RETURN RECNO()
ELSE
RETURN 0
ENDIF


-- Example 3 --

// Using DC_DBCHCREATE() / DC_DBCHOICE() to create a
// directory pick-list with an array for tagging files.

local aObject, aDirectory := Directory('*.*'), nInkey, nChoice
local i

for i := 1 TO len(aDirectory)
aadd( aDirectory[i], .f. ) // add element for tag
next

aObject := ;
DC_DBCHCREATE( {2,7,20,73, ' Tag file(s) ',,,,,,,,,.t.,,.t.,,6},;
{ { 1,'Name',12 } ,;
{ 2,'Size',10 } ,;
{ 3,'Date',8 } ,;
{ 4,'Time',8 } ,;
{ 5,'Attr',5 } } ,, aDirectory )

aObject := DC_DBCHOICE( aObject, @nInkey,, .f., .f. )
for i := 1 to len(aDirectory)
if aDirectory[i,6] // tagged element
if dc_msgbox(,,{aDirectory[i,1],'Delete File?'},,,,.t.)
Ferase( aDirectory[i,1] )
endif
endif
next

Source/Library:

_DCDBCHOI.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbchoice()
dc_readdpick()

dc_dbchoice()

A browse-style, moused, database/array pick-list

Syntax:



Arguments:

    (aObject) is an array of window and field information created
   
by DC_DBCHCREATE().

(@nInkey) is a memory variable (passed by reference) to store
the value of the key hit or mouse-event used to exit the
pick-list.

(cUdfName) is a User defined function to call between
keystrokes.

(lPaintItems) if .TRUE. will repaint all items in the display.

(lPaintWindow) if .TRUE. will repaint the entire display window
and all items.

(lExit) if .TRUE. will exit after painting the window and/or
items. If .FALSE. then DC_DBCHOICE() will exit only if a key is
hit that is a non-navigation key.

(nStartRow) is the display row to place the select bar.

(aTags) is an optional array of record numbers which will
may be modified by the operator. If no valid array name is
passed and the Tag Mode option was enabled in the (aObject)
then the DCTAGS public array will be used for storing the
record tags.

Description:

DC_DBCHOICE() is a database pick-list function that supports
one-to-many style picklists, Auto-seeking operation, record
tagging, and mouse.

DC_DBCHOICE() is used with an array object created by
DC_DBCHCREATE().

Examples:

    -- Example 1 --
   

// Using DC_DBCHCREATE() / DC_DBCHOICE() as a main menu for
// help database

local aObject := ;
dc_dbchcreate( { 0, 0, MaxRow(), 79, ' Help Menu ',;
' Edit View Search Print' },;
{ { 'TYPE','Function Type' } ,;
{ 'COMMAND','Command Syntax' },;
{ 'SHORT','Description' } } )
local nInkey, lPaintScrn := lExplode := .t.

do while .t.

select dchelp
aObject := ;
DC_DBCHOICE( aObject, @nInkey,, lPaintScrn, lExplode )
cCode := chr(nInkey)
store .f. TO lPaintScrn, lExplode

do case

case nInkey=27
exit

case nInkey (= -101
dc_mousekey( { {MaxRow(),0,MaxRow(),9,'E'},;
{MaxRow(),11,MaxRow(),20,'V'},;
{MaxRow(),22,MaxRow(),29,'S'},;
{MaxRow(),31,MaxRow(),37,'P'} } )

case cCode='E'
do editmenu
case cCode='V'
do viewmenu
case cCode='S'
do searchmenu
case cCode='P'
do printmenu

endcase

enddo


-- Example 2 --

// Using DC_DBCHCREATE() / DC_DBCHOICE() to pick a printer
// record.

local nInkey
local aObject := ;
DC_DBCHCREATE( { 2,15,MAXROW()-1, 65, 'Select a Printer' } ,;
{ {'PTR_DESC','Description'} ,;
{'STR(RECNO(),6)','Number' } } )
DC_DBCHOICE( aObject, @nInkey )
IF nInkey = K_ENTER
RETURN RECNO()
ELSE
RETURN 0
ENDIF

Source/Library:

_DCDBCHO.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbchcreate()

dc_dbcreate()

Create a .DBF file from a set of parallel arrays

Syntax:



Arguments:

    (cFileName) is the name of the database to create.
   

(aFields) is an array of field names. Each must be a character
value of no more than 10 characters and must start with an
Alphabet character.

(aTypes) is a parallel array of field types. Each must be a
character value with a length of 1. Valid Types are:

"C" - Character
"D" - Date
"L" - Logical
"N" - Numeric
"M" - Memo

(aLengths) is a parallel array of field lengths. Each must be
a numeric value.

(aDecimals) is a parallel array of field decimals. Each must
be a numeric value.

Returns:

    .TRUE. if database is successfully created, .FALSE. otherwise.
   

Description:

DC_DBCREATE() will create a .DBF style database from a set of
parallel arrays. This function is provided in lieu of the
Clipper DBCREATE() function which builds a database from a
ragged array. Many times it is simpler to provide the data in
four "parallel" arrays or four "sub" arrays that in "ragged"
format.

Examples:

    DC_DBCREATE( "CUSTOMER.DBF",;
   
{ "CUST_NAME","CUST_NMBR", "BALANCE" },;
{ "C", "C", "N" },;
{ 25, 5, 9 },;
{ 0, 0, 2 } )

Source/Library:

_DCDBFCR.PRG/.OBJ, DCLIP.LIB

dc_dbeval()

Evaluate set of expression for a database with active Escape

Syntax:



Arguments:

    See Clipper 5.0 Guides  - DBEVAL()
   

Description:

DC_DBEVAL() is functionally equivalent to the Clipper function
DBEVAL() except that the ESCape key is checked after each
record is evaluated and the process will be aborted if ESCape
is pressed.

Examples:

    dc_pretradd( "CLEAN [FOR (for)] [WHILE (while)] =) " + ;
   
"DC_DBEVAL( {||clean()}, ({for}), ({while}),,,)" )

dc_interpret( 'CLEAN FOR SHIP_DATE ( DATE()' )

Source/Library:

_DCEVAL.PRG/.OBJ, DCLIP.LIB

dc_dbfext()

Get default extension of database based on RDD selection

Syntax:



Arguments:

    (cRdd) is the name of the replaceable data driver.  If no
   
argument is given, then the currently selected RDD will be
used.

(cFileName) is an optional parameter provided for
convenience only. If the file name contains an extension,
then the extension in the file name will be returned.

Returns:

    A character string.
   

Description:

DC_DBFEXT() returns the default value of the database file name
extension for the selected database driver or any specified
database driver.

Examples:

    -- Example 1 --
   

set rdd to DBFNTX
? DC_DBFEXT()
.DBF
? DC_DBFEXT('PDX')
.DB


-- Example 2 --

set rdd to DBFSIX
accept 'Enter new database to create' to cDataBase
if file( trim( cDataBase ) + DC_DBFEXT() )
? "File already exists"
else
dc_create( cDataBase )
endif


Source/Library:

_DCDBFX.PRG/.OBJ, DCLIP.LIB

dc_dbfhandle()

Get the dos handle of a work area's database file

Syntax:



Arguments:

    (nArea) is the work area.  If no argument is given, then the
   
current selected work area is default.

Returns:

    The DOS file handle number of the database file in the designated
   
work area. If no file is open in the specified work area, returns -1.

Description:

DC_DBFHANDLE() returns the DOS handle of the database file for
any work area.

Examples:

    . select 3
   
. use customer
. nHandle := DC_DBFHANDLE(3)
. nSavePos := fseek( nHandle, 0, 1 ) // save file pointer
. ? 'Customer.dbf is ' + ;
STR( fseek ( nHandle, 0, 2 ) ) ' bytes long'
. fseek( nHandle, nSavePos, 0 ) // restore file pointer

Source/Library:

_DCAREA.PRG/.OBJ, DCLIP.LIB

dc_dbfile()

Open a database file the right way

Syntax:



Arguments:

    (cDirectory) is the directory to search for the database file.
   
If no argument is given or a null ("") argument is passed, then
the current default directory (SET DEFAULT) will be search,
followed by the current path directory (SET PATH).

(cDataFile) is the name of the database to open. If the file
extension is not included, then the default extension for the
designated RDD is used.

(lUserPrompt) will pop-up a menu to prompt the user if the file
cannot be found.

If (lExclusive) is .TRUE., the file will be opened in
EXCLUSIVE, mode, if .FALSE. it will be opened in SHARED mode.
If no argument is given the file will be opened in the default
system mode.

(nWait) is the number of seconds to wait if a SHARED file
cannot be opened until the user is notified of the error. ( 0
- wait forever ).

(cRdd) is the Replaceable Data Driver to use. If no argument
is given, then the currently selected RDD will be used.

(lReOpen) if .TRUE. will reopen the file in the current work
area even if it is already opened in another work area.

(aStructure) multi-dimensional array that contains the
structure of the data base. This array is only required in
the event that the database could not be found or if you
want to update any existing database to the new structure.
A new database will be created from the information in the
array. If a code block is passed instead of an array, then it
will be evaluated. The code block must return an array of the
same structure as (aStructure). If a fifth element is included
in each sub-array, then a single-record will be appended to
the newly created database with the default information in
element 5.

Element Type Length Description
------- ---- ------ ----------------------------
[1] C 1 Field Name
[2] C 1 Field Type (C,D,N,L,M)
[3] N 4 Field Length
[4] N 2 Field Decimals
[5] Any Any Field Default value. Must be
same type as Field Type.

(cAlias) is the alias to assign to the work area. If no
argument is given, then the name of the database (less the
extension) will be used as the alias.

(lNoErrorDsp) if .TRUE. will suppress any error window output
in the event that the file cannot be opened. If .FALSE.
(default) then errors will be displayed.

(lCreateDbf) if .TRUE. (default) will create the database
from the contents of (aStructure) if the database does not
exist, otherwise if .FALSE., the database will not be
created.


Returns:

    Logical .TRUE. if the file is opened, .FALSE. otherwise.
   

Description:

DC_DBFILE() is used to open a database file in a manner that
will prevent runtime errors. If the file can't be found, the
user will be prompted to enter a directory path to search, or
to abort.

If a structure array is passed then the behavior of DC_DBFILE()
is as follows:

1. If the database is not found in the specified or default
directory, it will be created from the contents of the
array.

2. If the database is opened but any of the fields do not
match the structure of the passed array, then the
database structure will be updated to the array structure
and the old data will be retained.

Examples:

   local aStructure := ;
   
{{'DBF_NAME','C',8,0},;
{'DESC','C',30,0},
{'QUERY','C',1000,0}}
if !DC_DBFILE( DC_SETDCLIP(),'DCQUERY.DBF',.t.,,,'DBFNTX',,;
aStructure)
return .F.
endif

Source/Library:

_DCDBFIL.PRG/.OBJ, DCLIP.LIB

See Also:

dc_struupdate()

dc_dbfname()

Get the full dos name of the current database file

Syntax:



Arguments:

    (nArea) is the work area.  If no argument is given, then the
   
current selected work area is default.

Returns:

    The file name as a character string.
   

Description:

DC_DBFNAME() returns the full file name of the database file
for any work area.

Examples:

    . select 2
   
. use C:\DCLIP3\DCPRINT
. select 4
. use F:\CUSTOMER\INVOICE
. select 6
. use C:\PARADOX\CUST_BOR via 'PDX'
. ? DC_DBFNAME(2)
C:\DCLIP3\DCPRINT.DBF
. ? DC_DBFNAME(4)
F:\CUSTOMER\INVOICE.DBF
. ? DC_DBFNAME(6)
C:\PARADOX\CUST_BOR.DB

Source/Library:

_DCAREA.PRG/.OBJ, DCLIP.LIB

dc_dbfopen()

Invoke a menu to prompt operator for opening a data file

Syntax:



Arguments:

    NONE
   

Returns:

    nil
   

Description:

DC_DBFOPEN() is a high-level function that can be used to
prompt the user for opening a database.

Examples:

    @ 10,10 prompt "open a database"
   
@ 11,10 prompt "open an index"
menu to nChoice
do case
case nChoice = 1
DC_DBFOPEN()
case nChoice = 2
dc_ntxopen()
endcase

Source/Library:

_DCDBFIL.PRG/.OBJ, DCLIP.LIB

dc_dbfrdd()

Get the name of a .DBF RDD that is linked into program

Syntax:



Arguments:

    None.
   

Description:

DC_DBFRDD() returns the name of any RDD linked in the program
that may be used for supporting .DBF style databases. The
list of RDD's starts with DBFNTX, so if DBFNTX is linked into
the program it will be returned otherwise the first RDD in
the list that supports .DBFs will be returned.

Examples:

    ? DC_DBFRDD()
   
COMIX

Source/Library:

_DCRDD.PRG/.OBJ, DCLIP.LIB

dc_dbfsel()

Select a database from a pick list of open files

Syntax:



Arguments:

    NONE
   

Returns:

    The numeric work area of the database selected.
   

Description:

DC_DBFSEL() will pop-up a picklist of all work areas and
display the alias and database file name open in each work
area. It will also allow the user to select an unused work
area to open a new database.

Source/Library:

_DCDBFIL.PRG/.OBJ, DCLIP.LIB

dc_dbindex()

Open an array of index files

Syntax:



Arguments:

    (cDirectory) is the directory to search for the database file.
   
If no argument is given or a null ("") argument is passed, then
the current default directory (SET DEFAULT) will be search,
followed by the current path directory (SET PATH).

(aIndexFile) is an array with the name(s) of the index file(s)
to open. If the file extension is not included, then the default
extension for the designated RDD is used.

(aIndexKey) is a parallel array with index key(s) to be used to
create a new index if the index cannot be found.

(lCreateNew) if .TRUE. will create a new index even if the current
index already exists.

Description:

DC_DBINDEX() is used to open an index file in a manner that
will prevent runtime errors. If the file can't be found, the
user will be prompted to enter a directory path to search, or
to abort.

Notes:

DC_DBINDEX() is included in the library for compatability with
previous versions of dCLIP. It is recommended that you use
DC_OPENNTX() as a replacement.

Examples:

    if !DC_DBINDEX( , { 'DCHELP1', 'DCHELP2', 'DCHELP3' }, ;
   
{'SORT+COMMAND','UPPER(COMMAND)', ;
'CATEGORY+TYPE+SORT+COMMAND'},.f.)
return .f.
endif

Source/Library:

_DCDBIND.PRG/.OBJ, DCLIP.LIB

dc_dbisel()

Pop-up a user-prompt menu to select/open an index file

Syntax:



Arguments:

    NONE
   

Description:

DC_DBISEL() will pop-up a picklist of all open indexes in the
current work area and display the current index key and index
file name for each index order. It will also allow the user to
open or create a new index, reindex all open indexes, or select
a new tag from any index order.

Source/Library:

_DCDBIND.PRG/.OBJ, DCLIP.LIB

dc_dbsel()

Select an alias if it exists and report status

Syntax:



Arguments:

    (cAlias) is the ALIAS name of the work area to select.
   

If a "0" is passed, then the first unused area from the top
down will be selected.

Description:

DC_DBSEL() is used to select a work area by alias name or
to select the first unused work area starting at work area
253 and then decrementing to work area 1.

Use the SELECT(0) function to select the first unused area
from the bottom up. Use DC_DBSEL() to select the first unused
area from the top down.

Examples:

    -- Example 1 --
   

if .not. DC_DBSEL('CUSTOMER')
select 0
dc_opendbf('customer')
endif


-- Example 2 --

DC_DBSEL("0")
? Select()
252
use junk
DC_DBSEL("0")
? Select()
251

Source/Library:

_DCDBSEL.PRG/.OBJ, DCLIP.LIB

dc_dbstru()

Display or Print the structure of the current database

Syntax:



Arguments:

    (nStRow) is the start display row.  Default is 0.
   

(nEndRow) is the end display row. Default is 22.

(lSaveScreen) if .TRUE. will restore the screen after
displaying the structure. If .FALSE. (default) the
structure will remain on the screen.

(cFileName) is the optional name of a file to create.
This ascii file will contain the structure of the file.

Returns:

    A character string with the name of the field selected.
   

Description:

DC_DBSTRU() will display the structure of the currently
selected database. A menu at the bottom of the display will
allow the operator to print the database structure.

Source/Library:

_DCDBSTR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbstruw()

dc_dbstruct()

Return the structure of current database in parallel arrays

Syntax:



Arguments:

    (nArea) is the database work area.  If no argument is given
   
then the currently selected work area is default.

Returns:

    A multi-dimensional array with four sub arrays all of the same length.
   

Array 1 - Field Names (character)
Array 2 - Field Types (character)
Array 3 - Field Lengths (numeric)
Array 4 - Field Decimals (numeric)

Description:

DC_DBSTRUCT() is similar to the Clipper DBSTRUCT() function,
except that it returns the structure in an array of four (4)
parallel sub-arrays rather than in ragged arrays.

Examples:

    // use a Paradox table
   
use cust_bor via 'pdx'

// save the structure
aStru := DC_DBSTRUCT()

// create a .DBF of the same structure
dc_dbcreate( 'cust_bor.dbf', ;
aStru[1], aStru[2], aStru[3], aStru[4] )

Source/Library:

_DCAREA.PRG/.OBJ, DCLIP.LIB

dc_dbstruw()

Display database structure in wide format

Syntax:



Arguments:

    (nStartRow) is the Start display Row.
   

(nStartCol) is the Start display Column.

(nEndRow) is the End display Row.

(nEndCol) is the End display Column.

Description:

DC_DBSTRUW() will display the structure of a database in WIDE
format to be used as a reference for entering commands or
functions that include database fields.

Examples:

    . use customer
   
. DC_DBSTRUW( 5,5,20,75 )

Source/Library:

_DCDBSTR.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbstru()

dc_dbt2fpt()

Convert .DBT memo file(s) to .FPT memos

Syntax:



Arguments:

    (cFileName) is the name of the .DBT file to convert.  If no
   
parameter is passed, a dialog box will appear with an option
to pick a file from a directory pick-list. If "ALL" is passed
then all files with the .DBT extension in the DEFAULT directory
will be converted.

Returns:

    A logical .TRUE. if the conversion was successful, .FALSE.
   
otherwise.

Description:

DC_DBT2FPT() is used to convert .DBT style memo files to .FPT
style memo files for compatability with the COMIX, DBFCDX,
SIXCDX, DBFCDXAX drivers or any other FoxPro compatible driver.

Use DC_DBT2FPT() when converting an existing system from the
DBFNTX driver to a FoxPro compatible driver.

Source/Library:

_DCRDD.PRG/.OBJ, DCLIP.LIB

See Also:

DBTCONVERT

dc_dbtext()

Get default extension of the current memo file based on RDD

Syntax:



Arguments:

    (cRdd) is the name of the replaceable data driver.  If no
   
argument is given, then the currently selected RDD will be
used.

Returns:

    A character string.
   

Description:

DC_DBTEXT() returns the default value of the memo file name
extension for the selected database driver or any specified
database driver.

Examples:

    set rdd to DBFNTX
   
? DC_DBTEXT()
.DBT
? DC_DBTEXT('DBFSIX')
.FPT

Source/Library:

_DCDBFX.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbfext()

dc_dbthandle()

Get the handle of the current memo file

Syntax:



Arguments:

    (nArea) is the work area.  If no argument is given, then the
   
current selected work area is default.

Returns:

    The DOS file handle number of the database memo file in the
   
designated work area. A -1 is returned if no file is open in the
specified work area, or the database in the designated work area does
not contain a memo field.

Description:

DC_DBTHANDLE() returns the DOS handle of the database memo file
for any work area.

Examples:

    . select 3
   
. use customer
. nHandle := DC_DBTHANDLE(3)
. nSavePos := fseek( nHandle, 0, 1 ) // save file pointer
. ? 'Customer.dbt is ' + ;
STR( fseek ( nHandle, 0, 2 ) ) ' bytes long'
. fseek( nHandle, nSavePos, 0 ) // restore file pointer

Source/Library:

_DCAREA.PRG/.OBJ, DCLIP.LIB

dc_dbtname()

Get the name of the current memo file

Syntax:



Arguments:

    (nArea) is the work area.  If no argument is given, then the
   
current selected work area is default.

Returns:

    The file name as a character string.
   

Description:

DC_DBTNAME() returns the full file name of the database file
memo file for any work area.

Examples:

    . select 2
   
. use C:\DCLIP3\DCPRINT
. select 4
. use F:\CUSTOMER\INVOICE
. select 6
. use C:\FOX\CUST_FOX via 'DBFSIX'
. ? DC_DBTNAME(2)
C:\DCLIP3\DCPRINT.DBT
. ? DC_DBTNAME(4)
F:\CUSTOMER\INVOICE.DBT
. ? DC_DBTNAME(6)
C:\FOX\CUST_FOX.FPT

Source/Library:

_DCAREA.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbfname()

dc_dbxadd()

Store an array, screen, object, etc. to a DBX file record

Syntax:



Arguments:

    (nHandle) is the file handle returned by DC_DBXOPEN() or
   
DC_DBXCREATE().

(xValue) is the data type to store.

Returns:

    A two-byte character that is a pointer to the record number in the
   
.DBX data base.

Description:

DC_DBXADD() is used to write any data type to a .DBX file
format.

Examples:

    . use SCREENS.DBF
   
. nHandle := dc_dbxopen('SCREENS.DBX')
. save screen to cScreen
. replace SCREENS-)SCRN_NMBR with ;
DC_DBXADD( nHandle, cScreen )

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

dc_dbxclose()

Close a DBX database

Syntax:



Arguments:

    (nHandle) is the file handle returned by DC_DBXOPEN() or
   
DC_DBXCREATE().

Returns:

    A logical .TRUE. if the file closed properly, .FALSE. otherwise.
   

Description:

DC_DBXCLOSE() is used to close a .DBX database.

Examples:

    . use SCREENS.DBF
   
. nHandle := dc_dbxopen('SCREENS.DBX')
. save screen to cScreen
. replace SCREENS-)SCRN_NMBR with ;
dc_dbxadd( nHandle, cScreen )
. close screens
. DC_DBXCLOSE(nHandle)

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

dc_dbxcreate()

Create a new DBX database for storing any data type

Syntax:



Arguments:

    (cFileName) is the name of the .DBX style database to create.
   
If no extension is given, then .DBX is default.

(nMode) is the read/write mode for opening the database.

Mode Description
---- ---------------------------
0 Open for reading (default)
1 Open for writing
2 Open for reading and writing

Description:

DC_DBXCREATE() is used to create a new .DBX style database.

A .DBX style database allows storage of data types of any type
including multi-dimensional arrays, long character strings,
screens, etc. Data stored in a .DBX file is automatically
"compressed" and "decompressed" to use the smallest possible
disk space.

.DBX databases store data in variable-length fields rather than
the fixed-length fields of .DBF files.

Examples:

    . use SCREENS.DBF
   
. nHandle := DC_DBXCREATE('SCREENS.DBX')
. save screen to cScreen
. replace SCREENS-)SCRN_NMBR with ;
dc_dbxadd( nHandle, cScreen )

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

dc_dbxget()

Get the value of a stored element in a DBX database

Syntax:



Arguments:

    (nHandle) is the file handle returned by DC_DBXOPEN() or
   
DC_DBXCREATE().

(cPointer) is the "record number" to extract. This is the
2-character value returned by DC_DBXADD() when the information
was stored.

Description:

DC_DBXGET() is used to extract the value of any memory
variable or array that was previously stored in a .DBX
style database using DC_DBXADD().

Examples:

    FUNCTION rest_screen ( screen_id )
   

use SCREENS.DBF
locate for SCREENS-)SCRN_ID == screen_id
nHandle := dc_dbxopen('SCREENS.DBX')
cDbxRec := SCREENS-)SCRN_NMBR
cScreen := DC_DBXGET( nHandle, cDbxRec )
restore screen from cScreen
dc_dbxclose( nHandle )
close screens

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

dc_dbxopen()

Open a DBX database file for storing any data type

Syntax:



Arguments:

    (cFileName) is the name of the .DBX style database to open.
   
If no extension is given, then .DBX is default.

(nMode) is the read/write mode for opening the database.

Mode Description
---- ---------------------------
0 Open for reading (default)
1 Open for writing
2 Open for reading and writing

Description:

DC_DBXOPEN() is used to open a .DBX style database.

A .DBX style database allows storage of data types of any type
including multi-dimensional arrays, long character strings,
screens, etc. Data stored in a .DBX file is automatically
"compressed" and "decompressed" to use the smallest possible
disk space.

.DBX databases store data in variable-length fields rather than
the fixed-length fields of .DBF files.

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

dc_dbxrestore()

Restore any memory value or array from a .DBX-style file

Syntax:



Arguments:

    (cFileName) is the name of the file to create.  If no path is
   
given then the file will be created in the current SET DEFAULT
directory.

Returns:

    A logical .TRUE. if the file was properly created, .FALSE. otherwise.
   

Description:

DC_DBXRESTORE() is used to restore the contents of any data
type or array from a file to be created by DC_DBXSAVE().

Examples:

    dc_dbxsave( 'DIR.DBX', Directory() )
   
aDir := DC_DBXRESTORE( 'DIR.DBX' )
dc_abrowse(aDir)

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbxsave()

dc_dbxsave()

Save any memory value or array to a .DBX-style file

Syntax:



Arguments:

    (cFileName) is the name of the file to create.  If no path is
   
given then the file will be created in the current SET DEFAULT
directory.

(xValue) is the value to store. This may be any data type
including arrays, but excluding code-blocks.

Returns:

    A logical .TRUE. if the file was properly created, .FALSE. otherwise.
   

Description:

DC_DBXSAVE() is used to store the contents of any data type or
array to a file to be restored by DC_DBXRESTORE().

Examples:

    DC_DBXSAVE( 'DIR.DBX', Directory() )
   
aDir := dc_dbxrestore( 'DIR.DBX' )
dc_abrowse(aDir)

Source/Library:

_DCDBX.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbxrestore()

dc_decrypt()

Decrypt a value that was encrypted by DC_Encrypt()

Syntax:



Arguments:

    (xValue) is a character string or numeric value.
   

(cKey) is a character sequence, of any length, to use as
a "seed" for the decryption. If this parameter is not
passed, then a default seed will be used.

Returns:

    An decrypted value of the same type as the original value.
   

Description:

DC_DECRYPT() is used to decrypt a character string, memo or
numeric value that was previously encrypted with DC_ENCRYPT().

Examples:

    -- Example 1 --
   

a := DC_Encrypt( "This is a test","CLIPPER" )
? a
—¤ £ð¬¡ã­é¤µ¶¦

? DC_DECRYPT( a, "CLIPPER" )
This is a test


-- Example 2 --

a := DC_Encrypt( 23456.289, "CLIP53" )
? a
59236.515

? DC_DECRYPT( a, "CLIP53" )
23456.289

Source/Library:

_DCENCRY.PRG/.OBJ, DCLIP.LIB

See Also:

dc_encrypt()

dc_delete()

Pop-up a user-prompt menu for deleting database records

Syntax:



Arguments:

    NONE
   

Returns:

    A logical .TRUE. if the delete process is successfully completed.
   

Description:

DC_DELETE() is a high-level function that provides a
user-interface menu for deleteing records in a work area.

DC_DELETE() prompts the user for information about files and
scoping conditions (with pick-list options), then displays a
progress-Odometer during the deleting process followed by the
final tally results.

Examples:

    . use invoice
   
. use invitems new
. set relation to inv_nmbr into invoice
. DC_DELETE()

Source/Library:

_DCDELE.PRG/.OBJ, DCLIP.LIB

dc_dictadd()

Add an array of field definitions to dCLIP's dictionary

Syntax:



Arguments:

    ([cAlias]) is the ALIAS() of the database descriptors to
   
add. If no parameter is passed, then the ALIAS() of the
current work area will be used.

(aDictionary) is a multi-dimensional array consisting of
four (4) parallel arrays. The first array is required
but the remaining 3 arrays are optional.

Sub-Array Description
--------- ---------------------------------------
[1] Field Name Descriptors
[2] Picture Clauses
[3] Validation Expressions
[4] When Expressions (for DC_DBEDIT() only)

The ordinal position of each item in the arrays must
correspond to the ordinal position of each field in the
database.

Returns:

    nil
   

Description:

DC_DICTADD() is used to load an array of field DESCRIPTORS,
PICTURE clauses, VALIDATION expressions, and WHEN expressions
into the public array named DCDICT. The existence of this
array is checked by most of the dCLIP functions, such as
the browse/edit system, query-builder, etc. and the
descriptors in the array are used in lieu of the database
field names in the browse screens, edit screens and pick
list screens. Use DC_DICTADD() if you want to customize
the way DC_EDITDB() and DC_BROWSEDB() behave when displaying
or editing databases.

Examples:

    use sales
   
DC_DICTADD('SALES',;
{ { 'Year','Month','Sales','Expenses' } ;
{ '9999',,,} ;
{ 'YEAR(1999','MonthValid(MONTH)',,} ;
{} } )
dc_editdb()

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dictcheck()

Check if a dictionary is loaded

Syntax:



Arguments:

     This function is not completed.
   

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dictclose()

Set flag to determine Open/Close behavior of DC* Files

Syntax:



Arguments:

    (lClose) if .TRUE. (default) will close DC*.DBF files after
   
they are opened to extract data-dictionary information. If
.FALSE., the files will remain open.

Returns:

    The previous setting of the flag.
   

Description:

DC_DICTCLOSE() is used to establish whether or not dCLIP
Dictionary database files (DC*.DBF) should remain opened
after they are accessed. For example, the DCMENU.DBF file is
opened and used to extract a menu and store it to an array.
After storing the menu, the file is closed to save on file
handles and memory. If your system has sufficient memory and
file handles available, then it is recommended that you place
a call to DC_DICTCLOSE(.f.) at the beginning of your
application. This is also recommended if you are using a
data-driver such as Advantage xBASE Server, because some data-
drivers are slower at opening and closing files.


Source/Library:

_DCMEM.PRG/.OBJ, DCLIP.LIB

dc_dictedit()

Edit field name descriptors

Syntax:



Arguments:

     This function is not completed.
   

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dictexp()

Automatically Export changes to Dictionaries

Syntax:



Arguments:

    IF (lAutoExport) is .TRUE. then every time a dictionary is
   
modified the data will be exported.

Returns:

    A logical value containing the previous setting.
   

Description:

DC_DICTEXP() is used to set a flag to automatically export changes
to DX* files at the same time they are saved to the associated DC*
file.

Examples:

    DC_DICTEXP(.t.)
   

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dictimp()

Import all Import Dictionaries

Syntax:



Arguments:

    None.
   

Returns:

    A logical .TRUE. if the import was successful.
   

Description:

DC_DICTIMP() is used to import all DX*.DBF files into data
dictionaries. The directory established by DC_SetDclip() will
be used to look for the Import dictionaries and the standard
dictionaries.

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dictrdd()

Post or get name of RDD to be used for dictionary files

Syntax:



Arguments:

    (cRdd) will set the name of the RDD to use.  If no parameter
   
is passed then the current RDD name will be returned. The
default RDD is the value returned by DC_DBFRDD().

Returns:

    A character string.
   

Description:

DC_DICTRDD() is used to establish the name of the RDD to use
for the dCLIP dictionary files. These files are designed as
.DBF format files therefore it should be an RDD that supports
.DBF format or an error may occur. The default RDD used for
dictionary files is the value returned by DC_DBFRDD().

Notes:

The following are dCLIP dictionary files:

DCFIELDS.DBF
DCFILES.DBF
DCMENU.DBF
DCKEY.DBF
DCSCRN.DBF
DCBROWSE.DBF
DCEDIT.DBF
DCCODES.DBF
DCUSER.DBF
DCLOCKS.DBF

Examples:

    /* -- Use the COMIX driver for dictionary files -- */
   
? DC_DICTRDD("COMIX")

Source/Library:

_DCRDD.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dbfrdd()

dc_dictrest()

Restore user-defined field name descriptors from DCDICT.DBF

Syntax:



Arguments:

     This function is not completed.
   

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dictsave()

Save user-defined field name translations to DCDICT.DBF

Syntax:



Arguments:

     This function is not completed.
   

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dicttran()

Translate a field name to Dictionary name

Syntax:



Arguments:

     This function is not completed.
   

Source/Library:

_DCDICT.PRG/.OBJ, DCLIP.LIB

dc_dimat()

Dim an area of the screen

Syntax:



Arguments:

    (cBuffer) is an area of the screen saved with the SAVESCREEN()
   
function.

Returns:

    A character string.
   

Description:

DC_DIMAT() will dim an area of the screen by swapping the color
attribute in the save screen string.

Examples:

     // dim screen
   
cBuffer := SaveScreen( 10, 20, 15, 60 )
RestScreen( 10, 20, 15, 60, DC_DIMAT( cBuffer ) )
// Restore Screen
RestScreen( 10, 20, 15, 60, cBuffer )

Source/Library:

DIMAT.ASM/.OBJ, DCLIPR.LIB

dc_dir()

Display a listing of files by wildcard

Syntax:



Arguments:

    (cFileSpec) is a wildcard argument for the files to list.
   

(nStartRow), (nStartCol), (nEndRow), (nEndCol) are the screen
coordinates of the window to display the directory listing. If
no coordinates are passed, the entire screen will be used.

If (lWindow) is a .TRUE. then the screen coordinates are not
used and the directory will be displayed in a scrollable
window, otherwise the directory will be displayed in the
screen coordinates.

Returns:

    NIL
   

Description:

DC_DIR() is used to display a directory of specified files in
specified window coordinates.

Examples:

    @ 11,10 prompt "Erase a File"
   
@ 12,10 prompt "Copy a File"
@ 13,10 prompt "Display Directory"
menu to nChoice
do case
case nChoice = 1
dc_erase()
case nChoice = 2
dc_copyto()
case nChoice = 3
DC_DIR()
endcase

Source/Library:

_DCDIR.PRG/.OBJ, DCLIP.LIB

See Also:

DIR

dc_dirdata()

Display a listing of database files and status

Syntax:



Arguments:

    (lRestoreScreen) if .TRUE. will save and restore the screen.
   
.FALSE. is the default.

(lWindow) if .TRUE. will display the directory in a
scrollable window.

Returns:

    NIL
   

Description:

DC_DIRDATA() is used to display a listing of data files from
the currently selected default (SET DEFAULT) directory.

The list includes the database filename, size, date of last
update, number of records, and database/memo type.

Examples:

    @ 11,10 prompt "Open a database"
   
@ 12,10 prompt "Display Database Directory"
@ 13,10 prompt "Browse database"
menu to nChoice
do case
case nChoice = 1
dc_dbfopen()
case nChoice = 2
DC_DIRDATA(.t.)
case nChoice = 3
dc_browsedb()
endcase

Source/Library:

_DCDIR.PRG/.OBJ, DCLIP.LIB

See Also:

DIR

dc_directory()

Pop-up user-prompt for displaying files in current directory

Syntax:



Arguments:

    NONE
   

Returns:

    Nil
   

Description:

DC_DIRECTORY() is a high-level function that prompts a user
to enter a wild-card for listing the contents of the
current directory. If the operator leaves the input blank
then a directory listing of database files in the current
default directory will be listed, otherwise files in the
current DOS directory will be listed.

Source/Library:

_DCDIR.PRG/.OBJ, DCLIP.LIB

See Also:

DIR
dc_dirpick()

dc_dirpick()

A Pick-list of Directories, Drives and Files

Syntax:



Arguments:

    (nStrow), (nStCol), (nEnRow) are the screen coordinates.  If
   
none are passed then the window will be centered in the screen.

(lFilePick) if .TRUE. will return the directory and filename
chosen, otherwise only the directory name chosen will be
returned.

(aWildCard) is an array of file-spec character strings
representing the files to display in the file pick-list.

(cDirectory) is the drive and directory to select as the
default. If no parameter is passed then the currently
selected directory will be the default.

Returns:

    The directory name chosen if (lFilePick) is .FALSE. or the
   
directory and file name chosen if (lFilePick) is .TRUE.

A null-string will be returned if the operation is cancelled.

Description:

DC_DIRPICK() is used to select a directory and/or a file
from a Windows-style dialogue box with 3 picklists:
Directories, Drives, and Files.

Examples:

    DC_DIRPICK( ,,,.t.,{'*.COM','*.EXE'} )
   

Source/Library:

_DCCHOICE.PRG/.OBJ, DCLIP.LIB

See Also:

dc_filepick()
DIR

dc_disparr()

Display the contents of a multi-dimensional array

Syntax:



Arguments:

    (aArray) is the array to display.
   

(cArrayName) is the "name" of the array to display. This type
of argument is supported for compatability with previous
versions of dCLIP libraries.

(cOutput) is the output mode. If left blank then the output
will go to the screen. If (cOutput) is "PRN" the output will
go to the printer. IF (cOutput) is any other character string,
the output will go to a file named (cOutput).

Description:

DC_DISPARR() will display the contents of a multi-dimensional
array in "indented" format.

Source/Library:

_DCDARR.PRG/.OBJ, DCLIP.LIB

See Also:

DISPLAY ARRAY

dc_dispbegin()

Begin buffering screen output

Syntax:



Arguments:

    None
   

Returns:

    nil
   

Description:

Clipper's DISPBEGIN() and DISPEND() functions will not behave
properly if they are not nested properly, i.e. the same number
of DISPBEGIN() calls and DISPEND() calls. DC_DISPBEGIN()
and DC_DISPEND() are simply front-end calls to the associated
Clipper functions that keep a static counter ensuring that
DC_DISPCLEAR() can properly clear out the buffers in the error
handler.

Notes:

Use DC_DISPBEGIN() and DC_DISPEND() in place of Clipper's
DISPBEGIN() and DISPEND() when using DC_DISPCLEAR() to
clear the display buffers.

Examples:

    See Clipper 5.x Guides DISPBEGIN(), DISPEND()
   

Source/Library:

_DCDISP.PRG/.OBJ, DCLIP.LIB

dc_dispclear()

Clear the screen output buffers

Syntax:



Arguments:

    None
   

Returns:

    Nil
   

Description:

DC_DISPCLEAR() is used in your error handler to clear the
display buffers during an error. This function is needed
only if you use Clipper's DISPBEGIN() and DISPEND() in your
application.

Clipper's DISPBEGIN() and DISPEND() functions will not behave
properly if they are not nested properly, i.e. the same number
of DISPBEGIN() calls and DISPEND() calls. DC_DISPBEGIN()
and DC_DISPEND() are simply front-end calls to the associated
Clipper functions that keep a static counter ensuring that
DC_DISPCLEAR() can properly clear out the buffers in the error
handler.

Notes:

Use DC_DISPBEGIN() and DC_DISPEND() in place of Clipper's
DISPBEGIN() and DISPEND() when using DC_DISPCLEAR() to
clear the display buffers.

Examples:

    See Clipper 5.x Guides DISPBEGIN(), DISPEND()
   

Source/Library:

_DCDISP.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dispbegin()
dc_dispend()

dc_dispend()

End buffering screen output

Syntax:



Arguments:

    None
   

Returns:

    Nil
   

Description:

Clipper's DISPBEGIN() and DISPEND() functions will not behave
properly if they are not nested properly, i.e. the same number
of DISPBEGIN() calls and DISPEND() calls. DC_DISPBEGIN()
and DC_DISPEND() are simply front-end calls to the associated
Clipper functions that keep a static counter ensuring that
DC_DISPCLEAR() can properly clear out the buffers in the error
handler.

Notes:

Use DC_DISPBEGIN() and DC_DISPEND() in place of Clipper's
DISPBEGIN() and DISPEND() when using DC_DISPCLEAR() to
clear the display buffers.

Examples:

    See Clipper 5.x Guides DISPBEGIN(), DISPEND()
   

Source/Library:

_DCDISP.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dispbegin()

dc_dispmem()

Display the contents of memory

Syntax:



Arguments:

    (cMemFileName) is the name of the .MEM file to display.  If no
   
argument is passed or a null ("") argument is passed, then a
snapshot of current memory variables is displayed.

(cOutFileName) is the name of the file to save the displayed
information. If no argument or a null ("") argument is passed,
then the information will be displayed to the screen. Enter
"PRN" to output to the printer.

(lAppend) if .TRUE. will append the information to (cOutFileName)
otherwise the file will be overwritten.

Description:

DC_DISPMEM() is used to display and/or print all memory
variables (except arrays), including values, or to display
and/or print the contents of a .MEM memory file.

Notes:

DC_DISPMEM() displays the names of all the current memory
variables, the variable type, and the contents of the variable.
If the variable type is a "C", then the length is also
displayed.

Source/Library:

_DCDBMEM.PRG/.OBJ, DCLIP.LIB

See Also:

DISPLAY MEMORY

dc_dllfree()

Release a Blinker-compatible Dynamic-link Library

Syntax:



Arguments:

    (cDllName) is the name of the .DLL to release.  If the parameter
   
"ALL" is passed, then ALL dynamic-link libraries will be
released.


Source/Library:

_DCDLL.PRG, DCLIP.LIB

See Also:

DLL FREE

dc_dllload()

Load a Blinker-compatible Dynamic-Link Library

Syntax:



Arguments:

    (cDllName) is the name of the .DLL to load.  If this parameter
   
is not passed, a dialogue box will be displayed to prompt the
user for a name.

Returns:

    A numeric value equivalent to the "handle" of the .DLL.
   

Description:

DC_DLLLOAD() is used to load a dynamic-link library (.DLL) that
was previously created by Blinker 4.0 or later.

Source/Library:

_DCDLL.PRG, DCLIP.PRG

See Also:

DLL LOAD

dc_do()

A handy method of creating a late-binding call to a function

Syntax:



Arguments:

    (cProgToDo) is the name of the procedure or function to execute
   
in "quotes".

(cProgToCall) is the name of any additional procedure or
function to execute in the event that DC_DO() cannot find
procedure (cProgToDo) in the .EXE or in a dynamic library.

Returns:

    The value returned by the function called.
   

Description:

DC_DO() is used to run any program or function. DC_DO() is
used in place of DO (proc) or (function) in applications where
the developer wishes to control which procedures or functions
get linked into an application by simple EXTERNAL tables.

DC_DO() runs procedures or functions, but does not force the
linker to link them into the .EXE program. For example, the
command: DO ACCTSPAY in an application would always force the
module or object ACCTSPAY to be linked into the .EXE by your
linker. If however, you replace DO ACCTSPAY with
DC_DO('ACCTSPAY'), then the ACCTSPAY module will only be linked
in to the .EXE with an EXTERNAL ACCTSPAY command or by the
dCLIP "dynamic-linker". DC_DO() should be used when calling
procedures or functions which are in dynamic libraries (.DLBs).

With DC_DO() the developer can create an application with many
OPTIONS yet use common source code. The options for a
specific customer or product configuration can be controlled
through EXTERNAL tables.

Examples:

    . ? DC_DO( "dc_assist()" )
   

Source/Library:

_DCDO.PRG/.OBJ, DCLIP.LIB

See Also:

DO

dc_docase()

Evaluate a set of expressions based on a CASE

Syntax:



Arguments:

    (aCase) is an array of code blocks to evaluate.
   

(aEval) is an array of code blocks to execute. The first code
block in array (aCase) that evaluates true will force the
corresponding code block in the parallel array (aeval) to be
evaluated.

Returns:

    nil
   

Description:

DC_DOCASE() is a "function" replacement for DO CASE...ENDCASE
when a function is needed, i.e. for calling via macro, code
blocks, etc.

Notes:

Only one (1) code block in the (aEval) array will be evaluated.

Examples:

    aCase := { { || lastkey()=27 }, { || lastkey()=13 } }
   
aEval := { { || abort() }, { || accept() } }

inkey(0)
DC_DOCASE( aCase, aEval )

Source/Library:

_DCEVAL.PRG/.OBJ, DCLIP.LIB

See Also:

CASE

dc_dot()

Full dot-prompt interpreter for all Clipper/dCLIP commands

Syntax:



Arguments:

    (cBatchFile) is an optional batch file to run after invoking
   
the dot.

(lClearScreen) if .TRUE. (default) will clear the screen to
the default color for the dot-prompt, otherwise only the
dot-prompt command-line will be displayed at the bottom of
the screen and the status area at the top of the screen.

(lSaveKeys) if .TRUE. (default) will save and clear all
SET KEYS before calling the dot and then restore them upon
return.

Returns:

    NIL
   

Description:

DC_DOT() is a DOT-PROMPT interpreter that supports all Clipper
commands and all commands that have been loaded into the
interactive pre-processor array.

DC_DOT() is the main dot prompt program of dCLIP. All commands
and expressions supported by dCLIP will be supported by
DC_DOT() provided that you have included EXTERNAL statements
in your source code to link in all supporting modules.

Notes:

You will get "Can't find Object" errors when using many
commands if the function that is called by the command via the
internal pre-processor is not linked into memory.

To insure that all Clipper functions are linked into the
program, use the command EXTERNAL DC_EXTCL() in at least one
of your source programs.

To insure that all dCLIP functions are linked into the
program, use the command EXTERNAL DC_EXTD1() in at least one
of your source programs.

Examples:

    // Invoke a Dot prompt
   
// Exit with . RETURN or . EXIT
DC_DOT()

Source/Library:

_DCDOT.PRG/.OBJ, DCLIP.LIB

See Also:

dc_qdot()
dc_interpret()
dc_program()

dc_dotdoskey()

Set Clipper command stack operation to Dos-Key emulation

Syntax:



Arguments:

    (lMode) if .TRUE. will set the Dos-Key emulation on.  If
   
.FALSE. the command stack operation will be restored to
the normal (default) operation.

Returns:

    A logical value equivalent to the last setting of the
   
value.

Description:

DC_DOTDOSKEY() is used to set the behavior of the dot-prompt
command stack navigator to emulate that of DOS command
stack navigators like Dos-Key or OS/2.

The normal behavior allows commands to be reissued in
sequence and expedite processes that are used again and
again. Dos-Key emulation automatically copies the selected
command to the bottom of the stack after execution and
creates a blank command line for input.

Examples:

    DC_DOTDOSKEY(.t.)
   

Source/Library:

_DCDOT.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dot()
SET DOSKEY
DOSKEY =

dc_dotsize()

Increase/Decrease the size of the Dot-prompt command stack

Syntax:



Arguments:

    (nSize) is a number from 100 to 4000.
   

Returns:

    A numeric value equal to the previous setting of the
   
command stack size.

Description:

DC_DOTSIZE() is used to increase the length of the Dot-Prompt
command stack array to a value greater than the default value
of 100 commands. This is desirable in the event that it is
necessary to save and restore more than the last 100 commands
with the HISTORY=(file) command in your DCLIP.SYS.

Examples:

    DC_DOTSIZE(500)
   

Source/Library:

_DCDOT.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dot()
SET DOTSTACK
DOTSTACK =

dc_dotstatus()

Set the Dot-Prompt Status area ON or OFF

Syntax:



Arguments:

    (lMode) if .TRUE. will set the Status Area display ON (default).
   
If .FALSE. Status Area display will be turned OFF.

Returns:

    A logical value equivalent to the last setting of the
   
value.

Description:

DC_DOTSTATUS() is used to turn ON or OFF the display of
status information about the current work area. The top
five (5) lines of the display are used to display the
work-area information.

Examples:

    DC_DOTSTATUS(.f.) // Turn of status area
   

Source/Library:

_DCDOT.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dot()
SET STATUS

dc_dowhile()

Evaluate series of expressions while an expression is true

Syntax:



Arguments:

    (bWhile) is a code-block to evaluate in each iteration of the
   
WHILE loop. The loop will be terminated when (bWhile)
evaluates .FALSE. or when the ESCape key is pressed.

(bEval) is a code-block to evaluate in each iteration of the
WHILE loop.

Returns:

    nil
   

Description:

DC_DOWHILE() is a "function" replacement for DO WHILE..ENDDO
loops to be used when a function is needed, i.e. for calling
via macro, code blocks, etc.

Examples:

    bWhile := { || !EOF() }
   
bEval := { || dbskip(1), qout( recno(), &(field(1)) ) }
setkey( -1, { || DC_DOWHILE( bWhile, bEval } )

Source/Library:

_DCEVAL.PRG/.OBJ, DCLIP.LIB

dc_drag()

Drag window coordinates and return a coordinate array

Syntax:



Arguments:

    (nStRow), (nStCol), (nEnRow), (nEnCol) are the screen
   
coordinates that you want to start the drag or window sizing
from. If no coordinates are passed then the dragging will
start from the extreme coordinates of the display.

(nDragMode) : DRAG_UPPER_LEFT 1
DRAG_UPPER_RIGHT 2
DRAG_LOWER_LEFT 3
DRAG_LOWER_RIGHT 4
DRAG_LEFT 5
DRAG_RIGHT 6
DRAG_UPPER 7
DRAG_LOWER 8
DRAG_ENTIRE_BOX 9

(nMinWidth) is the minimum width of the new box.

(nMidHeight) is the minimum height of the new box.





Returns:

    An array of four (4) elements with the coordinates selected by
   
the user.

Description:

DC_DRAG() is used to designate an area of the screen you want
to use by giving the operator a box to drag around with the
cursor keys or the mouse. After the operator has chosen the
screen coordinates, pressing the (enter) key or releasing the
mouse button will return the 4 coordinates in an array.

During the dragging process if the drag was not invoked by
the mouse, then the TAB key will switch between the 9
dragging modes.

Examples:

    // get a set of screen coordinates from the operator.
   
aCoord := DC_DRAG( aCoord )

// Explode a window to the passed coordinates.
DC_EXPL( aCoord[1], aCoord[2], aCoord[3], aCoord[4] )

Source/Library:

_DCDRAG.PRG/.OBJ, DCLIP.LIB

dc_drivepick()

A Pick-List to choose a disk-drive

Syntax:



Arguments:

    (nStrow), (nStCol), (nEnRow) are the screen coordinates.  If
   
none are passed then the window will be centered in the screen.

Returns:

    The name of the drive chosen.
   

A null-string will be returned if the operation is cancelled.

Description:

DC_DRIVEPICK() is used to select a drive from a picklist.
All drive letters from A: through Z: will be included in
the picklist.

Examples:

    DC_DRIVEPICK( 10,40,20 )
   

Source/Library:

_DCCHOICE.PRG/.OBJ, DCLIP.LIB

See Also:

dc_dirpick()
dc_filepick()
dc_choice()

dc_dump()

Dump the contents of a binary file in Ascii-Hex

Syntax:



Arguments:

    (cFileName) is the name of the file to dump.
   

(lSaveScreen) if .TRUE. (default) will save and restore the
screen.

Returns:

    nil
   

Description:

DC_DUMP() is used to dump the contents of any binary file to
the screen. The file contents will be displayed in both
hexidecimal and ascii.

Examples:

    SET ALTERNATE TO CUSTOMER.DMP
   
SET ALTERNATE ON
DC_DUMP('CUSTOMER.DBF')
SET ALTERNATE TO
SET ALTERNATE OFF

Source/Library:

_DCDUMP.PRG/.OBJ, DCLIP.LIB

See Also:

DUMP

dc_editimp()

Import Edit(s) from the Import Editing Dictionary

Syntax:



Arguments:

    (cEditName) is the name of the edit.  This is a name of
   
up to eight (8) digits. If an edit name is passed then
the DXEDIT.DBF database will be searched and all edit
items that match the edit name be imported into DCEDIT.DBF.
If no name is passed, then a pick-list of all edits stored
in the DXEDIT.DBF database will be displayed.

If "ALL" is passed as the edit name, then all edits in the
DXEDIT.DBF will be imported into DCEDIT.DBF.

Returns:

    A logical .TRUE. if the edit was imported successfully.
   


Description:

DC_EDITIMP() is used to import edit configurations from a
DXEDIT.DBF file into the DCEDIT.DBF file.

Notes:

The DCEDIT.DBF file is the data-dictionary database that
contains all data-entry configurations. If this file does not
exist in your default directory or path then it will be created.
The DXEDIT.DBF file is the data-dictionary database that contains
all edits that were exported from another system.

Source/Library:

_DCEDIT4.PRG/.OBJ, DCLIP.LIB

See Also:

EDIT IMPORT

dc_editkdis()

Disable specified keys in the editing system

Syntax:



Arguments:

    (aKeys) is an array of numeric (INKEY()) values.
   

Returns:

    An array containing the previous setting.
   

Description:

DC_EDITKDIS() is used to disable keys in the Data Entry system
(DC_EDITDB()). Pass this function an array of numeric INKEY()
values to disable keys that are normally active while in the
Edit loop.

Examples:

    To disable the SPACE bar key from popping up an Edit area list and
   
the TAB key from tabbing to another editing area enter the
following code:

USE (myfile)
aKeys := DC_EDITKDIS( { K_SPACE, K_TAB } )
DC_EditDb()
DC_EDITKDIS( aKeys ) // Restore old set





Source/Library:

_DCEDIT.PRG/.OBJ, DCLIP.LIB

See Also:

dc_editdb()
EDIT

REPLACE ARRAY

Read or replace a value in a dCLIP "Array Field"

Syntax:



Arguments:

    (FieldName) is the name of a Character or Memo field that
   
is a "dCLIP Array Field".

(Element) is the array element.

(Value) is the value to store in the array element.

Returns:

    A logical .TRUE. if the array file was created, .FALSE.
   
otherwise.

Description:

REPLACE ARRAY FIELD is used to easily read or replace the value of
any element of a dCLIP array field. dCLIP array fields are
essentially character or memo fields in which an array is converted
to a string during storage and back to an array during retrieval.

Examples:

    // Field name ARRAYFIELD is a Memo Field
   

aDir := Directory()
REPL ARRAYFIELD WITH DC_Ar2Str(aDir)

// Replace Element 2 with data from Element 3
aFileInfo := DC_ArrayField( 'ARRAYFIELD', 3 )
REPLACE ARRAY FIELD ARRAYFIELD ELEMENT 2 WITH aFileInfo

Source/Library:

_DCASAVE.PRG/.OBJ, DCLIP.LIB

See Also:

REPLACE ARRAY