Editor of DBF-files BDBFS.EXE. Version 1.26.


Programmer's guide

WARNING!



BDBFS for CLIP is in the initial stage. So, there are
a lot of various bugs at the very unexpected places. Besides,
undoubted advantages  of CLIP are used not enough.

Please, be patient. You can also visit BDBFS home page
and make the acquaintance of original BDBFS and attendant utilities.


Table of Contents


1. Why BDBFS?



In fact, there are a lot of analogues, I know the following
viewers/browsers:

	- dbview by Trophimenko ~3k!!!!
	- dbview by Tsarenko ~32k but with edit and search functions
	- popdbf by Bowen-software - sole TSR, known for me
	- vdbf by Rodionoff, served by a push for development
	- d123 by Deveza
	- dbeditor by Jeff Parnau
	- dbfedit by Lau Preston
	- dbed by Dmitrieff
	- cdbf by Tchehuta
	- dbc by Kresin
	- dbfview by Tibor Kovach
	- clut by Sergio Cocci

And so on...

It is possible also to use firm DBU from Nantucket/CA, embedded tools
of FoxPro, dBase, etceteras.

Nevertheless, BDBFS has a niche.
At a development BDBFS the motto was:
	" We'll make with the chosen base, all that we want! "

You can use practically all functions necessary for daily jobs with bases!
Almost all of them can be called by pressing hot-keys.
Besides it is desirable to have "near at hand" an uniform product for
jobs with different formats of bases and indexes.

So, BDBFS is able:

	- automatically or optionally to choose a format
	  of indexes and MEMO-fields from Clipper,FoxPro,dBase4,SIX
	- to edit records in a mode BROWSE or EDIT
	- to print chosen base (optionally into file), entire or on
	  condition
	- to print form from special report file
	- to modify base structure
	- to optimize base structure
	- to print structure on the printer or into a file
	- to search records matching a condition (LOCATE / CONTINUE)
	- to search a context without binding to fields
	- to search in current field
	- to copy records
	- to copy contents of separate fields from the left and right
	  sides, from below and from above
	- to set an existing index (or tag)
	- to make a new index (or tag)
	- to reindex or rebuild all tags
	- to make "soft" index search
	- to make wildcard index search
	- Replace fields matching a condition
	- Sum, Count, Total set of records matching a condition
	- Delete/Recall records matching a condition
	- Copy to File / Append from, including conditions and
	  different text formats. The transformation and renaming of
	  fields is possible. MEMO-fields can be converted to
	  different format
	- to export to HTML, XML, XLS formats
	- to set filters
	- to sort base
	- to set the necessary order and quantity of fields,
	  their headings. The calculated fields are possible! Thus
	  the chosen cut can be printed out and is saved for further use!
	- to calculate any Clipper-expression
	- to assign variables
	- to clear all fields of record at once
	- to make different conversions with text fields
	- to change modes of input
	- to work with the mouse
	- to choose all conditions from a history
	- to save and to restore an environment
	- to read ini-files
	- to highlight with color various cells matching a condition
	- to work with the own clipboard and Win-clipboard
	- "to freeze" fields for viewing
	- to search  maximum / minimum in a field
	- to change the disks / directories (Filer)
	- to use long names Win9x

	- and other pleasant trivialities.

Almost all functions can be called as through hot keys, so
and through the menu.

Most of functions are clear for any xBase-man (though acquaintance with
Clipper it is desirable). Some explanations are below. Appointments of
all hot keys see in HELP and in SUPPLEMENT I.


2. Supported formats of the data.


The formats of xBase-files are supported fully at present time:

	dBASE3/Clipper		(DBT/NTX)
	FoxPro			(FPT/IDX/CDX)
	Visual FoxPro   (new headers and field types)
	SIX		(new field types)
	CLIP		(CTX, new field types)

If the database has memo-field, the appropriate driver is defined
automatically. Besides you can set the default driver in an ini-file
or through the menu.

FoxPro (DBFCDX) driver is default.

The new formats of  dBASE4-5, FlagShip, FlexMemo are
supported in a forced mode.


3. Editing of records.



The initial mode of BDBFS is "VIEW".

For starting of edition ("BROWSE" mode) it is necessary to press
Enter in chosen field, then you receive practically Browse of FoxPro:
keys Up, Down, PgUp, PgDn, Tab, Shift+Tab are acceptable.

Besides BDBFS passes in a mode "BROWSE" by pressing any "simple"
key depending on a type of a field. For example, if current field's type
is Numeric, editing started by pressing any figure, and this figure is
displayed at once. For an exit from a mode "BROWSE" it is necessary
to press Escape or Ctrl+W. As against FoxPro (dBase),
special keys are not necessary to be pressed for editing a memo-field.

	There are four modes of input in "BROWSE".
	-------------------------------------------------------
	Modes           Enter in any            Enter in last
	                field                   field of record
	-------------------------------------------------------
	"Usual"         Go to next field        Stop input
	"Lock Enter"    Go to same field        Go to same field
	                in next record          in next record
	"Enter/skip"    Go to next field        Go to first field
	                                        in next record
	"Enter/stop"    Stop input              Stop input

The modes could be switched during input by pressing F4.

Except for a mode "BROWSE" there is a mode "EDIT". It allows
editing of the fields "vertically". This mode is acceptable from a
mode "VIEW" through hot key Alt+E(dit).

It is sometimes convenient to edit a symbolical field exceeding
the size of the screen, as a memo-field. It could be made by pressing a key
Alt+W(ide).

You can undo the editing changes (by Ctrl+U, Alt+BS). Undo
buffer is defined by variable _UndoSize and could be from 0 to 4095
actions (default 1024). Any global operation (like ZAP, PACK) clears the
undo buffer.



4. Replace-modes.



BDBFS supports three Replace modes (all - in current field):
	- constant expression		Alt+F4
	- varied expression		Ctrl+F4
	- in the current record 	Alt+R

A difference between Alt+F4 and Ctrl+F4 we'll explain
on an example:

Let us assume that current field is numeric and record is 15. Now we set
the expression of replacement Recno()+2 and the scope - all records.

Then the value 17 will be brought in all records by Alt+F4,
and accordingly 3,5,7.. by Ctrl+F4.

What is necessity for Replace in the current record, if it is
possible simply to correct it? But imagine, that the field contents
3242756 and it is necessary to multiplicate it on 234. With Alt+R it
is simple - Field*234.

Shift with any replace function (f.e. Ctrl+Shift+F4),
causes the confirming for each record. It's especially convenient with
varied expression.

If type of replace expression doesn't match type of current
field BDBFS makes an attempt to convert the replace expression. For
example, if current field has type CHARACTER and you input 123 (not
"123") in replace dialogue, BDBFS convert the expression to string.
If conversion is impossible, BDBFS shows the warning.


5.Append/Copy.



F3 simply adds the empty record, Alt+F3 - offers to copy
contents of current or last record.

It is possible also to press F3 in a mode "BROWSE", then new
record will be added with the copied current field.

It is possible also to make "Append from file" (Ctrl+F9), and
if file's extension is other than .DBF, inquiry of file's type will be
made: SDF, WITH DELIMITERS, DBF. Same concerns and to "Copy File" (Ctrl+F3).

It is possible also to append from "myself" (current base).

There are two conflict situations with appending: incompatible field
types and numeric overflow. In BDBFS the disputable concept is now
accepted: the maximal performance of operations. It means, that in the
first case the attempt of types transformation is made, and in second
case the greatest possible number enters in a field. For example, if
field's length is 3 and number is 1200, the number 999 will be entered.

At copying a file it is possible to specify only required fields
(by pressing Alt+F2).

The transformation and renaming of fields is accessible also at copying
(to base, but not to SDF). It's some kind of mini-"Query By Example". For
example, you can set expressions in the list of fields:

	Num, Num*2 AS Double, Upper(Char), CTOF(Char) AS Secret

The optional "AS" <column_name> clause specifies the field's
name in the target base (Num*2 AS Double - the field in new base
will be called "DOUBLE").

If the target field is not named (word "AS" is not used) and a
select item is expression, a field will be named Exp_??, where ?? -
serial number in the list (is similar to FoxPro).

If the expression can't be calculated, it is ignored.

See also the description of function DBTrans().


It is possible also to export the base to formats HTML, XML and
MS EXCEL (XLS). Those operations are accessible through the menu
File - Export to HTML, Export to XML, Export to XLS.

The translation OEM-to-ANSI is requested at any export operation.
If you prefer to omit the question (it is especially useful when
the export called from command line), you could set
the variable _l_exp_o2aq:=.F. in ini-file. The variable
_l_exp_o2a at the same time defines th necessity of translation, by
default _l_exp_o2a==.T..

Export to XLS is realized in Biff5/Biff7 format without sheets. The field
starts from column "B", the symbol "*" in column "A" means the record
marked for deleting. Maximum length of character fields is 255 symbols.

At export to XML:
	- the database name is used as root tag (if the name begins from
	  digit, the symbol "_" is added first);

	- the word "Record" is used as tag for each record;

	- the fields are described as tags not attributes;

	- internal DTD are used;

	- following attributes are used for each record:
		- record number in database ("RecNo");
		- sequence number in established index or tag ("KeyNo");
		- deleted status ("Deleted" - when the record is marked);

	- following  attributes are used as obligate for fields:
		- "type" - the field's type;
		- "len"  - the field's length;

	- following  attributes are used as additional for fields:
		- "dec" - when the field has fractional part;
		- "realtype" - when the type of data differ from
		  field's type (f.e., Strongly-type VariFields or
		  "forced" fields);
		- "valtype" - for fields with variable type (Weakly-Typed
		   VariFields or Variant);

	- all character fields are described as CDATA section;

	- the fields with DATE type are written down in DTOS() format;

	- the logical fields are written down as "1"/"0";

	- the following are written down in comment section:
		- the name of source database;
		- the description from descript.ion (if present);
		- the index expression (when the index or tag is active).

See also description of functions Tb2Html(), Tb2Xml(), Tb2Xls().



6. SUM.


The summation is always performed on the current field (including
calculated fields). It is possible to summarize numerical or
character fields (i.e. SUM(VAL(field))). It is meant, that you know,
that you do. It is also possible to use the function Sum().


7. Search an index (tag).


When you search index key of DATE-type, it is not necessary
to write CTOD. So, is equally correct

	12/03/93  CTOD('12/03/93')  DATE()

By search on an index of a symbolical type the value should be
concluded in inverted commas. However, if the expression of search begins
with figure or symbol with a code more than 127, the inverted commas are
not obligatory.

By default the search is conducted in a mode SoftSeek OFF (SET NEAR - for
habitual to FoxPro). To set a mode SoftSeek ON it is necessary to make

		Alt+G Set(9, .T.)	//see Set.CH,

or to write Set(9, .T.) in an ini-file.

Sometimes it's necessary to find not unique records in an index. It could
be made by pressing Alt+2. The cursor thus will be established on
duplicating record.

The search on a mask (naturally, in an index of a character type)
is accessible also. The mask is similar to DOS.

	Example:
		Alt+[ 'B?LL',	//found: BILL
		Alt+Shift+]	//found: BYLL

		Alt+ [ 'JO*SON' //found: Johnson,Johanson etc.


8. Expressions of conditions.



At a choice of many functions BDBFS, you will be requested for condition
of selection or searching. It is possible to vary expressions in such
conditions widely enough. Any system and user functions can be applied.
Sole restriction - length expressions (no more than 255 symbols).



9. Set Fields.



On Ctrl+F2 you can set the contents, names(headings), show format and
order of fields. The contents of a field can be any allowable expression.
The symbols of national alphabets in the contents now are allowable only
in russian version (see NATIONAL.TXT).

	Example:
	Contents of a field: If(Deleted(), [Yes], [No])
	Name: Is marked?

	To divide the name of the field use the symbol ;.
	Example:
	This;Field;Name		//3 lines

You could also set the picture and width for each field.
The formats of the pictures are described in any xBase language.

	Example:
		Field: Money
		Picture: 999,999.99

To finish changes press F10. Then you can press again Ctrl+F2
to restore all fields.

The calculated fields will not be editable. Besides, they can
be used in expressions.

The fields was marked as deleted (on DEL) will not be shown and
edited. F8/F7 blocks/unblocks all fields below current.

The required order can be established by pressing Ctrl+Up or
Ctrl+Down.

The required order and contents of fields can be established
consistently. Let's assume, we have removed from viewing some field.
And now we don't want to see another field, not only previous. Press
again Ctrl+F2 (to restore all fields), again Ctrl+F2, then F5 and
you can see previous established fields. Correct further, etc..

Set Fields does not influent on "Copy TO" operation.



10.Calculation of expressions.


By pressing Shift+F6 (Alt+G(o), ?) it is possible to calculate almost any
correct Clipper expression of length up to 255 symbols. Not to mention
it is necessary to remember, what day was Date()-21 or quickly to compute
Log(Exp(1)) :-), it has turned out rather interesting simulator for
Clipper-programmer. It is possible, for example, to experiment with
parameters of Memoedit, to understand, at last, what differs Bin2i from
Bin2w or to be curious, what is Descend("ΎΌΎΊ­").

It is possible to use almost all functions from Clipper.Lib and
Extend.Lib, number useful (on my sight) functions of known libraries
Six3, NanFor, Clipper Tools, Netto, Blinker, emulation of some functions
FoxPro, and also number of special functions BDBFS.

The list of functions see in SUPPLEMENT IV.


11.Variables initialization.


On Ctrl+F5 you can initialize variable (or to set it's new value).

For simple variable it is necessary simply to execute assignment

	new=5
	word:='daddy'
	today=date()

For the announcement of a array it should be described:

	arr[20] or arr=Array(20)

Then it is possible to make Arr[3]=Exp(12.09).
However, direct assignment is also allowable:

	Arr := {10,20,'example'}

Any correct Clipper expression are allowable in the right part.

What for all this is necessary?

You can, f.e. store result of previous operation and use it later:

	F6				//sum current field
	Ctrl+F5	Sum1:=__sum	//store it

It is sometimes convenient to calculate expression, and then to use it in
conditions. Using assignment variable and calculation expressions it is
possible even to write small programs. Try, f.e., to make following:

	Ctrl+F5	aPrg=Array[Adir('*.prg ')]
	Alt+G		Adir('*.prg ', aPrg)
	Alt+G		ForAch (5,10,24, 'Program', aPrg)

Selecting the index with non-standard extension.

	Ctrl+F5	_oldind:='MyOwn.FIL '
	Ctrl+F5	_req=0

Choosing the database from backup copies.

	Ctrl+F5	_mask = '*.bak'
	F4

Printing the database with a small font and with the slogan.

	Ctrl+F5	_PSCode ='We are the champions ' +chr(15)
	F2

It is possible to assign the block of a code

	Ctrl+F5	bck = {| i|i+1} , then
	Alt+G		Eval(num)

Some examples are in EXAMPLES\Examples.Ini and PLUGINS\ directory.


12.Structure modifying.


After change of structure, previous version is saved with extension BAK.
If there was a memo-file, it is saved with extension TBK.

If at updating there is a situation of numerical overflow, it will be
brought 0 in a field.

The known Clipper-trick is realized in the program  - symbolical
fields with length more than 255 symbols. It is made so: a field
Field_Dec keeps Mod(Length, 256), a field Field_Len - remainder.
For example: length of a field is 700. Then Field_Dec=2, Field_Len=188.
But to enter necessary length in BDBFS it is enough to correct Field_len.
Then the necessary sizes will be brought automatically.

F9 (except for the driver SIXMDX) causes function of structure
optimization (like in OTTO utility from SIX-driver). It is made with
using VariField by the following rules:

	- All CHARACTER fields greater than 16 characters are
	  defaulted to 10 byte "V" fields. However, for short CHARACTER
	  fields with data of a fixed length, you may want to change them
	  back to "C" types manually instead of using "V" types.

	- All MEMO fields are defaulted to 6 byte "V" fields.

	- All NUMERIC fields greater than four bytes long and less than
	  11 bytes long are converted to four byte "I" (long integer
	  fields.

	- All 8 byte DATE fields are converted to 3 byte DATE fields.

For non-English named fields see NATIONAL.TXT.


13.Records inserting.


As is known, Clipper doesn't have the operation INSERT.  But sometimes it
would be desirable very much. Therefore it is necessary to follow by
heavy way: append, to move all downwards, to clear top. It can take long
time on the large bases. INSERT does not work with active INDEX or TAG.


14.TOTAL and SORT.



The differences between TOTAL in BDBFS and in Clipper:

	- "ON" expression always uses IndexKey(0) or it's part, so TOTAL
	   doesn't work in SORTed base;
	- ALL fields are copied to the new database (Clipper excludes
	   the memo-fields);
	- if field "TOTALCOUNT" exists, it will be filled with number of
	  totalled records on each key expression;
	- fields with alias (like base->fld1) aren't supported.

The differences between SORT in BDBFS and in Clipper:

	- sorting on memo-fields is possible (on first 255 symbols);
	- deleted records retain their deleted status in sorted database.


15.Saving / restoring an environment.


You can define any variable, set conditions of search and summation,
specify an index and necessary fields etc., and then save all in a usual
memo-file, by pressing Shift+F1.

If then at any moment to press Shift+F5 and to set a name of
this file, the all this environment, including used DBF, will be
(whenever possible) restored. Besides, it is possible to load an
environment from command line:

	BDBFS <name of MEM-file>.

Certainly, could be as much as necessary files of an environment in the
directory. The file BDBFS.MEM is used by default.

If variable _AutoSave: =.T. is defined in INI-file (or directly from
the program), the file BDBFS.MEM is created in the current directory
automatically at an exit.

If variable _AutoRestore: =.T. is defined in INI-file and BDBFS.EXE
is started without parameters, a file BDBFS.MEM from current directory is
restored automatically.



16.Initialization files.


You can read the file of initialization from command line
(bdbfs <file.ini>) or later, by pressing Ctrl+F12. Any ini-file
represents from itself an usual text file, containing assignment
variables, and also, probably, execution of some functions,
mini-programs. In fact, most statements of Clipper and other xBase
dialects are allowable in ini-files. Variables are defined in ini-files
will be then accessible in the program. The statements defined specially
for BDBFS must begin with symbol #. This symbol could absent in
statements with standard Clipper syntax.

The following operations are defined:


A. Assignment.

	Syntax:
		<var>:=<expression>		or
		<var> = <expression>		or
		#define <var> [<expression>]	or
		#undef <var>

	Examples:
		MyVar=100
		MyVar := 100
		MyVar=Sqrt(4)
		#define MyVar 100
		#undef MyVar

In the case of #define, as against of Clipper and C #include-files,
the variable will be announced and are accessible for all session time.
Default <expression> for #define is .T.. The statement #undef release the
variable.

Can be useful the defining of code blocks in ini-file. Then they
can be used in program as functions.

	Example:
	//in ini-file
		Squart = {|i|	'the Area of a circle with radius '+STR(i,3)+;
				' = '+LTRIM(STR(3.1415 * i * i,16,2))}

	//in program
		{?} Squart(4) or
		{?} Eval(Squart,4)



B. Function evaluation without assignment variable.

	Syntax:
		=<expression>	or
		<expression>

	Examples:
		=Tone(440,3)
		Eval(bEval, 100)

	Keep in mind, that you must use =<expression> form, when
symbol "=" is inside <expression>, f.e.
		=Devout('S='+S)



C. Including of another initialization file.

	Syntax:
		#include <FileSpec>

The attention for Clipper & C programmers: the name of a file
could be written without inverted commas.

<FileSpec> may contain an explicit path and file name as well as a
file extension. If, however, no path is specified, bdbfs searches the
following places:

	- Current directory

	- Directories supplied in global variable _PlugDir
	  (default - <place of bdbfs.EXE>\PLUGINS)

	- Directories specified in the INCLUDE environment variable.

	Examples:
		#include second.ini
		#include 'second.ini'
		#include c:\my\second.ini

As the operation #define is supported, it is possible to include standard
Clipper .ch files, like inkey.ch, Set.ch.  Notice, that #define with
parameters is not supported yet.



D. User-defined command.

	Syntax:
		#xcommand <matchPattern> => <resultPattern>

 <matchPattern> is the pattern to match in the input text.

 <resultPattern> is the text produced if a piece of input text matches
	 	the <matchPattern>.

Patterns can include parameters (match markers). Match markers
are label and optional symbols delimited by angle brackets (<>) that
provide a substitute (idMarker) to be used in the <resultPattern> and
identify the clause for which it is a substitute.

As against commands of Clipper-preprocessor, only one parameter
(or absence of parameters) is supported.

	Examples:

	  #xCommand INVERT =>;
		    DBEval({||Rlock(),IF(DELE(),dbRecall(),dbDelete())})

	  #xCommand MODIFY COMMAND <x> = > ModiFile(<x>)

	  #xCommand EOM(<x>) => FT_LDAY(<x>)

It is most natural to apply commands from calculation of
expressions, for example:

		{?} INVERT


E. Defining of command's local table.

	Syntax:
		#LOCALTABLE

The commands defining by #xcommand operators occupate some memory and
slow down a little the calculation's execution (the substitution is
tested for each expression). So it is sometimes useful to free command's
table after execution.

	Example:
		#LOCALTABLE
		#include MyCmd.ch

Suppose, the set of commands are defined in MyCmd. The preliminary
definition by #LOCALTABLE guarantees the clearing of resources after
ending of ini-file interpretation.



F. MACRO keys definition.

	Syntax:
		#MACRO <key code> => <a sequence of pressing>
		or
		#MACRO_IN_[scope] <key code> => <a sequence of pressing>

The sequence of pressing can be defined as symbolical line (KEYBOARD
format), or as a array of codes (INKEY format). In the second case it is
possible to set the functional and extended keys, but length of a
sequence is less or equal 16 symbols. The sequence could be a codeblock,
it is useful to vary actions.

Next scopes modifications could be defined:

	#MACRO_IN_BROWSE - main mode,
	#MACRO_IN_DIALOG - dialogues of conditions and field list
	#MACRO_IN_FIELD  - GET mode
	#MACRO_IN_MEMO	 - edition of memo-fields and text files

If the scope is not defined, the macro-key will be active in all modes.

	Examples:
		#MACRO 307 => {-9, 'F', 'A'}
		;Create HTML through menu on Alt+<.

		#MACRO_IN_FIELD 308 => "It we'll press quite often at
		edition"N

		#MACRO_IN_DIALOG 383 => 'Like("*",&_C_F)'+REPL(CHR(19),9)
		;Alt+* suitable for pattern

		#MACRO_IN_DIALOG 276 => {|| Time()}
		;Codeblock example: Alt+T inputs the current time.



G. Announcement of the variables.

	Syntax:
		LOCAL <v1>[:=<xv1>],<v2>[:=<xv2>]	or
		PRIVATE <v1>[:=<xv1>],<v2>[:=<xv2>]	or
		PUBLIC <v1>[:=<xv1>],<v2>[:=<xv2>]

If the variable is not announced as LOCAL or PRIVATE, it exists for the
duration of the program. Local and private variables are visible only
within the current ini-file. The statements LOCAL and PRIVATE are
synonyms.

	Examples:
		#LOCAL cFile,nSum

		LOCAL cFile:="MyFile"

		PUBLIC nSum



H. Execution's termination.

	Syntax:
		#BREAK	or
		#BREAK <condition>

#BREAK without parameter forces the immediate termination of the ini-file
interpretation, #BREAK with <condition> terminate the interpretation
if condition are valid:

	Example:
		#BREAK File("NeedFile")



I. Parameters and return value.

Up to 5 parameters can be passed to ini-file. They are accessible with
_1.._5 identifier. You could also announce own names of parameters in
operator PARAMETERS.

	Syntax:
		PARAMETERS <list of variables>

	Example:
		PARAMETERS nVal,cVal,xVal


Ini-file can return the value to the calling process.

	Syntax:
		RETURN <expression>

	Examples:
		#RETURN 4.
		#RETURN _1*_2+_3

#RETURN doesn't terminate the interpretation, it only defines the
result. There could be more than one #RETURN in ini-file.

The calling of ini-file with parameters is suitable from
calculation or user menu:

	{?} RestoreIni("MyPlug",Date(),"Example",2.4)

You can use the recurrent RestoreIni(), so in "MyPlug" can be written:

	RestoreIni("R2")
and so on.

You can use the direct calling of ini-file as a function:

	{?} MyPlug(par1,par2)

Ini-file should have .ini extension in this case, that is
unessential in case of RestoreIni().



J. Alternative execution.

	Syntax:
		IF <lCondition1>
			<statements>...
		[ELSEIF <lCondition2>]
			<statements>...
		[ELSE]
			<statements>...
		ENDIF

It is the analogue of usual xBase IF..ENDIF statement.

<lCondition> is a logical control expression. If it evaluates to
true (.T.), all following statements are executed until an ELSE,ELSEIF or
ENDIF is encountered.

 ELSEIF <lCondition> identifies statements to execute if the
associated condition evaluates to true (.T.) and all preceding IF or
ELSEIF conditions evaluate to false (.F.). Any number of ELSEIF
statements can be specified within the same IF...ENDIF control structure.

ELSE identifies statements to execute if all IF/ELSEIF conditions
evaluates to false (.F.).

IF...ENDIF structures may be nested within other IF...ENDIF
structures up to 10 levels for one ini-file.

	Example:
		IF Continue("Do you want to make something?")
			<statements for "Something">
		ELSE
			Nfind("May be next time...")
		ENDIF

The special cases of #IF operator are operators #IFDEF, #IFNDEF.
They are often used in Clipper #include files for prevention of repeated
loading.
	Examples:

	//in set.ch
	#IFNDEF _SET_CH
		... constants announcements

		#DEFINE _SET_CH
	#ENDIF

	//in plugins\clipper.ch
	#IFDEF _CLIPPER_CH
		#BREAK		//yet another? No, Exit!
	#ENDIF
	...
	#DEFINE _CLIPPER_CH

The symbol # is obligatory in #IFDEF, #IFNDEF.



K. CASE - Alternative execution.

	Syntax:
		DO CASE
			CASE <lCondition1>
				<statements>...
			[CASE <lCondition2>]
				<statements>...
			...
			[OTHERWISE]
				<statements>...
		ENDCASE

It is the analogue of usual xBase DO CASE..ENDCASE statement.

CASE <lCondition> defines a block of statements to execute if
<lCondition> evaluates to true (.T.).

OTHERWISE defines a block of statements to execute if none of the
specified CASE conditions evaluates to true (.T.).

CASE...ENDCASE structures may be nested within other CASE...ENDCASE
structures up to 10 levels for one ini-file.

DO CASE...ENDCASE is identical to IF...ELSEIF...ENDIF with neither syntax
having a specific advantage over the other.

	Example:
	DO CASE
		CASE	_1 < 0
			s := s - _1
		CASE	_1 = 0
			s := 0
		OTHER
			s := s * _1
	ENDCASE



L. WHILE cycle.

	Syntax:
		[DO ]WHILE <lCondition>
			<statements>...
			[EXIT]
			<statements>...
			[LOOP]
		ENDWHILE	or	 ENDDO


It is the analogue of usual xBase WHILE..ENDWHILE statement.

<lCondition> is a logical control expression. If it evaluates to
true (.T.), all following statements are executed until an #ENDWHILE is
encountered.

#WHILE...#ENDWHILE structures may be nested within other
#WHILE...#ENDWHILE structures up to 10 levels for one ini-file.

	Examples:
		sum:=0
		WHILE !EOF()
			sum:=sum+FieldGet(1)+FieldGet(2)
			DBSKIP()
		ENDWHILE

		WHILE .T.
			....
			IF inkey(0)=27	//ESC
				EXIT
			ENDIF
		ENDDO


M. FOR cycle.

	Syntax:
		FOR <idCounter> := <nStart> TO <nEnd> [STEP <nIncrement>]
			<statements>...
			[EXIT]
			<statements>...
			[LOOP]
		NEXT	or	ENDFOR

<idCounter> is the name of the loop control or counter variable.
If the specified <idCounter> is not visible or does not exist, a private
variable is created.

<nStart> is the initial value assigned to <idCounter>. If <nIncrement>
is negative, <nStart> must be less than <nEnd>.

TO <nEnd> defines the final value of <idCounter>. If <nIncrement>
is negative, <nStart> must be greater than <nEnd>; otherwise, <nStart>
must be less than <nEnd>.

STEP <nIncrement> defines the amount <idCounter> is changed for
each iteration of the loop. <nIncrement> can be either positive or
negative. If the STEP clause is not specified, <idCounter> is
incremented by one for each iteration of the loop.

	Example:
		FOR i:=1 TO 100 STEP 2
			s:=s+i
		NEXT

You probably also will want to use functions For() and While() for organization of cycling in ini-files
(see SUPPLEMENT IV). These functions are much quicker than WHILE and FOR statements but are not so evident.
N. Disarmed statements.

They are: MEMVAR, FIELD, EXTERNAL. These statements are
of no practical importance and was included for compatibility with
existing programs on xBase dialects.


A lot of various examples are contained in the demonstration file Examples.ini and in PLUGINS directory.
See also ch.32. At start of the program the attempt is made to read a file BDBFS.INI from the program's start directory. If file of initialization is not defined in a command line, then the attempt is made to read a file BDBFS.INI from the current directory (at its absence is searched BDBF.INI - for compatibility with the previous versions of BDBF). Calling of any ini-file (f.e., on {Ctrl+F12}) results to compulsory reopening of current base. If you do not wish it, you should define variable lNoReOpen:=.T. in any place of ini-file.

16.1. Auto Open files.


 The file with extension .AOP (Auto Open) will be read automatically when
the base with appropriate name will be opened. You can define some
commands, variables, menu specific for this database.
Besides, you can define list of necessary fields here. Fields list is
defined in variable FIELDS and headers list - in variable HEADS.  Formats
(show patterns) of fields can be defined in variable PICTURES.  Width of
each fields can be defined in variable Widths. Calculated fields can be
also defined.

	Example:

	Fields:={'Char','Num','Num*2'}
	Heads:={'Character;field','Numeric;field','Double value'}
	Pictures:={, '999,999.99'}
	Widths:={7,,,}

Sometimes there is a necessity to exclude some fields from
browsing. You can do it with statement #EXCLUDE.

	Example:
		#EXCLUDE Secret, KeyField


You can also define other useful instruction (see also SUPPLEMENT IV).
For example it's possible to set index or tag:

	_IndexFile:="MyIndex"		or
	__TagNom:=3			or
	__TagName:='MyTag'

You can interactively define an index and necessary fields (on
Ctrl+F2), and then save all this in AOP-file, by pressing
Ctrl+Shift+F1.

You can also define the actions executing when current base
is closing. The statements should reside after defining of [close]
section of AOP-file in this case.

	Example:

	//Remember the file creation time
	aD:=Directory('WrkBase.DBF')
	tOld:=aD[1,4]

	[close]
	//Reserve copy if file was changed
	DBCommit()
	aD:=Directory('WrkBase.DBF')
	IF tOld <> aD[1,4]
		__DbCopy('Z:\ARCHIVE\RsrvBase')
	ENDIF


17.Macro-keys.



By pressing Ctrl+F1 the sequence of symbols, saved in variable
_MACRO is called. In a mode VIEW this opportunity works as Set Key,
in edition - as Set Function.

	Example:

	Ctrl+F5 _Macro=chr(4) +chr(4) +chr(13)

Now, in a mode VIEW, by Ctrl+F1 you will enter edition of a field
CurrentField+2

	Ctrl+F5 _macro ='Bravo!'

Now, in modes of edition, by Ctrl+F1 in a field the text Bravo!
will be written down.

It is convenient, when it is necessary in an interactive mode to
bring in many fields similar information.

In modes of edition the following macros are additionally defined:

	Alt+(	=	() and cursor inside of brackets
	Alt+)	=	() and cursor outside
	Alt+{	=	{}
	Alt+"	=	[]
	Alt+A	=	.AND.
	Alt+O	=	.OR.
	Alt+B	=	{||}
	Alt+C	=	CTOD("//")

It is especially convenient at definition of a condition.

It is possible to define own macros:

	? __SetFunction (< a code of a key >, < macros >),

or by command #MACRO in ini-file.

Besides in modes of edition are accessible transformations
of the current focus of input (same work and in VIEW):

	Alt+U	= UpperCase
	Alt+L	= Lower
	Alt+K	= Capitalize
	Alt+P	= Proper
	Alt+Q	= English -> National (if you casually have typed
			  something in "English" keyboard instead of
			  "National").
	Alt+Y	= on the contrary.


18.Exit to DOS.



At an exit to DOS on Alt+F10, BDBFS occupies in memory 8k.

If you want to start the large program directly under BDBFS,
it is possible to use function BliRun().

	? BliRun('FoxPro').

BliRun() returns the error level of process.



19.Using of a mouse.


These rules work in a mode "VIEW":

	- any button on a line of the base name = Select Base
	- any button on a line of the field names = Set Fields
	- any button on a functional line = appropriate function
	  (exception: right button on F10 finishes without demand),
	  including and with Ctrl, Shift and Alt
	- any button on bottom scroll bar - transition on
	  relative position of a field in a file
	- any button in the basic space (4-MaxRow()-3 lines) =
	  transition to this field
	- left button on the same field = Enter
	- any button on MaxCol() column - transition in a file on relative
	  position.

In a mode of a choice (Achoice, f.e., at a choice of an index):

	- right button = Escape
	- left on the top frame = PgUp
	- left on the bottom frame = PgDn
	- left inside - first time: stay on an element, second time:
	  select it.

In a menu and in an edition:

	- right button = Escape
	- left button = Enter

At a showing of the warning messages - any button = any key.



20.Compatibility with FoxPro.


BDBFS is able to look and to edit files FoxPro, including Visual FoxPro.
The index files are completely supported except non-compact IDX.

As it was already marked, in Browse the keys Tab, Shift+Tab,
Ctrl+T are supported.

System variables of printing and the amount of the processed records
have the same names, as in FoxPRO.

In expressions it is possible to use almost all functions FoxPro,
not corresponded with screen (Screen, Menu) and printed forms.

The correctness of locking in a network is provided.

If there is a file EUROPEAN.MEM in the current directory, it is
loaded at start.


21.Working in a network and multitask systems.


All files are opened in a share mode, that allows various processes to
use the same base.

BDBFS tested in a NOVELL network and in sessions of Windows 9*/ME,
Windows NT/2000/XP, Windows 3.11, OS/2, DV.

The joint work is guaranteed with the applications using standard
blocking mode of dBase. The joint work is not guaranteed, f.e. with
Dbview from Norton-Commander.

BDBFS on one's own returns "time slices", so there is not necessity
for the extraneous programs such as TAME in multitask systems.


22.Errors processing.


Generally, many efforts are undertaken, that the wrong actions did not
finish the working completely. Besides a number possible disputed
situations manage before their occurrence.

Nevertheless mistakes of the program are not excluded.
In this case BDBFS draws the frame and writes something like

	"Incorrect expression xxxxxxx"

I have a favour to ask of you: notice this "xxxxxxx" and inform me.
But mean, that such message could arise as a result of your incorrect
expression, then it is necessary simply to recover.

There are, however, number of non-restorable mistakes, f.e., "Disk full".
It can appear, for example, at copying a file (it is difficult to check
up beforehand, since it is not known, how much places will be occupied by
records matching a condition). So, be attentive.


23.Expressions of highlighting.



You could highlight with color in current field the records
adequate certain condition. For example,

	Alt+B BirthDate > CTOD('01/01/1960')

The color is defined by 6 and 7 pair of primary color.
Bear in mind, that the deleted records are shown by 4 and 5 pair.

To change color is possible having corrected variable _bm (see below)
through the task of expressions or menu (File - Settings - Colors).

To return standard colors you should press Alt+Shift+B.


24.Jobs with the clipboard.


The exchange buffer is supported. It work in a mode VIEW and
in a mode GET. For recording of value of the current cell in mode VIEW or
current value of edition - press Ctrl+GreyPlus. For input in a cell
(at conformity of types) - Alt+GreyEnter or Ctrl+GreyMinus.

It is possible to make operations
	+ - * /
directly with clipBoard and current cell (last 2, naturally, only with
numerical values), pressing Alt+corresponding Grey. It is possible to
see the current value of ClipBoard by pressing Ctrl+Enter.

In a mode of editing of memo-fields the writing from clipBoard
is accessible. During a showing of result of calculation, summation, etc
is accessible record calculated in ClipBoard. However, it is possible
and directly save result in a field.

The operations of entering in the buffer are accessible and at
a showing of results operations.

It is very convenient to use ClipBoard for the inputting various
conditions. For example, you have set long expression of search. Remember
it by Ctrl+Grey+. Now you want to copy all records, satisfying to this
condition. Proceed in dialogue of copying and at inquiry conditions press
Ctrl+Grey-.

The ClipBoard contains all expressions placed into them during
current seance and the choice from these expressions is offered when
pasting. You could cancel this "behavior" by assignment the variable
_ClipChoice:=.F., in initialization file or through menu. Last expression
will always be used in this case.

In Windows the system ClipBoard is also accessible. It is
possible to copy the current field there (and therefrom). These
operations are accessible by pressing Ctrl+Ins, Shift+Ins. The
utility bdb_wclp (from distributive) is necessary for
2000/XP. Place it to same directory with bdbfs.exe or somewhere in PATH.


25.History of conditions and expressions.



All conditions, expressions, lists of fields, are inputted during
a session the works, and also results of calculations, summation,
calculations are brought in a history, thus the control on doubling will
be carried out. Accordingly, at the dialogues of conditions and
expressions, it is possible to use this history.

	F4 (Ctrl+Down) calls a history of the current condition,
	Alt+F4 (Ctrl+Shift+Down) - history of all conditions,
	Ctrl+F4 - history of results.

The unnecessary conditions can be erased by pressing

	F8 or Ctrl+D.



26.Bookmarks.


It is possible to remember up to 10 positions (records) in base and to
pass to them when need. Usually it is a feature of the text editors; I do
not know, as far as it will be useful here. Nevertheless, WordStar and
Borland "were plundered" and by Ctrl+K+ 0..9 the bookmarks are
established. They can be restored by Ctrl+Q+ 0..9. After
pressing Ctrl+K or Ctrl+Q pressing 0..9 is expected
within 20 seconds, then is reset.


27.Edition of memo-fields and external files.



It is possible to use the internal or external editor for edition
of memo-fields, and also external files (by pressing F4 in filer or
through the menu "File" - "Modify text"). The internal editor uses
standard function MemoEdit and works when variable _MemoEditor is not
defined (for example, in an ini-file). Variable could be defined as
String, for example, _MemoEditor:='c:\medit\me.exe' (then always will be
used MultiEdit) or as an array of arrays:

	{Field's Mask,			//f.e "BM*"
	 External editor,		//f.e. "ME"
	 Shift in a memo-field,		//by default 0 - whole field
	 The additional options,	//by default are absent
	 Temporary file			//by default $$BDBF$$.COM }.

The external editor can be not defined, then it is supposed, that
the program(for example, screen-saver) resides in a memo-field, and this
program simply is started. The shift in a memo-field is necessary to set,
if the memo-field keeps the diverse information. For example, animals.dbf
in Delphi's distributive contains a field BMP, where a picture is stored
from 9 positions.

Example:
	_MemoEditor:={	{'BMP', 'pv', 9, '/d'},;
			{'SAVER', '', 0, ",'tmp.com"},;
			{'*','ME ', 0, "};
		     }

So, PV.EXE will be called on a field with the name BMP, the field SAVER
contains executable programs, and for edition all rest will be called
MultiEdit.

The internal editor can't edit files with the size more than 64K. But
also at use of the external editor it is necessary to remember, that the
memo-fields of a format DBT are not capable to store the section more
64K. If your file has large length, at recording it in a field of a
format DBT it will be cut off.



28.Printing forms.


Besides a usual printing on F2, it is possible to use the special
report forms. The forms are stored in usual textual files and contain
instructions for definitions of columns, groupings, summarizing, etc.

Report forms could use the variables:

	_aExpr - array of expressions for each column.
	_aHead - array of column's headings. Default == _aExpr
	_aElen - array of column's widths. Default = width of a field

If _aElen is default, width of a column is defined as maximal
between _aElen, width of column heading and _aPict for this column. If
width of a field is more than width of a column, it is made correct
division (up to 10 lines in a column) on separators:

		space tabulation . , ; ? !

	_aPict	 - array of pictures for each column.

	_aTitle	 - report title. Default - nothing. Can be defined as a
		   string or array of strings.

	_cFile	 - output file. Default - name of base + '.PRN'.

	_aSum	 - array of necessity of summation for each column.

	_fCondit - print condition.

	_aFooter - name of additional procedure printing a form footer or
		   array containing the footer.

	_pEveryStep - name of additional procedure or block called
			before a printing of each line satisfying to a
			condition _fCondit

	_aGroup - array specifying report group.
		Structure of an array:
		{
		<expression of grouping>,;
		[<an array or block for a printing of group heading>],;
		[<an array or block for a printing of group footer>]
		[<logical: print the group sum only if more than 1 element
		 are in group>]
		}.
		Default for group heading:
			'Code' + <expression of a grouping>.
		Default for group footer: "Total:".
		Default for a printing of the sum: .F. (to print the sum
		always).

	_nDouble - attribute of necessity of a printing in two columns on
		   a sheet. If 0 or is not defined - one string is
		   printed.  If numerical parameter is defined - is
		   perceived as amount of blanks between two columns.

	_NoAsk - don't confirm the print condition and output file's
	         name.

	_NoShow - don't offer a file for viewing and printing.

	_aPage - array specifying grouping on page.
		Structure:
		{
		 [<an array or block for a printing of page heading>],;
		 [<an array or block for a printing of page footer>]
		}.
	If it's defined, the totals of page are printed. Header
	of page is printed, since second.

	cDivideT, cDivide - delimiter of columns in the header and
		information lines accordingly (default - ':').

	_nCounter - if > 0, a serial line number is printed at the left
		    side of sheet (with width _nCounter).

	CountName - name of a column for serial number (default "NN").
		    It is meaningful only if _nCounter > 0 is defined.

	_PrintZero - whether to print of zero values, by default - .F.

Following variables can be additionally adjusted directly from the
programs (by pressing F9 in dialogue of a beginning of a printing).

	Numbers of pages on each page		_NeedPrPage
	Standard title				_NeedMainHead
	Title on each page			_lTitleAll
	Header on each page			_NeedHeadPage
	Head's numbers: on first page		_lDgtHdr
			on other pages		_lHdAll
	Eject after each page			_NeedEject
	Starting sequence of the printer	_PSCode
	Final sequence of the printer		_PECode
	The left margin				_LMargin
	Page length (0=tape)			_Plength
	The printer device			_printer
	Whether to append to a file		_NeedApFile

Report-form files have standard extension .BPF and can be loaded through
the menu "Base" - "Read report template".

See also example in distributive of BDBFS.



29.Keyboard codes.


By pressing the keys, pay attention to the left top corner, where their
codes are shown. So, it is possible to find out a number codes are absent
in Clipper documentation.



30.User menu.


	Besides the general menu, it is possible to define the additional
user menu accessible by pressing F12. For this purpose it is necessary to define
arrays UserMenuPrompts and UserMenuActs in ini-file. First should
contain the lines offered for a choice in the menu, second - appropriate
codeblocks. For example, you want to have an opportunity to start some
programs from BDBFS. Then you should write in BDBFS.INI:

	UserMenuPrompts: = {'Call FoxPro', 'Call ME'}
	UserMenuActs: = {{|| BliRun('Fox.exe')}, {||BliRun('me.exe')}}.

Some examples are in Examples.Ini.


31.Header checking.


You can check the size of current base from menu "File -> Check Header".
3 numbers are compared: logical size (is calculated basing on structure
and records size), "header" size (based on records number in base header)
and real disk file size. If all sizes are equal, OK message will be
shown. Besides, you'll be prompted for choice one of these sizes. Rest
will be synchronized. I recommend logical size as most accurate (in
common case).



32.Plug-ins.



 "Plug-ins" of bdbfs are usual ini-files, realizing
some completed function. Some examples (probably useful) are in
PLUGINS\ directory. Send me your plug-ins, best will be published.

Bdbfs searches for Plug-ins (and #include)-files:
	- in current directory;
	- in directories supplied in global variable _PlugDir
	  (default - <place of bdbfs.exe>\plugins). You can
	  define(f.e. in bdbfs.ini) more than one directory:
		_PlugDir:='c:\bdbfs\plugins; d:\MyOwn\plugins'
	- in directories specified in the INCLUDE environment
	  variable.

You can use the plug-ins as usual function, if they have default
extension .INI. Suppose, you have MyPlug.ini. It is then possible, f.e.:

	{?} MyPlug()			//Calculate current

	{CTRL+F5} xVar:=MyPlug()*2	//Assignment

	{F7} MyPlug() > 100		//Searching

Plug-in could have up to 5 parameters.

	Example:
		MyPlug(2,3,'Hello')

If you need call the plug-in from another plug-in, or plug-in has
non-standard extension, you should use the function RestoreIni().

	Example:
		RestoreIni('MyPlug',2,3,'Hello')



33.Start BDBFS.


You can use the mask (with symbols * and ?) at starting.
The files will be offered for a choice.

	Example:
		 BDBFS *.Str

Files with extension STR will be offered.

Parameter /i = <indexname> sets loading a file together with
specified index.

Parameter /BW adjusts colors to monochrome.

The order of parameters /BW and /i = can be alternated.

At start with a parameter - name of a file of an environment
the attempt is made to restore this environment. Similarly, with a file of
initialization.

	Example:
	 	BDBFS Envr.mem

The parameters /DBFCDX /DBFNTX /DBFCTX /DBFIDX /VFPCDX /SIXCDX
set the default RDD (usually it's defined in bdbfs.ini). You can use also
short form: /CDX /NTX /CTX /IDX.

	Examples:

		BDBFS MyBase /VFPCDX    //Visual Foxpro driver

		BDBFS MyBase /ntx /i=char


The parameter /CREATE allows to begin the work with a creating of
a new database.

	Example:
		BDBFS MyNew /CREATE


Besides there are some parameters forcing BDBFS to work in
batch mode - REINDEX, REBUILD, HTML, XML, XLS, PACK, CHECK and varieties
of STRUCT_ parameter. In batch mode BDBFS executes the defined operation
and finishes the work.


Parameter REINDEX causes reindexing of a base. A compound index
(CDX, NSX, MDX) is reindexed automatically, for reindexing of simple index
it should be specified in third parameter with a key /i. If any
index is not found, the appropriate message will be shown.

	Examples:
		BDBFS f_w_cdx REINDEX
		BDBFS f_w_ntx /REINDEX /i=MyNtx.ntx


Parameter REBUILD causes a full rebuilding of a compound index
file (CDX,NSX,MDX). It's some longer than reindexing, but protects from
some strange bugs and decreases the file size in most cases.

	Example:
		BDBFS f_w_cdx /REBUILD


Parameters HTM (HTML), XML, XLS causes export to a corresponding
file format.

	Examples:
		BDBFS MyDbf HTM			//MyDbf.htm is generated
		BDBFS MyDbf /HTML=e:\1		//e:\1.htm is generated
		BDBFS MyDbf /XLS		//MyDbf.xls is generated

If target file exists, you will be asked for rewriting. So, if you wish
to rewrite existing file without confirming, delete it before!

Ch.5 contains additional information about exporting.


Parameter PACK causes packing of a base. Inasmuch as it is
dangerous operation, warning will always shown!


Parameter PRINT causes initialization of BPF-file.

	Examples:
		BDBFS Customer /PRINT		//Customer.BPF used
		BDBFS Customer /PRINT=Annual	//Annual.BPF used

Parameter STRUCT_ allows to execute all file operations with database
structure, usually allowable from DISPLAY STRUCTURE mode (Alt+F2).

Variety of parameter:
	STRUCT_PRINT	- print the structure description to
			  print device
	STRUCT_FILE	- print the structure description to
			  file (database.STP)
	STRUCT_EXTENDED	- create the file in COPY STRU EXTENDED
			  format (database.STE)
	STRUCT_COPY	- create the empty file of same structure
			  (database.STR)
	STRUCT_PROGRAM	- create the program generating this
			  structure and tags of compound index,
			  if it exists (database.STG).

All postfix of STRUCT_ parameter can be reduced up to 4 symbols.

	Example:
		BDBFS MyDbf /STRUCT_PROG


Parameter CHECK causes checking of a base size.


Parameter FORCED causes a forced mode.

It is possible to apply the command FOR to work with the catalogue.

	Examples:
Reindex all
		FOR %a in (*.DBF) DO bdbfs %a REINDEX

Create HTMLs in subdirectory _HTMLS_
		echo y | DEL _HTMLS_\*.HTM
		FOR %%a in (*.DBF) DO bdbfs %%a HTM=_HTMLS_\%%a
		REN _HTMLS_\*.DBF _HTMLS_\*.HTM

The happy owners of 4DOS can save the command (and time):
		DEL /y _HTMLS_\*.HTM
		FOR %a in (*.DBF) DO bdbfs %a HTM=_HTMLS_\%@NAME[%a]

Make the database documentation
		FOR %%a in (*.DBF) DO BDBFS %%a /STRUCT_FILE
		ECHO Databases of system > All_Dbf.txt
		FOR %%a in (*.STP) DO COPY All_DBF.TXT+%%a All_Dbf.TXT
		DEL *.STP



34.Forced mode.


BDBFS supports different formats of DBF with the aid of CLIP drivers.
On the other hand, many formats recently have appeared, are not
supported by CLIP yet.

They are: new fields and headers of  dBASE5, FlagShip, FlexMemo. Besides,
there are some programs, calling the fields "wrongly", f.e. beginning with
figure.

Therefore, I wrote the special "forced" mode in BDBFS, allowing to
process such bases without driver. For this purpose the heading of base
is corrected "in flight" to supported format and is restored after all
works.

So, in "forced" mode BDBFS supports the following formats:

	- dBASE4, dBASE5 (field type Bitmap, new headers);
	- FlagShip (field types 2,4,8, new headers);
	- FoxBase 1.0 (old header);
	- FlexMemo (new memo-format);
	- and, potentially, all another possible (and unknown to me)
	  field types, which will be processed as Character in this case.

Non-standard field names are transformed by the following rules:

	- if there are Code Page FoxPro 1200-1299 in header,
	  AnsiToOem() executed;
	- non-alphabetical and non-digital symbols are replaced
	  by symbol "_".
	- if the name begins with figure, it is anticipated with "_".


The following restrictions work for today:

	- the base is used only in an exclusive mode;
	- PACK-operation is prohibited if the base contains memo-fields;
	- MODIFY STRUCTURE-operation is prohibited;

"Forced" mode can be activated from command line with parameter
/FORCED (f.e. BDBFS MyBase /forced) or by setting of variable _lForced:=.T.
in ini-file. Besides, the question about activation are asked at opening,
if "forced" mode is not active yet and non-standard structure are
detected.

 For access to some "non-standard" types of fields (f.e., at use
in expressions, searches) it is necessary to use special functions (usual
edition, viewing, replacement of additional efforts not require):

	- Memo, Picture, Bitmap - types
		MemoSrc(<field_name>) - returns the string

	- 2 - type
		Bin2I(<field_name>) - returns the number

	Example:
//Set filter to field Cur1 of type "Currency"

		Alt+Shift+F YToCurs(Cur1)>100

Once again I remind, for processing of base in the forced mode,
it is necessary to correct its heading! Therefore, if, f.e., the power
will be lost or current window will be closed during the works, the
structure of base will be corrupted!

		SO, USE THIS MODE AT OWN RISK!


35.Video-modes.



BDBFS correctly supports all earlier established text modes - from 40*25
up to 132*60 etc.. However, if you have started from BDBFS the program,
changing a mode of the screen - troubles are possible.


36.What is absent in BDBFS in comparison with "competitors".



I had seen in products of similar purpose some features are
absent now in BDBFS.

Their list:

	- A calendar - I don't see a sense, IMHO it is not ORGANIZER, but
	  your opinion...
	- The export / import 1-2-3 - IMHO it is too specialized.
	- The calculation of statistical such as deviation etc. - is
	  similar previous item.
	- The diagrams on fields of base - will not be, IMHO this
	  feature of special-programs.
	- the viewing of the screen DOS - may be...

I'll be grateful for any opinions in this occasion.



37.Known problems.


Besides newly found mistakes, there is a number of known problems, which,
probably, will be eliminated in the future.

	- the new formats of DBASE4, DBASE5, FlagShip, FlexMemo
	  are supported in forced mode;

	- #define with parameters in ini-filesis not supported;
	- #xcommand with more, than one parameter is not supported;

	- a nonrestorable mistake "Disk overflow" during COPY or APPEND
	  operation.

	- FoxPro's indexes with expression like alias.field instead
	  alias->field cause the error when index field is changed.

	- noncompact IDX-s are not supported (restriction of driver).

	- SEEK doesn't work in FoxPro indexes made with established
	  SET COLLATE.


38.Gratitudes.


To Nantucket (to CA essentially I'll not be), American
Cybernetics, Assembler Software, Borland, SuccessWare - for the
used products.

To Yury Hnykin uri@itk.ru for
unvaluable help in translation to CLIP.

To authors of Clipper echo-conferences & NanFor.LIB.

To all people, who sent bag reports and proposals.

Special gratitude to L.Kujiy for careful testing and number of
the efficient offers.

To Phil Barnett for extremely useful Clipper oasis and a lot of
interesting programs.

To Tom Claffy for the used code of FileBrowse.


39.FeedBack.



Any questions, suggestions or bug-reports send me to:

	elb@lg.bank.gov.ua (preferably) Or Bondar_Eugen@yahoo.com

	Bondar Yevgen,
	91024,
	Leningradskaya 8,
	Lugansk, Ukraine

For newest version refer to  my web-page

	


40.The form of distribution.


	BDBFS for CLIP is distributed under GPL.

Quickest way is online registration.


SUPPLEMENT I. List of hot-keys.



Remember, that some functions are accessible only through the menu.

A.Main VIEW mode.

Positioning:

		Up Down Left Right PgUp PgDn

	On last field                   Ctrl+End
	On the first field              Ctrl+Home

	Go top                          Ctrl+PgUp
	Go Bottom                       Ctrl+PgDn

	To top of next page             Alt+PgDn

	To top of previous page         Alt+PgUp


Functions of management:

	Call the main menu                      F10, Alt+V
	Call the user menu                      F12

	Choose the base                         F4
	Open previous base                      Ctrl+O

	Set the index file                      F5
	Reindex                                 Alt+F5
	Index for                               Alt+F9

	Add record                              F3, Ins
	Add with copying                        Alt+F3
	Insert new record                       Shift+F3

	Count records                           Ctrl+F6
	Summarize the current field             Alt+F6
	Total on current index expression       Alt+Shift+F6

	Replace the current field by expression         Alt+R
	Replace a field in all records with:
	                constant expression             Alt+F4
	                varied expression               Ctrl+F4

	Same but with confirming                        Alt+Shift+R
	                                                Alt+Shift+F4
	                                                Ctrl+Shift+F4

	Edit one record (EDIT)                  Alt+E

	Edit a symbolical field                 Alt+W
	as a memo-field (for wide fields)
	Invert logical                          Space

	Information about base and environment  Alt+F1
	Show / print base structure             Alt+F2

	Attach from base (text)                 Ctrl+F9
	Copy to base (text)                     Ctrl+F3
	Copy with MEMO converting               Ctrl+Shift+F3

	Sort                                    Alt+S, Ctrl+F11
	Call the filter menu                    Alt+F, Alt+F11
	Set the filter for a condition          Alt+Shift+F, Alt+Shift+F11

	Print base [in a file]                  F2
	Print record [in <base.rec>]            Ctrl+P

	Modify structure                        Shift+F2
	Set fields and headings                 Ctrl+F2

	"Freeze" the current field              Alt+Z
	and all fields more to the left

	Set a condition of highlighting         Alt+B
	Restore color                           Alt+Shift+B

	Make HTML                               Alt+>


Search Functions:

	Go to record NN                         F6
	Search a key in an index (Seek)         F9
	Search for a condition (Locate)         F7
	Continue search                         Alt+F7
	Search in all fields at once            Alt+I
	(contextual search)
	Continue contextual search              Alt+Shift+I
	Search in current field                 F11
	(especially for non-experience users)
	Call a menu of searching                Ctrl+Shift+F11
	in current field
	Search for a maximum / minimum          Alt+M
	Search for a longest value              Ctrl+L
	in a text field
	Search for a double in an index         Alt+2
	WildSeek in index                       Alt+[
	Continue wildseek                       Alt+Shift+[


Deleting / recalling

	Delete / recall current record:         Del, Ctrl+T
	Delete for a condition                  Ctrl+F8
	Restore for a condition                 Ctrl+F7
	Invert for a condition                  Ctrl+Shift+F8

	Pack                                    F8
	Clear all (Zap)                         Alt+F8

	Clear the current field                 Shift+F4
	Clear all fields of record              Ctrl+Y


Clipboards

	Copy to WIN clipboard                   Ctrl+Ins
	Paste from WIN clipboard                Shift+Ins
	Copy to internal clipboard              Ctrl+Grey+
	Paste from internal clipboard           Ctrl+Grey-, Alt+GreyEnter
	ClipBoard:=Clipboard+Field              Alt+Grey+
	ClipBoard:=Clipboard-Field              Alt+Grey-
	ClipBoard:=Clipboard/Field              Alt+Grey/
	ClipBoard:=Clipboard*Field              Alt+Grey*
	Show the internal clipboard             Ctrl+Enter


Other

	Exit                                    Esc
	Exit without confirmation               Alt+X

	Exit to DOS                             Alt+F10
	Change a disk and directory             Ctrl+F10

	Execute macro-function                  Ctrl+F1
	Establish a variable                    Ctrl+F5
	Calculate an expression                 Shift+F6, Alt+G, ?

	Translate in lower case                 Alt+L
	Translate in capital                    Alt+U
	Capitalization                          Alt+K
	Proper                                  Alt+P
	Transform English->National             Alt+Q
	Transform National->English             Alt+Y
	Align a current field                   Alt+J

Copy a field from
				above		Alt+Up
				below		Alt+Down
				left		Alt+Left
				right		Alt+Right

Exchange record with
			above record		Ctrl+Up
			below record		Ctrl+Down

Exchange the field with
			above record		Alt+Shift+Up
			below record		Alt+Shift+Down

	Set a bookmark                          Ctrl+K + 0..9
	Go to a bookmark                        Ctrl+Q + 0..9


	Save environment                        Shift+F1
	Restore environment                     Shift+F5
	Save environment in AutoOpen file       Ctrl+Shift+F1

	Load ini-file                           Ctrl+F12

	Filer                                   Alt+F12

	Refresh (in network)                    Ctrl+R

	Undo changes                            Ctrl+U,Alt+BS


Compound Indexes (CDX, MDX, NSX)

	Choose TAG                              Alt+T,Shift+F12
	Set TAG number                          Shift+F7
	Set TAG name                            Shift+F8
	Make new TAG                            Shift+F9
	Remove TAG                              Shift+F10
	Set another CDX                         Shift+F11



B. GET mode

Positioning

	Move in a field                 Left Right
	Move between the fields         Up Down PgUp PgDn
	Same without changing
	the cursor's position           Shift+Up, Shift+Dn, Shift+PgUp, Shift+PgDn


	Next field				Tab
	Previous field				Shift+Tab

Functions of management

	Add record				F3
	Switch a mode of an Ins/Ovr            	Ins
	Clear the current field			Ctrl+Y
	Stop input without saving              	Esc
	Stop input with saving			Enter, Ctrl+W, Ctrl+End
	Cancel changes				Ctrl+U

	Switch a mode of input(see topic 1)    	F4
	Play macro				Ctrl+F1
	Input next as a symbol			Ctrl+Q, Ctrl+2

	Copy a field from above			Alt+ Up
	Copy a field from below			Alt+ Down
	Invert logical				Space

	Translate in lower case			Alt+L
	Translate in capital			Alt+U
	Capitalization				Alt+K
	Proper					Alt+P
	Transform English->National    		Alt+Q
	Transform National->English    		Alt+Y

	Copy to SYS clipboard			Ctrl+Ins
	Paste from SYS clipboard       		Shift+Ins
	Copy to internal clipboard     		Ctrl+Grey+
	Paste from internal clipboard		Ctrl+Grey-, Alt+GreyEnter

	Delete / recall current record		Shift+Del


C. SET FIELDS mode

	Remove a field from the list		DEL, Ctrl+Y
	Change the fields order			Ctrl+Down, Ctrl+Up
	Restore the previous settings		F5
	Finish changes				F10
	Cancel changes				Esc, Alt+X


D. MODIFY STRUCTURE mode

	Change value (if it's possible)		Enter
	Add a new field				F3
	Remove a field				F8
	Insert a field before current		F5, Ctrl+N
	Establish the necessary type		C, N, D, L, M, V, F
	(when cursor in File_Type)
	Optimize a structure			F9
	Quit and save changes			F10
	Cancel changes				Esc


E. VIEW STRUCTURE mode


	Output to a printer				F2, Shift+Tab
	Output to a text file (*.STP)			F4
	Output to a file with structure (*.STR)		F6
	Output to a file with the extended     		F5
	structure (*.STE)
	Configure of a printer				F9
	Create a program generating this structure     	F10
	and tags of compound index (*.STG)
	Moving to this field				Enter


F. DIALOGUES mode


	Select expression from:
		this condition history		F4, Ctrl+Down
		common condition history       	Alt+F4, Ctrl+Shift+Down
		results history			Ctrl+F4

	Insert a name of the current field		F2
	Insert a name of any field			Ctrl+F2
	Insert a header of the current field		F3
	Insert a header of any field    		Ctrl+F3
	Insert a value of the current field		F5
	Insert a value of the current field
	in quoted marks 				Ctrl+F5
	Insert a name of the current base		F6
	Quote all text  				Alt+Shift+"
	Call an insert menu     			F10

	In dialogue REPLACE of a symbolical field
	Call a menu of functions			F7

	In dialogue of fields defining
	(COPY, SORT) - select fields    		Alt+F2


G. VIEW RESULT mode (after calculation, summation etc.)


	Continue with result    			F2
	Write a result to the current field     	F5
	Write a result to the buffer    		Ctrl+Ins
	Menu of writing 				F10


H. MEMOEDIT mode (wide edit)


	Print   					F2
	Save as file    				F3
	Load from file  				F4
	Switch a mode of line's auto-wrapping   	F5
	Insert a Windows clipboard in the
	current position				F6,Shift+Ins

	Tune some system variables			F9
	Insert internal clipboard in the		Ctrl+Grey-
	current position.
	Delete the current line 			Ctrl+Y
	Delete word right				Ctrl+T
	Reform current paragraph			Ctrl+B
	Quit and save   				F10 (Ctrl+W)
	Abort editing with confirmation 		Esc
	Abort editing without confirmation		Alt+X



SUPPLEMENT II. THE MESSAGES.


The following messages could be shown at database opening.

<FileName> - is damaged or is blocked.

	The header of database is damaged or the base is locked by
	other process, or the base is marked as Read Only. You could
	download FREE BDBFS-Viewer for working with Read Only files.

<FileName> - is damaged.

	There are damages in the list of fields or there are
	unsupported field type.


SUPPLEMENT III. Supported functions.


As it was already noticed, it is possible to use almost all
system Clipper Functions.

AADD		ABS		ACHOICE		ACLONE		ACOPY
ADEL		ADIR		AEVAL		AFIELDS		AFILL
AINS		ALIAS		ALLTRIM		ARRAY		ASC
ASCAN		ASIZE		ASORT		AT		BIN2I
BIN2L		BIN2W		BOF		BREAK		CDOW
CHR		CMONTH		COL		CTOD		CURDIR
DATE		DAY		DAYS		DBAPPEND  	DBCLEARFILTER
DBCLEARINDEX	DBCLEARREL	DBCLOSEALL	DBCLOSEAREA	DBCOMMIT
DBCOMMITALL	DBCREATE  	DBCREATEINDEX	DBDELETE  	DBEVAL
DBF		DBFILTER  	DBGOBOTTOM	DBGOTO		DBGOTOP
DBRECALL  	DBREINDEX 	DBSEEK		DBSELECTAREA	DBSETFILTER
DBSETINDEX	DBSETORDER	DBSETRELATION	DBSKIP		DBSTRUCT
DBUNLOCK  	DBUSEAREA 	DELETED		DESCEND		DEVOUT
DEVPOS		DIRECTORY 	DISKSPACE 	DISPBOX		DOW
DTOC		DTOS		ELAPTIME  	EMPTY		EOF
EVAL		EXP		FCLOSE		FCOUNT		FCREATE
FERASE		FIELDGET  	FIELDNAME 	FIELDPUT  	FILE
FLOCK		FOPEN		FOUND		FREAD		FREADSTR
FRENAME		FSEEK		FWRITE		GETE		GETNEW
HEADER		I2BIN		IF		INDEXKEY  	INKEY
INT		ISCOLOR		ISPRINTER 	L2BIN		LASTKEY
LASTREC		LEFT		LEN		LENNUM		LOG
LOWER		LTRIM		MAX		MAXCOL		MAXROW
MEMOEDIT  	MEMOREAD  	MEMORY		MEMOWRIT
MIN		MOD		MONTH		NETERR		NEXTKEY
PAD		PADC		PADL		PADR		PCOL
PCOUNT		PROCNAME  	PROW		QOUT		QQOUT
RAT		READEXIT  	READKEY		READMODAL 	READVAR
RECCOUNT  	RECNO		RECSIZE		REPLICATE 	RESTSCREEN
RIGHT		RLOCK		ROUND		ROW		RTRIM
SAVESCREEN	SCROLL		SECS		SECONDS		SELECT
SET		SETBLINK  	SETCOLOR  	SETCURSOR  	SETKEY
SETPOS		SOUNDEX		SPACE		SQRT		STR
STRTRAN		STRZERO		STUFF		SUBSTR		TBCOLUMNNEW
TBROWSEDB  	TBROWSENEW	TIME		TONE		TRANSFORM
TSTRING		TYPE		VAL		VALTYPE		UPDATED
UPPER		USED		WORD		YEAR,

and also part of the special not documentary functions beginning with __.
Experience clipper's-men will understand me, others will not use all the
same. Specially for "experience"! I do not guarantee, that all of "__"
functions always will be behave how you have got used. The part from them
was rewritten in the special purposes.

SIX Functions

BAG2TAG		SXCHAR		SXDATE		SXLOG		SXNUM
SX_BLOB2FILE	SX_DATEVAL	SX_DBFDECR	SX_DBFENCR	SX_DECRYPT
SX_DTOP		SX_ENCRYPT	SX_FILE2BLOB	SX_FILEORDER	SX_FINDREC
SX_FNAMEPARSER	SX_GETLOCK	SX_IDTYPE  	SX_INDEXCOUNT	SX_INDEXNAME
SX_ISFLOCK	SX_ISLOCKED	SX_ISREADONLY	SX_ISSHARE	SX_KEYADD
SX_KEYCOUN	SX_KEYDATA	SX_KEYDROP	SX_KEYGOTO	SX_KEYNO
SX_KILLTAG	SX_MEMOBLK	SX_MEMOEXT	SX_ORDERCOUNT	SX_PTOD
SX_RLOCK  	SX_SETFILE	SX_SETMEMOBLOCK	SX_SETPASS	SX_SETTAG
SX_SLIMFAST	SX_TABLENAME	SX_TABLETYPE	SX_TAGCOUN	SX_TAGINFO
SX_TAGNO  	SX_TAGS		SX_TAGUNIQ	SX_VALDATE	SX_VFGET
SX_WILDMATCH	SX_WILDSEEK

M6_ADDSCOPED	M6_CHGOWNER	M6_DBEVAL  	M6_DBFILTER	M6_FILTADDREC
M6_FILTCHGREC	M6_FILTCOPY	M6_FILTCOUNT	M6_FILTDROPREC	M6_FILTINFO
M6_FILTINVERSE	M6_FILTJOIN	M6_FREEFILTER	M6_GETAREAFILT	M6_ISFILTER
M6_ISFILTREC	M6_ISOPTIMIZE	M6_NEWFILTER	M6_RECCOUNT
M6_REFRESHFILT	M6_ORDCOND	M6_ORDCREATE	M6_SET
M6_SETAREAFILT	M6_SETFILTER	M6_SETTEMP


Nantucket Forum Functions

FT_AADDITION	FT_AAVG		FT_ADESSORT	FT_AEMAXLEN	FT_AEMINLEN
FT_AMEDIAN	FT_ANOMATCHES	FT_ASUM		FT_AT2
FT_BYT2BIT	FT_BYT2HEX	FT_BYTEAND	FT_BYTENEG	FT_BYTENOT
FT_BYTEOR  	FT_BYTEXOR	FT_BITCLR  	FT_BITSET  	FT_D2E
FT_DEC2BIN	FT_DOSVER  	FT_E2D		FT_ELAPSED	FT_FDAY
FT_FINDITH	FT_GCD		FT_GETE		FT_GETMODE	FT_INT86
FT_ISBIT  	FT_HEX2DEC	FT_ISBITON	FT_ISPrint	FT_LASTKEY
FT_LDAY		FT_MADD		FT_METAPH  	FT_NOOCCUR	FT_PUTKEY
FT_ORIGIN  	FT_RAND1  	FT_ROUND  	FT_SQZN		FT_SYSMEM
FT_TEMPFIL	FT_UNSQZN  	FT_WORKDAYS	FT_XTOY


Netto Functions

FN_BIN2HEX	FN_BIN2I  	FN_CONNID  	FN_CONNINF	FN_CONNNUM
FN_DEFCID  	FN_DEVTYPE	FN_ERROR  	FN_FSNAME  	FN_GETSN
FN_HEX2BIN	FN_I2BIN  	FN_INETADD	FN_NAMEL
FN_NETVER  	FN_NONULL  	FN_OBJCNUM	FN_PEEKSTR	FN_PFCONID
FN_POKESTR	FN_PRCONID	FN_SPFCID  	FN_SPRCID  	FN_STAADDR
FN_WHOAMI  	FN_WRCONNI	FN_WRFSNAM


FoxPro Functions

ALEN		ANSITOOEM  	ATC		BETWEEN		BINTOC
CDX		CEILING		CHRTRAN		CTOBIN		CTOT
DATETIME  	DMY		EVALUATE  	FILTER		FLOOR
GOMONTH		ID		INLIST		ISBLANK		KEY
NDX		OCCURS		OEMTOANSI  	PI		PROPER
SEEK		SIGN
SYS(0-3,5,6,10-16,21-23,1001,2000,2003,2012,2020,2021)


Clipper Tools Functions

CTOF            FTOC            XTOC            LIKE            Expand
CharOnly        CharRem         CharSpread

The functions are defined specially for BDBFS are described in the
SUPPLEMENT IV.




SUPPLEMENT IV. BDBFS-PRO.


	This supplement is intended for wishing as much as possible
fully to master BDBFS. This is an information about calling of BDBFS
procedures and functions, and also using of internal variables.


A. System variables.

You can somehow use in expressions (examples was above)
the following variables:

                                                                Default
Variables of conditions:                                        -------
	Condition Locate                	_LCONDIT  	  ""
	Expression of search            	_GSearch  	  ""
	Condition Seek                  	_FCONDIT  	  ""
	Condition Sum                   	_SumCOND  	  ""
	Condition Print                 	_PCOND		  ""
	Condition Count                 	_CountCOND	  ""
	Condition Delete                	_DelCOND  	  ""
	Condition of calculation        	_ECOND		  ""
	Condition Replace               	_RCOND		  ""
	Expression Replace              	_Repl		  ""
	Condition of the filter         	_FltrCond 	  ""
	Condition of sorting            	_SortCond 	  ""
	File sorting                    	_SortFile 	  ""
	Condition of TOTAL              	_TotalCond	  ""
	File TOTAL                      	_TotalFile	  ""
	Expression of sorting           	_ckSort   	  ""
	Field of copying                	_ckField  	  ""
	Condition of Export to HTML     	_HtmlCond 	  ""
	File HTML                       	_HtmlFile 	  ""
	Condition of Export to XML      	_XmlCond  	  ""
	File XML                        	_XmlFile  	  ""
	Condition of Export to XML      	_XmlCond  	  ""
	File XML                        	_XmlFile  	  ""
	Condition of highlighting       	_cb	  	  ""
	Condition of an index (tag)     	_IndexFor 	  ""
	Global history of conditions    	_aGlbHcond	  {}

Variables of results:
	Last sum				__Sum		  0
	Last count      			__Count		  0
	Last result     			__Go		  0
	ClipBoard contents			_ClipText	  {}
	Choice from it  			_ClipChoice	 .T.
	Windows clipboard			_lCnvWClip	 .T.
	OEM/ANSI converting
	Directory of transition 		_newDir		  ""
	Quantity of processed   		_Tally		  0
	records
	Global history of results		_aGlbHRes 	  {}

Configuration of a printing:
	Centering of numbers    		_NeedCentr	  .F.
	Whether to print 0 when number=0	_PrintZero	  .F.
	Whether to print numbers of records	_NeedRec  	  .T.
	Title on each page			_lTitleAll	  .F.
	Header on each page     		_NeedHeadPage	  .T.
	Head's numbers: on first page   	_lDgtHdr  	  .F.
			on other pages  	_lHdAll		  .F.
	Numbers of pages			_NeedPrPage	  .T.
	Eject after each page   		_NeedEject	  .F.
	Starting sequence of the printer	_PSCode   	  ""
	Ending sequence of the printer  	_PECode   	  ""
	Left border     			_LMargin  	  0
	Length of page  			_Plength  	  0(tapes)
	Standard header 			_NeedMainHead	  .T.
	Print device    			_printer  	  PRN
	Whether to append to a file		_NeedApFile	  .F.
	Whether to summarize    		_NeedSum  	  .T.
	numerical fields
	Width of Memo-fields    		_MemoPrnt	  50
	Maximum number of lines 		_MemoNumLines	  10
	in Memo-fields
	Symbol divider of cells:
			in body 		_DefaultBorder	  :
			in header		_DefaultHBorder	  :

Color scale:
	Primary color   		_Bm	'7/1,0/3,N,4/7,7/4,7+/1,7+/4'
	Help and inquiries		_Im		'n/w+,g+/n'
	Results 			_CM		'Gr+/N,W+/B'
	Menu    			_MenuColor	'Gr+/b, g+/b'
	Unchoosable     		HiddenColor	'w/b'
	elements of menu
	Headings of panels		_HdColor   	'G+/b*'

The interface:
	Indicator's step		_Sx_Step	100
	Indicator			_lMeter 	.T.
	Editor of memo  		_MemoEditor	""  (built - in)
	and wide fields
	Viewer of files 		_TextViewer	""  (built - in)
	Step of tabulation		_nMemoTab	8
	in memo
	Memo line length		_nMemoWrap	255
	Gauging time of execution	_Timing		.T.
	Width of display of file	_DirShow	16
	names in Filer
	Extensions associations 	__aExt		{}
	in Filer
	(array structure: {{mask1,command1},{mask2,command2}...} )

Other:
	Current base			_base
	Current index file  		_oldind
	TBrowse object			_BDBFBrow
	Current field			_C_F
	Current field context		__Content
	Current tag			_TagName
	Current cdx			__CDX
	Mask of files			_Mask		'*.dbf '
	Current RDD			_DefaultRDD	'DBFCDX'
	Current memo extension		_DefaultMemo	'FPT'
	Current cdx extension		_DefaultCDX	'.CDX '
	User menu
		Line			UserMenuPrompts	 {}
		Action			UserMenuActs	 {}
	Auto-saving environment		_AutoSave   	.F.
	Auto-restoring environment  	_AutoRestore	.F.
	Standard keyboard             	_Usa_Keyboard	'QWERTY......'
	National keyboard             	_My_Keyboard	'‰–“Š…......'
	DOS char set			_Oem_Set    	'€‚ƒ„…......'
	WINDOWS char set              	_Ansi_Set   	'ΐΑΒΓΔΕ......'
	Max fields in browse		_nBrowMaxField	170
	Max UNDO count			_UndoSize   	1024
	"Forced" mode			_lForced    	.F.
	OEM-to-ANSI request at export	_lexp_o2aq  	.T.
	OEM-to-ANSi necessity		_lexp_o2    	.T.
	Plugin's search path		_PlugDir    	Path to bdbfs/PLUGINS



B.Called functions.

It is possible to call any internal function BDBFS, as well as
system in any modes. It looks more natural to use this in a mode of
calculation (Shift+F6, Alt+G, ?),or in a mode of assignment (Ctrl+F5).

Examples:
	Alt+G		Aver('Example')
	Ctrl+F5	avrg=Aver('Example')

For presentation of the explanatory we shall conduct on educational base

	NAME	S02	S03	S04
	Your	12	1	13
	Your1	32	2	33
	My	10	3	10
	My1	30	4	0


1. Functions of calculation.


	SUM( <cExpr> [, <cCond>] ) --> nResult

Sum base on expression cExpr for a condition cCond.
Returns Number.

Examples:
	Alt+G	(1)	Sum ('S02+S03', '[My] $ Name')
			(2)	Sum ('S02', '.t.')

	(1) will return 47	(2) - 84

If <cCond> is omitted, the scope is all records.

Except for returned value the result is remembered in variable
	__Sum


AVER(<cExpr> [, <cCond>]) --> nResult Calculates average on expression cExpr for a condition cCond. Returns Number. If second parameter is omitted, it is meant .t. Example: Ctrl+F5 MediumS2=Aver('S02', '[My] $ Name') will return 21
COUN(<cCond>) --> nResult Counts up quantity of records satisfying to a condition cCond. Example: Ctrl+F5 CntMy=Coun ('[My] $ Name') will return 2 If second parameter is omitted, it is meant .t. Except for returned value the result is remembered in variable __count
SumLine([<FromField>], [<ToField>]) --> nResult Summarizes fields "lengthways" records, from <FromField> up to <ToField>. Default FromField is first field, ToField - last field. The non-numerical fields are ignored. Examples: (for the first record) SumLine() --> 26 SumLine(1,2) --> 12 SumLine(3) --> 14 Except for returned value the result is remembered in variable __Go
Like(<cEtalon>, <cTest>) Defines whether or not a character expression is contained in another expression. LIKE() returns true (.T.) if <cEtalon> matches <cTest>. <cEtalon> can contain the wildcard characters * and ?. The question mark matches any single character in <cTest> and the asterisk matches any number of characters. You can mix any number of wildcard characters in any combination in <cEtalon>. The function has shown the same high-speed results, as same function of Clipper Tools (probably, algorithm is same). But EXE is 0.5K less :-) . Examples: F7 Like ('spr*.dbf', FileName) Alt+G Like ('?m*h', 'smith') --> .t.
Crc32(<cExpr>) Calculates the check sum of a line. The algorithm of PKZIP is used. Example: the check sum of all fields: Crc32(Name+XTOC(s02) +XTOC(s03) +XTOC(s04))
Rand([<nExpr>]) Returns a random number in a range from 0 up to 1. Everyone ExprN give birth to the identical sequence. Example: Rand(Seconds())
Random(<nMin>, <nMax>) Returns random integer in range from nMin up to nMax. Example: Random(0,1000)
RoundIt(<nVar>,<nPlace>) Correct rounding off. Clipper not always correctly carries out operation of a rounding off. Example: Round(1.025,2) --> 1.02 RoundIt(1.025,2) --> 1.03
2. Functions of transformation

	Capitalz(<cExpr>)	--> ExprC

Returns the specified character expression with initial letter
capitalized and the remaining characters lowercase.

Returns the empty line if parameter is absent.

Example:
	Capitalz('LUGANSK')	-->  Lugansk


Padj(<ExprC>,<cAlign>,<cFill>,<nLen>) --> ExprC Align the specified character expression with a fill character to create a new character string of a length <nLen> (default: current field's length). <cAlign> defines the method of aligning: "L" - String is aligned to left side. "C" - String is centered. "R" - String is aligned to right side. "J" - String is justified. "E" - String is expanded. Default <cFill> is space. Example: //Current field length is 12. PADJ("Report",'C') --> " Report " PADJ("Report",'E') --> "R e p o r t " PADJ("My Report",'J','.',14) --> "My Report"
OemToAnsi(<cExpr>) Converts each character in a character expression to the corresponding character in the ANSI character set (default: 1251). You can change the char set to your own, by defining the variables _Oem_Set, _Ansi_Set in BDBFS.INI. Example: OemToAnsi('‹“ƒ€‘Š') --> ΛΣΓΐΝΡΚ
AnsiToOem(<cExpr>) Inverse function to OemToAnsi().
SplitLine(<cExpr>) Transform the specified character expression to an array. Array's elements are separated by points. Example: SplitLine('One,Two,Three') --> {'One', 'Two', 'Three'}
dbTrans(cNewBase, Fields [, bFor, bWhile, nNext, lRest]) Copies the current base with an opportunity of renaming or transformation of fields. The list of fields is set in inverted commas (as a line), or as the array (that is necessary at the giving of expressions with points). If the calculated fields are not defined in the list of fields, the function works completely as system command COPY. See also topic 5.Append/Copy of the present description. Examples: DBTrans('NewFile','Char,Num AS Digit,Num*2 AS Double') DBTrans('NewFile',{'LEFT(Char,2) AS Symbol','Num'}, {||Num # 0})
TB2Html([<cHtmlFile>] [, <cTitle] [, <aDesign>]) Exports the database to a format HTML. If the name of a file is not defined - it is requested. Title of a file (cTitle) is database name by default. An array of colors aDesign has structure: {page background color, table background, text color for table and header, text color for deleted records}. Default: "navy","blue","white","red". Example: Tb2Html('MyBase','WWW FOREVER!',; {'fffffc0','fffff80','00000ff','black'})
TB2Xml([<cXmlFile>] [, <cTitle] [, <lYesNo>] [, <cRecName>]) Exports the database to a format XML. If the name of a file is not defined - it is requested. If parameter lYesNo==.T. than the words "Yes" / "No" are used for logical values, otherwise - "1"/"0" constants. The parameter cRecName defines tag's name for records (by default it is word "Record"). Example: Tb2Xml('MyBase',,"Employes",.T.)
TB2Xls([<cXlsFile>] [, <cTitle] [, <lYesNo>] ) Exports the database to a format XLS. If the name of a file is not defined - it is requested. If title of sheet (cTitle) is defined it is placed into first row of XLS-file. If parameter lYesNo==.T. than the words "Yes" / "No" are used for logical values, otherwise - .T./.F. constants. Example: Tb2Xls('MyBase',"Sellers")
3. Other system functions.


ModiFile(<cFileName>) --> .T. at successful record It is an elementary text editor. As uses MemoEdit, it can edits files up to 64K. In conditions of small amount of memory, this size can decrease. Example: ModiFile('c:\config.Sys')
Scatter() Copies data from the current record to an array with a name _Scatter. The attribute of deleting enters in last element of an array.
Gather() Replaces the data in the current record with data from an array with a name _Scatter, usually created by function Scatter().
SWAP(recno1, recno2) Exchanges the contents of records with physical numbers recno1, recno2 through the internal buffer. Example: Swap(1,3)
WORK(HEAD) --> cResult Defines the true name of a field on heading. It is useful in case of the setting of fields by Ctrl+F2, when you don't remember the real field's name, and its name should be specified, for example, in the search expression. Example: Work('My name for 2 field') --> 'S02'
FindMax(NeedMax [, FieldName], [EvalBlock]) - > MaxVal The universal function of searching of a maximum / minimum. Parameters: NeedMax - .T., if the maximum is necessary, .F. - minimum FieldName - field or expression, by default - current field. EvalBlock - block of a code calculated for comparison, by default - value FieldName ({|i| i}) Examples: FindMax(.T.,'S02 ') - > 32 FindMax(.F.,'S02 ') - > 10 //Length of the longest name FindMax(.T.,'Name ',{|i |Len(Trim (i))}) -> 5 (is found ' Your1 ')
PrintEdit([cFileName]) Prints the current record on the device of a printing (default-printer) in an unwrapped kind. By pressing Ctrl+P in BDBFS - into the file with a name <CurrentBase>.Rec. Appending/rewriting of a file depends on the appropriate printer's setting. Example: NEW.DBF Record 1 ---------------------------------------- NAME Your S02 12 S03 1 S04 13
For(<nFrom>, <nTo>, <bEval>, <bFor> ) "FOR" cycle. Could be useful, for example, in INI-files. Codeblock bEval is executed when Eval(bFor)==.T.. The cycle variable is transferred to the bEval and bFor as parameter. bEval and bFor can be of Codeblock or Character type. Examples: cSet:='' For(1,254,{|_1|cSet:=cSet+CHR(_1)}) --> '...ώ' nSum:=0 For(1,FCOUNT(),{|i| nSum:=nSum+FIELDGET(i)**2},; {|i| VALTYPE(i)=='N'}) nSum:=0 For(1,FCOUNT(), "nSum:=nSum+MyField**2") Some examples are in PLUGINS directory.
While(<bCondition>, <bEval> [,<bFor>] [,<lBase>]) "WHILE" cycle. If lBase==.T., SKIP is executed after each bEval. bCondition, bEval and bFor can be of Codeblock or Character type. Example: cName:='' While( '!EOF()', {|| cName+= Name},,.T.) Result: 'YourYour1MyMy1' cName:='' While( '!EOF()', {|| cName+= Name},'s02<30',.T.) Result: 'YourMy' Some examples are in PLUGINS directory.
4. Interface functions.

These functions are usually used in plug-ins. See also
include file BDBFS.CH, improving use of these functions.


NFIND((<_mess>,[<_var>],[<_color>],[<_Footer>],; [<lNeedTone>],[<nTimeWait>],; [<nlShine>],[<nMuch)] ) The universal function for result's show. Parameters: _mess - any datatype's message. _var - the result's variable. If defined then: - the result is written in global history; - some additional actions are allowed with result (f.e. it could be placed into the field by pressing hot-key). _color - the color of message, default is defined in variable _im. _Footer - the message on bottom border. lNeedTone - the necessity of beep. nTimeWait - the duration of show in seconds, default - until any key pressing. nlShine - the position of highlighted symbols in message. nMuch - number of highlighted symbols Examples: Nfind('Ready') Nfind('Nfind',,,,.T.) //with beep Nfind(Date(),,,'Today:') Nfind(Directory('*.DBF')) //Array example nSum:=Sum('s01+s02+s03') Nfind(nSum, nSum, ,'Sum result',.T., 30) Nfind(nls,,,'Check Digit is highlighted',,,,5,1)
Meter(<nStep>,[<cMsg>],[<nCurr>],[<nTotal>]) The universal progress-indicator. Parameters: nStep - phase. Legitimate values: 1 - Start (initial screen's painting) 2 - Show (paint current position) 3 - Finish (restore screen) cMsg - warning mess, default: "Wait..." nCurr - ordinal number of current record, default: KeyNo() with active index and Recno() without it. nTotal - number of all records to process taking into consideration database filter, active index and scope (All/Rest). Example: Meter(1, 'CHECK'S SUM PRODUCING') GO TOP _tally:=0 WHILE !EOF() _Field->Crc:=Crc32( Name+XTOC(s02)+XTOC(s03)) IF RECNO()-_tally > 10 _tally:=RECNO() Meter(2) ENDIF ENDDO Meter(3)
CheckEsc([<lStart>],[<nTotal>]) -->lContinue The function organizes the calling of progress-indicator with interval defined in system variable _SX_STEP, with checking of process interrupting by pressing ESC. Example: Meter(1) CheckEsc(.T.) //Clear counter DO WHILE CheckEsc() ... ENDDO Meter(3)
CheckFound([<lFnd>]) The function: - Close Meter(), - when lFnd and !FOUND() says, that search was unsuccessful, otherwise reports the readiness.
GetName(<chead>,<_varName>,[<cMask>],[<cGetMask>],; [<lCanSelect>],[<lReturn>],[<lPsw>]) -->lRes The universal function of dialogue for inputting any values. Could offer the choice from History, picking file in Filer, field list selection. Parameters: cHead - window's title. _VarName - variable's name. Must begin from symbol _. cMask - mask for picking file in filer (through F9). cGetMask - input pattern. lCanSelect - if equal .T. dialogue of field list selection (through Alt+F2) is added. lReturn - if equal .T. then always return to initial directory after filer. lPsw - the password's mode (symbols are not displayed). Examples: m->_OutFile:='CopyFile' IF GetName('Define the filename for copy','_Outfile') __CopyFile('MyFile.DBF',_OutFile) ENDIF IF GetName("Specify the fields for processing", '_ckField',,,.T.) ... ENDIF IF GetName('File to delete','_DelFile', '*.BAK',,,.T.) FERASE(_DelFile) ENDIF
Panel(<nTop>,<nLeft>,<nBottom>,<nRight>,; <aMess>,<aColor>,<nBottomBord>) Draws a "3-d" panel. nTop,nLeft +-------------------------------------------+ | aMess[1] | | ... | | aMess[n] | | +---------------------------------------+ | | | | | | | | | | | | | | +---------------------------------------+ | nBottomBord +-------------------------------------------+ nBottom,nRight The external rectangle is convex and internal is concave. The messages (aMess) may be array, single string, or string with comma. The internal rectangle is drawn from first row after messages to row with number nBottom-nBottomBord (by default, nBottomBord==1). An array of colors (aColor) may consist 3 elements: - color of external rectangle - color of messages - color of internal rectangle If aColor (or it's elements) is not defined, SetColor() is used. Examples: Panel(10,10,16,69,'Write Error!, Press any key',AlarmColor) Panel(10,10,17,69,{'Score-Board',''},{m->_cm,m->_im,m->_cm},2)
ReadCycle(<aGets>,<aSets>,<sc_Row>,<sc_col>) -->lRes The universal function for inputting any values. The edition continues in cycle until pressing ESC or F10. Usually used for configuration. Parameters: aGets - array of arrays of GET parameters for each variable. The structure: {row,col,msg,[picture],[validblock]} aSets - array of variables sc_row, sc_col - coordinates for indicator "Ins/Ovr". Example: See PLUGINS\PVI.INI in distributive.