home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
clipper
/
bcklib2.zip
/
BECKLIB2.DOC
< prev
next >
Wrap
Text File
|
1993-05-30
|
106KB
|
3,087 lines
Welcome! The Beckner Library & Utilities package that you now have in your
hands is the same library used by BecknerVision Inc to create its many
vertical market applications over the years.
THIS VERSION IS CERTIFIED TO WORK WITH CLIPPER 5.01 OR CLIPPER 5.2.
As one reviewer said, "There is something for everyone in this library". This
same reviewer said that this package suffered from an identity crisis, because
it covered so many diverse areas. We took this in a complimentary fashion.
So, why shareware? First, we believe in the shareware concept. The idea of
trying the software before you actually buy it makes since. The package is
complete. Nothing is missing. The Library is not limited in any fashion.
The documentation, however, is minimal in this guide. Upon registration you
will receive a complete printed manual, as well as the COMPLETE source code
for the library, so you can make any changes you like. By "complete", we mean
the clipper and assembly code for all library functions, utility programs and
samples. Nothing is left out.
This is "Beckner Library & Utilities II", which goes way beyond the
capabilities of BecknerLib I. We hope you enjoy it.
THE LEGAL PAGE - THIS IS REQUIRED READING
Beckner Library and Utilities II is Copyright (c)1990-1993 BecknerVision Inc,
All Rights Reserved. The software and documentation are manufactured/printed
in the United States of America. This product is being distributed by our
interpretation of the shareware concept. You may distribute the shareware
portion of the product, which specifically contains these files:
REGISTER.DOC BECKNER.INC BECKNER.LIB
ALIAS.CH BECKLIB2.DOC READ.ME
INDEX.PRG AMORT.PRG APR.PRG
FINDREPL.PRG BVASST.PRG WP.PRG
BROWSE.PRG EXTRACT.PRG STANDARD.PRG
FIXDBF.PRG COMPUTE.PRG FUNCPROC.PRG
EXAMPLEA.PRG FORMS.PRG BVUPDATE.PRG
DOCS.PRG ELIDUP.PRG BLUEBG.PRG
EXAMPLED.PRG SS.PRG
This product may be distributed only if all files shown above are distributed
as a single archive file, and with no other files present. Specifically, you
may NOT distribute function source code.
WHAT YOU GET WHEN YOU REGISTER
You receive the following upon receipt of your registration and payment:
1. The complete source code to all functions written in either Clipper or
Assembly. 95% of this product is written in Clipper 5.01.
2. The printed documentation, which goes way beyond the scope of this
text file.
3. An Expert Help guide.
4. Ability to purchase specialty libraries for extreme discounts.
REGISTRATION
You are required to register this software if you decide to use it.
You can print the document REGISTER.DOC, fill it out, include your
payment for $50.00 US and either fax it or mail it. To fax it, fill
out the credit card info or mark the COD box and fax to (919) 760-1550
or in Europe: +49-40-7665664 Or mail it to:
U.S.A. Europe
BecknerVision Inc SOFTSOL
Dept 15 Neue Str. 35a
PO Box 11945 2100 Hamburg 90
Winston-Salem,NC 27116-1945 Germany
LEGAL STUFF - CONTINUED
DISCLAIMER & WARRANTY
This product, including all associated software and documentation, is
provided "AS IS", without any implied warranty of merchantability or
fitness for a particular purpose. BecknerVision Inc makes no
representations or warranties with respect to the contents hereof, and
specifically disclaims any implied warranties. BecknerVision Inc
reserves the right to alter this documentation or the associated
software without any obligation whatsoever to notify any person of such
revision.
BecknerVision Inc will not be liable for any damages, real or imagined,
direct or indirect, which results from the use of or purchase of this
product. In no event shall liability exceed the actual price paid for
the software license.
In the event any rememdy hereunder is determined to have failed, all
limitations and exclusion of damages set forth shall remain in full
force and effect.
Any statements by any agents, employees or distributors of
BecknerVision Inc do not constitute warranties and are not binding.
This written warranty is the entire warranty, and no employee of
BecknerVision Inc may modify it.
This warranty gives you specific legal rights, which vary from state to
state. Some states do not allow exclusion of incidental or
consequential damages.
LEGAL STUFF - CONTINUED
LICENSE
YOUR FIRST USE OF THIS PRODUCT CONSTITUTES YOUR AGREEMENT TO THE
LICENSE AGREEMENT SET FORTH HEREIN.
BecknerVision Inc, hereinafter LICENSOR, grants to you, the customer,
hereinafter LICENSEE, the right to use this copy of Beckner Library and
Utilities II on a signle computer, which may be part of a network, at a
single location as long as LICENSEE complies with the terms set forth
in this agreement. LICENSOR reserves the right to revoke this
license if the LICENSEE violates any portion of this agreement. In the
event of such termination, LICENSEE agrees to return all copies of the
product, including original and backup copies of the diskettes, and the
documentation, any all other materials delivered as part of the
product, to LICENSOR within thirty (30) days of the termination of this
agreement.
LICENSEE agrees to make copies of this software for backup purposes
only. LICENSEE agrees to not copy, or have made, copies of this
documentation and to take all necessary precautions to insure the
archival copies of the software are not distributed to or acquired by
other parties, but in no case will LICENSEE use less caution than that
afforded to LICENSEE'S own proprietary products.
LICENSEE has the right to combine all or part of the contents of
the product with any application, private or commercial, which they may
develop from time to time. LICENSEE agrees to not extract specific
portions of the product and distribute them in any form or fashion
unless as an integral part, and incorporated into, their application.
LICENSEE agrees to not sell the product to any other person or entity
in whole or in part.
SHAREWARE EXCLUSION
LICENSEE may distribute a complete copy of the SHAREWARE version of the
product, which specifically includes these files, and only these files:
REGISTER.DOC BECKNER.INC BECKNER.LIB
ALIAS.CH BECKLIB2.DOC READ.ME
INDEX.PRG AMORT.PRG APR.PRG
APRX.PRG FINDREPL.PRG BVASST.PRG
BROWSE.PRG EXTRACT.PRG ADDAREC.PRG
FIXDBF.PRG COMPUTE.PRG FUNCPROC.PRG
EXAMPLEA.PRG FORMS.PRG BVUPDATE.PRG
DOCS.PRG ELIDUP.PRG EXPORT.PRG
EXAMPLED.PRG
These files must be distributed as a single product, with no files
excluded, nor any added. LICENSEE may not replace any of the files
with modified files before distributing them.
ACKNOWLEDGEMENTS
This library package is dedicated to the hard working Clipper programmer, who
goes through so much frustration during the long hours or application
development. Our sincerest hope is that this package will ease some of the
frustration and shorten the hours to completion of your application.
This package would never have been put on the market if it hadn't been for
Jeanne Nerwinski and the North Carolina Clipper Users Group. Jeanne's
inspiration in helping me get this product moving was greatly needed, even as
her health was failing. A stronger individual I never met.
The North Carolina Clipper Users Group (NCCUG), who reminded me that you can
really accomplish something if you don't let yourself get bogged down. There
is always someone to ask for help, and someone to offer encouragement.
Dr Charles Beattie, PhD, without whom this project would never have been
completed.
The file classes in the CLASS chapter were added at the last minute. These
were created by the NCCUG members at their January 1993 regular meeting, to
help teach object-oriented programming. These classes do require that you
have the Class(y) library.
My family, Mary Ann, Elizabeth and Joey, thanks for your patience during those
long hours in the office.
Computer Associates, for continuing the evolution of the revolution. Things
are happening!
Ed Tiley, for showing me HOW to release this product.
John Fried, for challenging me. And for the devcon/technicon trips.
David Coulter, most especially for making me appreciate what objects
can do.
NOTE: 3% of the gross product revenues are donated to the North
Carolina Clipper Users Group. Please be sure to register.
SAMPLE PROGRAMS
All sample programs are compiled and linked as follows:
CLIPPER <program> -N -M -W
RTLINK FILE <program> LIB BECKNER
----------------------------------------------------------------------------
BLUEBG
This is nothing more than a program to show a real silly implementation
of the preprocessor. Don't just compile/link/execute it, look at the
code. A good way to really see what the preprocessor does is to look
include the switches -P -B when compiling, then using CLD to look at
the program as it executes, turning on the preprocessor view first.
----------------------------------------------------------------------------
APR
Run this program to determine the APR, giving it the amount financed,
the payment amount and the number of payments.
----------------------------------------------------------------------------
AMORT
Displays an amortization schedule. You enter the number of payments,
the starting balance, the first due date and the APR. For each
payment, the program displays the payment number, the due date, the
payment amount, the principal, the interest and the balance after the
payment.
----------------------------------------------------------------------------
SS
Tests the screen saver built into our READ. When you execute the
program, wait 15 seconds for the default screen saver to invoke.
----------------------------------------------------------------------------
EXAMPLEA
Gives examples of the array functions.
----------------------------------------------------------------------------
DOCS
A sample program to create Expert Help files. This is the actual
program we created to create our own Expert Help files, which come with
your registered program.
----------------------------------------------------------------------------
EXAMPLED
Gives examples of date functions.
UTILITY PROGRAMS
Compile and link the same as the sample programs.
----------------------------------------------------------------------------
FINDREPL
This is a global file search and replace utility written entirely in
CA-Clipper 5. It can be run as a command line utility to find and
replace a single character string, though it can function through
multiple files. The syntax is:
FINDREPL[ /I][ /F<ftext> /R<rtext>][ /N<wildcard>]
/I ignores case, /F specifies the character string to find, /R
specifies the replacement string, and /N lets you specify the filename
or a wildcard. Specifying the find and replace parameters without
specifying the /N option causes the default wildcard of "*.PRG" to be
used. If you don't specify the /F or /R parameters, then the file
FINDREPL.TXT is used to make the changes. You build this file as a
standard delimited file. If I wanted to change all lowercase "return"
to "RETURN" and change all "function" to "FUNCTION", FINDREPL.TXT would
contain:
"return","RETURN"
"function","FUNCTION"
MAKE A BACKUP BEFORE USING THIS FUNCTION. THIS IS A DANGEROUS UTILITY
WHICH CAN MAKE MASSIVE CHANGES TO MANY FILES AT ONE TIME. YOU ARE
WARNED!
----------------------------------------------------------------------------
BVASST
THIS UTILITY IS TOO LARGE TO GO OVER IN DETAIL IN THIS DOCUMENT. A
COMPLETE CHAPTER COMES IN THE REGISTERED DOCUMENTATION.
This utility is more-or-less a menu-driven dot prompt replacement. We
have used it since the early days of Clipper, adding to it with each
release.
You are first prompted for a filename and an index list. The filename
is required, the index list is optional.
The options are:
A. Add Add a new field to the structure.
B. Delete Delete a field, giving its ordinal position.
C. Change Change a field, giving its ordinal position.
D. Display Display the structure.
E. Print Print the structure.
F. Ed/Add Edit a record or add a new record.
G. Rep/Del Replace the contents of a field or delete records,
specifying an optional filter expression.
H. Struct Creates an extended structure file, \STRUCT.DBF.
I. ZapAll Removes all data from the file.
J. Browse Full-screen browse, using fBrowse function.
K. Pack Packs the file.
L. Append Prompts for a filename to append data from and a filter.
M. Sets Gives access to various SET functions.
N. Stat/+++ Suboptions include: [I]nfo, which displays some file
information; [C]ount, which counts the records; [A]vg,
which returns an average; [S]um, which returns a total;
[E]xpr, which allows you to enter a freeformat
expression whose value is returned; [G]enerators, which
give you access to our Forms Generator, Word Processor
and Report/Label Generator; [O]rphanage, which deletes
records in secondary files which do not have a
corresponding master record in the current database;
[R]eindex, reindexes all open indices; [P]rint, which
dumps the file to the printer; and [D]upl, which
deletes duplicate records based on a supplied
expression.
Quit Quits the primary program, returning to the filename
prompt. Press <space> to delete the filename, then
<enter> 3 times to actually quit.
----------------------------------------------------------------------------
INDEX
A command line indexer for convenience. Run it with no parameters for
help.
----------------------------------------------------------------------------
BROWSE
A command line browse implementor. Use this syntax:
BROWSE <filename>
----------------------------------------------------------------------------
EXTRACT
A command line program which creates a database file by extracting
records from another database file. Enter the EXTRACT command with no
parameters to see how it functions.
----------------------------------------------------------------------------
FIXDBF
Fixes trashed records in a database file. Uses the fFixDbf() function.
Use this syntax:
FIXDBF <file>
The fixed file will be called "$BECKNER.DBF".
----------------------------------------------------------------------------
WP
Executes the BecknerWP() meta-function (word processor).
----------------------------------------------------------------------------
COMPUTE
Evaluates and returns the result of any valid expression from the
command line. The syntax is:
COMPUTE <expression>
----------------------------------------------------------------------------
FUNCPROC
Creates FUNCPROC.DBF, which contains the function or procedure name and
the filename where it is located, for all source code files in the
current subdirectory.
----------------------------------------------------------------------------
FORMS
Invokes the BecknerFG() meta-function (forms generator).
----------------------------------------------------------------------------
BVUPDATE
Creates BVUPDATE.DBF/DBT, containing the structure records required by
the pUpdate() function to easily update client database structures.
Optionally may specify a wildcard on the command line, without
extension (which is always "DBF"). Use the [C]reate option to create
the file, then [Q]uit when done. Send the BVUPDATE.DB? files to your
clients along with your program update. At the beginning of your
program, include the statement:
pUpdate("bvUpdate")
----------------------------------------------------------------------------
ELIDUP
Eliminates duplicate records based on a specified expression.
----------------------------------------------------------------------------
STANDARD
Interactive program which creates a program for you, ie Applications
Generator - very simplistic, but can help you get started.
COMMANDS
Commands which are new or are enhanced are included in the header file
BECKNER.INC, and are described below:
WHILE LOOPING
Same as WHILE .y..
ENDWHILE
Same as END.
INT86 <nInterrupt> [AX <nAX>] [BX <nBX>] [CX <nCX>] [DX <nDX>] [AL
<nAL>] [AH <nAH>] [BL <nBL>] [BH <nBH>] [CL <nCL>] [CH <nCH>]
[DL <nDL>] [DH <nDH>]
Invokes the pInt86 function.
USE
CLOSE
Clear the relationships before closing the work area.
@ <nRow>, <nCol> GET <xVar> [PICTURE <cPic>] [VALID <bcValid>] [WHEN <bcWhen>]
[COLOR <cColor>] [MESSAGE <cMsg>] [POPUP <bPop>] [EXIT [WITH]
<cKey>] [DATESET] [IDLE <bIdle>] [MEMO [AT] <nMStartRow>,
<nMStartCol>, <nMEndRow>, <nMEndCol>]
Adds new clauses:
MESSAGE: same functionality as MESSAGE clause for @...PROMPT
command.
POPUP: allows a popup box.
EXIT WITH: allows special exit key.
DATESET: allows special date movement keys for this GET.
IDLE: allows background processing while in this GET.
MEMO AT: sets auto memo edit field during READ.
READ [IDLE <bIdle>] [TIME <nTime>]
Adds clauses:
IDLE: allow background processing during entire READ.
TIME: Times out after specified number of idle seconds.
DEFAULT <var1> TO <val1> [, <varN> TO <valN>]
Allows default values to be assigned to NIL values.
INITIALIZE <var1> TO <val1> [, <varN> TO <valN>]
Initializes undefined variables to specified values.
FORCETYPE <var1> TO <type1> [, <varN> TO <typeN>]
Forces the specified variable to be the specified type.
ADDRECORD [ALIAS <a>]
Invokes fAddRecord().
LOCK [ALIAS <a>]
Invokes fLockRec().
ENDFUNCTION
Used at physical end of function.
ENDPROCEDURE
Used at physical end of procedure.
SET SAVETIME TO [<nTime>]
Sets first parameter of pSetSaver() function.
SET SAVEBLOCK TO [<bToDo>]
Sets second parameter of pSetSaver() function.
BEGIN BLOCK
Defines beginning of logical block. EXIT will exit early and
LOOP will go to statement following BEGIN BLOCK.
END[ ]BLOCK
Defines end of logical block.
BROWSE [ALIAS <a>]
Invokes fBrowse() function.
WRITE [LINE [<cLine>]] TO <nFile>
Writes a line to the end of the file specified by the handle
<nFile>. If <cLine> is not specified, a null line is written.
META-FUNCTIONS
We define "meta-functions" as those functions which, in and of themselves, are
actually complete, or near-complete, applications, but which are useful as
functions of other programs. The meta-functions included herein are:
BecknerFG() Forms Generator
BecknerGL() General Ledger System
BecknerRL() * Old Report & Label Generator
BecknerV() VariData Template System
BecknerWP() Word Processor
pRepGen() New Report & Label Generator
The BecknerRL() function is maintained herein for compatibility with
BecknerLib I. pRepGen() replaces BecknerRL() in BecknerLib II.
FORMS GENERATOR
BecknerFG()
This meta-function is the Beckner Forms Generator, allowing the creation,
printing and maintenance of forms. If no parameters are passed, then the
interactive forms generator is brought up. If you simply want a form or
alignment check printed, then two parameters must be passed:
(cFormNo, nType)
cFormNo is the form code. When you add a form, you enter a 2 character form
code. To this is appended a 3-digit number to make the form code unique.
Where nType is 1 or 2, cFormNo is the 5-character form code matching an
existing form. Where nType is 3, cFormNo is a series of form codes appended
to each other with no intervening space. For example, if you had 2 forms to
print, and they were coded "BP001" and "BP002", you could issue the function:
BecknerFG("BP001BP002", 3)
If nType is 1, then the form is printed. If nType is 2, then an alignment
check is printed based on the form definition. If nType is 3, then a list of
forms is presented for the user to choose from; any or all of the forms may be
printed.
The utility program FORMS.PRG may be compiled/linked to create a stand-alone
forms generator. The compile link commands are:
CLIPPER FORMS -N-M RTLINK FILE FORMS LIB BECKNER
If using FORMS.EXE or BecknerFG() with no parameters, a screen will display
with the first form in the file displayed (if any). Each form has these
characteristics:
Form # The actual form code.
Where The filename or device where this form will print, default is
current SET PRINTER TO option.
Form Name The name or description of the form.
Prefix A 0 to 2 character field depicting the beginning characters of
every DBF/NTX name subsequently defined. If the form
is to be printed from a program, and the files are
already open, then this should be left blank.
Codes 2 fields defining the starting and ending printer codes to be
sent before and after the printing of this form. The
are in decimal format separated by slashes. For
example, to send an escape character followed by
Chr(20), you would enter "27/20".
DBF/NTX Up to 8 database files and indices may be defined, only
one index per database. This is only used in
interactive mode and should not be included for
non-interactive forms, that is, forms printed
exclusively from a program.
Length The number of lines on a physical page.
Single .True. if forms are fed one form at a time, ie manual-feed
forms.
Align .True. if an alignment check is printed in interactive mode.
Stagger/+ .False. in most cases. We had a form once where the print was
staggered between two consecutive forms to provide for
a standard printing size. We've only seen this once in
a decade. The + field should normally be 0. In our
one strange case, the two forms together had a form
length of 51, so we would specify a length of 25,
.true. to stagger, and 1 to +. Again, this is
extremely rare.
Micro Adj 4 fields to specify the start, stop and usage codes, along
with the number of times to execute the usage code,
primarily to use micro adjustments prior to printing
the form. For example, you may need to back a form up
1/4 of an inch. The start code is specified if the
line feed control merely sets a specified line feed,
instead of executes it. The stop code resets line
feeds to normal. The usage code is the actual
execution code. The multiplier is normally 1, and
specifies the number of times to execute the usage
code.
Memo tabs The number of spaces to change each TAB setting to when
printing memo fields.
Width The maximum width to print free-format memo fields.
Also associated with each forms, are the individual variable expressions which
define each field on the form. The expression characteristics are defined
below:
Description Your description of the expression.
Expression A valid clipper expression. When using the interactive
FORMS.EXE, most available functions from the
BECKNER.LIB are available to you as well.
Row/Col These are character fields. You may specify literal
numeric row/column positions, the normal way, or
complete expressions.
* The next four fields are currently undefined and should be
.False..
Max Rows The maximum rows to print. Valid for memo fields only.
Alt Col Allows memo fields to print from the current row/column
position until reaching, the maximum rows defined
above, then will continue printing beginning at the
defined row but using this alternate column. This
allows memos in 2 columns.
Prelim Expr An expression to be evaluated prior to printing this variable.
Usually used for record positioning.
Micro Adj Used for this individual variable the same as it was used for
the entire form.
Condition A WHILE condition to evaluate, so a recurring line item does
not have to be specifically defined. More on this in
the registered docs.
Note: In the documentation which you get upon registration, several examples
make quite a bit of the form creation/use process much clearer. Space
constraints limit this herein.
The forms generator has the following options:
Delete Deletes the current form definition.
Get Presents a list of form definitions, lets you choose one,
which becomes the currently displayed form definition.
Add Lets you create a new form.
Edit Lets you edit the current form definition.
Variables Presents a submenu, allowing you to:
Display Display a list of variable definitions.
Scan Scan the variable definitions, letting you
Add, Delete, Edit, +/next, -/prior,
Quit, Get & Browse.
Filters Set up filters/relationships for specified
files.
Conditions Allows interactive conditions, including
preliminary expressions, Variables,
Prompts, WHILE, NEXT & REST.
+/Next Get next forms definition.
-/Prior Get prior forms definition.
Filter Set the filter for scanning through form definitions.
Reports The following options are available:
A. Grid Prints a setup grid on the form to aid in
alignment.
B. Print Form Prints a form interactively.
C. List Prints a list of available form definitions.
D. Alignment Prints alignment check.
Maintenance The following options are available:
A. Row/Col Allows quick entering of row/col data.
B. Vars/DBF Imports all fields from a database file into
the current form.
C. Transform Lets you set the TRANSFORM function for a
series of variables existing at the
same column.
D. Mass Chg Lets you change all row and/or col definitions
using a single value or a ratio.
E. <not used>
F. <not used>
G. Duplicate Makes a new form identical to the current
form.
H. Expr Cnt Gives you a count of all variable definitions.
I. Fast New Quickly enter new descriptions/expressions.
J. Increment Create line item definitions from existing
line.
K. Chg # Change the current form #.
L. Fld Lst Presents a field list from any file.
Quit Quits the forms generator interactive mode.
VARIDATA TEMPLATE SYSTEM
The VariData Template system allows the user to define additional data
entry windows for additional items of information which may be unique to the
customer. This is a powerful window creation system. Calling the function
BecknerVEd() invokes the full-screen template management system. To create a
new template, use the function BecknerVEd(""). A 1 x 1 character window
appears in the center of the screen, and the options at the top of the screen
are:
Window
Press <alt-W> to access this option, which makes these options
available:
Expand Lets you use the arrow keys to expand the window.
Shrink Lets you use the arrow keys to shrink the window.
Insert Inserts a row or column at the current cursor
position.
Delete Deletes the current row or column.
Middle Centers the window.
Position Lets you use the arrow keys to move the window.
Borders Specify the type of border.
Clear BG Clears the background.
Lines/Boxes <not implemented>
Fields
Press <alt-F> to access this option, giving you these options:
Next Position cursor at next field.
Previous Position cursor at previous field.
Create Create a field at current cursor position.
Delete Delete the current field.
Abort
Press <alt-A> to access this option, which aborts all changes
since last saved.
Exit
Press <alt-E> to access this option, which saves the template
and exits the interactive mode, returning the new template to
the program.
To use the template, you must have a memo field available to contain the
variable data, and issue a command such as:
Field->mVariData := BecknerV(mVariData, mTemplate, IsColor())
This meta-function is covered in great detail with examples in the registered
docs.
REPORT & LABEL GENERATOR (NEW)
Issue the function call pRepGen() to use the Report & Label Generator
interactively. After the title display, the Print option is invoked if there
are any reports/labels defined. Press <escape> to abort the Print option.
Each report and label definition includes the following characteristics:
Title Description of the report/label.
Filename Filename without extension. The program will properly append
the extension of FRM or LBL, as needed.
Report? Answer .true. to create a report definition, .false. to create a label
definition.
Created Current date.
Printed Date last printed.
Special Index? .True. if you want a special index created before printing the
report/label.
Index Expr The special index expression.
Output device The output device or filename.
Start codes Sequence of codes to initialize the printer, which are decimal
codes separated by slashes.
End codes Sequence of codes to send to the printer after the end of the
print job.
Repeat Expr The report/label will print until this expression evaluates
.true.; Opposite of a WHILE clause.
Prim Vars The primary variable names, and their initial values,
separated by a slash. For multiple definitions,
separate each set of variable definitions with a
double-slash.
Prim Prompts The primary variable prompts, separated by double-slashes.
Heading An expression to be printed as the report heading.
Prelim Expr An expression to evaluate prior to printing the report/label.
Databases Accessed by <F2>. Must define at least one database file.
Indices Accessed by <F3>. May define a list of indices, delimited by
commas, for each file.
Filters Accessed by <F4>. May define a filter for each work area.
Relations Accessed by <F6>. May define multiple relationships per file.
Sequence Accessed by <F7>. Not used in the current implementation.
Reports have the following additional characteristics:
Page Hdr 4 lines of page headings.
Width The maximum width of the report.
Margins A left and right margin.
Lines The number of printed lines per page.
Double Sp? .True. to double space.
Plain Pg? .True. for plain page report.
Eject After? .True. to eject after the report completes printing.
Eject Before? .True. to eject a page before the report starts printing.
Grp Expr The primary group expression.
Grp Hdr The primary group header.
Summary? .True. to receive only a summary report.
After Grp? .True. to eject a page after each group prints.
SubGrp Expr The secondary group expression.
SubGrp Hdr The secondary group header.
Each line on a report has the following characteristics:
Width The column width.
Total? .True. if this is a total column.
Decimals Number of decimal positions, if applicable.
Contents The expression to evaluate for this column.
Header 4 fields to contain the column header.
Sequence Determines the order each column will print in.
Each label has the following characteristics:
Height Number of lines per label.
Width Number of characters per label line.
Margin Number of characters for the left margin.
Lines Btwn Number of lines between labels.
Spaces Btwn Number of spaces between labels.
Lbls across Number of labels in a row.
Comments Anything.
Exprs A line for each expression possible on the label.
There are 5 options associated with the Report & Label Generator:
Create Creates a new report/label definition record.
Modify Lets you modify an existing definition.
Delete Deletes a definition record.
Print Lets you print a report or label based on a definition.
Exit Leaves the report & label generator.
GENERAL LEDGER SYSTEM
You access the interactive General Ledger system with the function
BecknerGL(). If you have more than one set of books defined, then you must
choose which set you want to work with. Then, you choose what period you want
to work in, 1-13, and whether you are working with history records or not
(blank is current and "H" is history).
Each G/L account has these characteristics:
Account # A user-defined 1-10 digit account number.
Name A user-defined account name, up to 40 characters.
PTD Amount The period-to-date amount for the current period (13 periods
are maintained in both the current and history year).
YTD Amount The current year-to-date amount.
Type The account type, which may be: [A] Current Asset, [B] Fixed
Asset, [C] Other Asset, [D] Current Liability, [E]
Long-Term Note, [F] Equity, [G] Other Liability, [H]
Sales, [I] Cost of Sales, [J] Other Income, [K]
Operating Expense, [L] Tax Provision.
Notes A memo field for any notes about the account.
Further, each account has transactions. Each transaction line has the
following characteristics:
Description What the transaction is about.
Date Posting date.
Amount Transaction amount.
Reference A check #, if applicable, or any other valid reference.
Code No longer used.
The options available are:
Add Lets you add a new account into the current set of books.
Delete Deletes the current account.
Edit Lets you edit the account characteristics for the current
account.
Get Lets you get a specific account, making it the currently
displayed account.
Tr Disp Lets you display transactions for the current account based on
a start and end date, or browse the entire transaction
file based beginning with the current account's first
transaction.
Post Allows 3 methods of posting: [1] Double entry, [2] Journal or
[3] Check writer. Method [1] requires that 2 entries
are made to post properly and keep everything in
balance. Method [2] checks that you're in balance as
you are posting, and lets you abort an entire posting
session if needed. Method [3] lets you post and print
checks, posting them into a separate check register.
Reports These reports are available: [A] Daily Transactions, [B]
Chart of Accounts, [C] Trial Balance, [D] Balance
Sheet, [E] P & L (Income) Statement, [F] Supporting P &
L Schedules, [H] Year-to-Date Closeout, [I] Check
Register, [J] Print Current Account, [K] Print System
File, [L] Periodic Transactions, [M] Access to Forms
Generator and [N] Access to Report Generator.
Maintenance These suboptions are available: [A] Index G/L Files, [B]
System File Maintenance, [C] Revise Transaction Data
and [D] Unpost a Day's Work.
Quit Quits the BecknerGL() function.
+/Forward Get and display next account.
-/Backward Get and display prior account.
ARRAY FUNCTIONS
a1From2
(a2Dim, nElement)
Returns a single-dimensional array from a 2-dimensional array.
a2Dim is the 2- dimensional array, and nElement is the
dimension to extract.
aAppend
(aLines, cFile)
Appends the lines in the array aLines to the end of the file
cFile.
aArray2Char
(aWords, [cDelimiter])
Returns a string where the words in aWords have been
concatenated together, delimited by cDelimiter, which defaults
to <space>.
aAverage
(aNumbers, [nStart], [nCount])
Returns the average of an array of numbers, aNumbers, beginning
with element nStart, which defaults to 1, for nCount number of
elements, which defaults to the last element in the array.
aChar2Array
(cString, cDelimiter)
Returns an array of words from a sentence, cString, using the
delimiter cDelimiter.
aCount
(aAny, [cTypes], [nStart], [nCount], [bFor])
Counts the elements of an array, beginning with nStart, which
defaults to 1, for nCount number of elements, which defaults to
the last element in the array. If cTypes is specified, then it
contains the valid types to count. bFor can further restrict
the counting based on a FOR condition, which must return a
logical value; if .true., then it is counted.
aDelElement
(aAny, nElement)
Deletes the nElement element from the array aAny, resizing the
array to physically one less than before the deletion.
aEmpty
(aArray)
Returns .true. if aArray contains no elements or all elements
are NIL.
aFromFile
(cFile)
Returns an array where each element contains one line from the
file, cFile.
aFromRec
([aAny])
Returns an array where each element contains the content of
each field in a record.
aLine2Array
(cLine)
Returns an array containing the words from a line, cLine.
aList
(nStartRow, nStartCol, nEndRow, nEndCol, aAny, [cTitle])
Displays the elements of aAny in a window defined by nStartRow,
nStartCol to nEndRow, nEndCol, with an optional title, cTitle.
aLongest
(aAny)
Returns the length of the longest string element found in aAny.
aMarkList
(nStartRow, nStartCol, nEndRow, nEndCol, aList)
Returns an array of the elements marked in aList. Elements are
marked/demarked by pressing <space> on the current item.
aMatch
(aAny, cType, [nStart], [nCount])
Returns the first element with the same type as specified in
cType, starting at element nStart, which defaults to 1, for
nCount number of elements, which defaults to the last element
in the array.
aMatchNum
(aAny, cType, [nStart], [nCount])
Returns the number of the first element with the same type as
specified in cType, starting at element nStart, which defaults
to 1, for nCount number of elements, which defaults to the
last element in the array.
aMax
(aAny, [cTypes], [nStart], [nCount])
Returns the maximum value found in aAny. Only checks types
which match cType, which defaults to "N", starting at element
nStart, which defaults to 1, for nCount number of elements,
which defaults to the last element in the array.
aMaxElement
(aAny, [cTypes], [nStart], [nCount])
Returns the element number of the maximum value found in aAny.
Only checks types which match cType, which defaults to "N",
starting at element nStart, which defaults to 1, for nCount
number of elements, which defaults to the last element in the
array.
aMin
(aAny, [cTypes], [nStart], [nCount])
Returns the minimum value found in aAny. Only checks types
which match cType, which defaults to "N", starting at element
nStart, which defaults to 1, for nCount number of elements,
which defaults to the last element in the array.
aMinElement
(aAny, [cTypes], [nStart], [nCount])
Returns the element number of the minimum value found in aAny.
Only checks types which match cType, which defaults to "N",
starting at element nStart, which defaults to 1, for nCount
number of elements, which defaults to the last element in the
array.
aPack
(aAny, [lResize])
Removes all NIL elements from an array, aAny. If lResize, then
the size of aAny is adjusted to exclude all NIL elements. If
not lResize, which is the default, then all NIL elements are
moved to the end of the array.
aPickList
([nStartRow, nStartCol, nEndRow, nEndCol,] aList, [nStart],
[cTitle])
Displays an aChoice list with optional title. The default
window coordinates are 3, 38 to 22, 79.
aPrint
(aAny, [nStart], [nCount], [cDevice], [lFormFeed], [nLPP])
Prints the contents of an array, each element treated as a
line, starting with nStart, which defaults to 1, for nCount
elements, which defaults to the end of the array. The default
device is "PRN", nLPP (lines per logical page) is 58, and
lFormFeed is .true. (issues a form feed at the end of the print
job).
aRead
([aAny,] cFile, [nStartLine], [nNumLines])
Returns an array, aAny, of the lines in cFile beginning with
line nStartLine, which defaults to 1, for nNumLines number of
lines, which defaults to the end of file.
aSum
(aAny, [nStart], [nCount])
Returns the total of all numeric elements in aAny, beginning
with nStart, which defaults to 1, for nCount number of
elements, which defaults to the last element in the array.
aToRec
(aData)
Replaces the data in the current record with the data in aData.
aTotalLen
(aAny)
Returns the total length of all string elements in aAny.
aWrite
(aLines, cFile)
Creates a text file, cFile, with each element of aLines being a
line in the file. If the file already existed, then the
previous data in the file is destroyed.
BINARY FUNCTIONS
bArray2Byte
(aBit)
Converts an array of 8 or less logical elements into a single
byte.
bBitIf
(cByte, nBitNumber, lOn)
Sets or resets bit number nBitNumber in cByte, based on the
expression lOn, where .true. sets the bit and .false. resets
the bit.
bBitReset
(cByte, nBitNumber)
Resets bit number nBitNumber in cByte.
bBitSet
(cByte, nBitNumber)
Sets bit number nBitNumber in cByte.
bBitTest
(cByte, nBitNumber)
Returns .true. if bit number nBitNumber in cByte is on,
otherwise returns .false..
bByte2Array
(cByte)
Returns an 8-element array of logical values depicting the
on-off settings of individual bits in cByte.
bInt2Num
(cIntWord, [lSigned])
Returns an integer value. If lSigned, then the value will be
in the range -32768 to 32767. If not lSigned, the default, the
value will be in the range 0 to 65535.
bLong2Num
(cLongWord, [lSigned])
Returns a long integer value. Default lSigned is .false.
bResetBit
(cnByte, nBit)
Resets bit number nBit in cnByte, which may be character or
numeric.
bRPadNull
(cBytes, nLen)
Pads cBytes with null characters, returning a string with the
length nLen.
bSetBit
(cnByte, nBit)
Sets bit number nBit in cnByte, which may be character or
numeric.
bTestBit
(cnByte, nBit)
Tests bit number nBit in cnByte, which may be character or
numeric. If the bit is on, .true. is returned.
iBase
<internal function>
ASSEMBLY SUPPORT FUNCTIONS
NOTE: These functions are internal, and are listed in case of a name
conflict with other libraries. You should not use these functions
directly, as they are likely to change in future versions.
afBytes
<internal>.
afChDir
(cPath)
<internal>. Changes the current directory, returning .true.
if successful.
afClusters
<internal>.
afMkDir
(cPath)
<internal>. Makes the specified path, if possible, returns
.true. if successful.
afRmDir
(cPath)
<internal>. Removes the specified directory, returning .true.
if successful.
afSectors
<internal>.
amBStat
()
<internal>. Returns the number of buttons on the mouse device.
amDown1
<internal>.
amDown2
<internal>.
amDown3
<internal>.
amInit
()
<internal>. Returns number of buttons after initializing mouse
driver.
amLimits
(nStartRow, nStartCol, nEndRow, nEndCol)
<internal>. Sets screen area where mouse cursor may reside.
amOff
()
<internal>. Turns off mouse cursor.
amOn
()
<internal>. Turns on mouse cursor.
amSetXY
(nX, nY)
<internal>. Sets X-Y coordinate mouse cursor position.
amUp1
<internal>.
amUp2
<internal>.
amUp3
<internal>.
amXPos
()
<internal>. Returns the X-coordinate mouse cursor position.
amYPos
()
<internal>. Returns the Y-coordinate mouse cursor position.
apAssign
()
<internal>. Returns .true. if DOS ASSIGN is loaded.
apDriver
()
<internal>. Returns .true. if DRIVER.SYS loaded.
apInstall
()
Returns .true. if PRINT.COM is installed.
apInt86
(nInt, nAX, nBX, nCX, nDX)
<internal>. Sets the register values, calls the interrupt
nInt, then returns a string of word values corresponding to the
registers.
apNetBios
()
<internal>. Returns .true. if NetBios is available.
apPark
()
<internal>. Parks disk drives.
apPeekLpt
(nPort)
<internal>. Returns address of the specified line printer
port.
apPokeLpt
(nPort, nAddress)
<internal>. Sets the address of the specified line printer
port.
apShare
()
<internal>. Returns .true. if SHARE.EXE is loaded.
apSetDate
<internal>.
apSetTime
<internal>.
apHold
()
<internal>. Requires PRINT.COM preloaded. Returns .true. if
successful at pausing the current print job.
apRelease
()
<internal>. Requires PRINT.COM preloaded. Releases a
previously held print job.
apRemove
(cFile)
<internal>. Requires PRINT.COM preloaded. Removes cFile from
the print queue, returns .true. if successful.
apSubmit
(nPriority, cFile)
<internal>. Requires PRINT.COM preloaded. Submits cFile to
the print queue with nPriority priority.
apTestBit
(nByte, nBit)
<internal>. Returns .true. if specified bit is set.
avScreenMo
<internal>.
DATE FUNCTIONS
dApprox
(cFreeFormat, [aHelpScreen], [cDelims], [aValid])
Returns an array containing 2 dates, the start and end date
which represents a character free-format range of dates.
aHelpScreen defaults to: {"Please enter a valid date in", "one
of the following fields:", "", "mm/dd/yyyy mm/yyyy", "", "Or
enter the year with your", "choice below:", "", "1st Quarter
January", "2nd Quarter February", "3rd Quarter March",
"4th Quarter April", "Winter May", "Spring June",
"Summer July", "Fall August", " September", " October", "
November", " December"}. cDelims defaults to ", " and aValid
defaults to: {{3, "1ST", "Q1"}, {3, "2ND", "Q2"}, {3, "3RD",
"Q3"}, {3, "4TH", "Q4"}, {3, "WINTER", "S1"}, {3, "AUTUMN",
"S2"}, {4, "FALL", "S2"}, {3, "SPRING", "S3"}, {3, "SUMMER",
"S4"}, {3, "JANUARY", "M01"}, {3, "FEBRUARY", "M02"}, {3,
"MARCH", "M03"}, {3, "APRIL", "M04"}, {3, "MAY", "M05"}, {3,
"JUNE", "M06"}, {3, "JULY", "M07"}, {3, "AUGUST", "M08"}, {3,
"SEPTEMBER", "M09"}, {3, "OCTOBER", "M10"}, {3, "NOVEMBER",
"M11"}, {3, "DECEMBER", "M12"}}.
dBegMonth
([dAny])
Returns the first date in any month. Default dAny is Date().
dBegQuarter
(dAny)
Returns the first date in any quarter.
dBegYear
([dAny])
Returns the first date in any year. Default dAny is Date().
dDayOfYear
([dAny])
Returns the number of days since the beginning of the year.
Default dAny is Date().
dDay2Str
(nDay)
Returns a character day, ie "1st", "2nd", etc.
dDays30
(dStart, dEnd)
Returns the number of days between dStart and dEnd assuming a
360-day year, 30-day month. This is used in many financial
calculations.
dDaysGoneM
([dAny])
Returns the number of days gone in the month which dAny is in.
Default dAny is Date().
dDaysGoneQ
([dAny])
Returns the number of days gone in the quarter which dAny is
in. Default dAny is Date().
dDaysInMonth
(dnMonth, [nYear])
Returns the number of days in the month. May specify a
complete date or a month and year. If the latter, the default
for year is the current year.
dDaysLeftM
([dAny])
Returns the number of days left in the month which dAny is in.
Default dAny is Date().
dDaysLeftQ
([dAny])
Returns the number of days left in the quarter which dAny is
in. Default dAny is Date().
dDec*
([cIgnored], [nIgnored], cVariable)
Used in SET KEY K_MINUS TO dDec, to allow decrementing a date
field in a READ. Only useable with public or private
variables.
dEmpty
()
Returns an empty date.
dEndMonth
([dAny])
Returns the last date in any month. Default dAny is Date().
dEndQuarter
(dAny)
Returns the last date in any quarter.
dEndYear
([dAny])
Returns the last date in any year. Default dAny is Date().
dInc*
([cIgnored], [nIgnored], cVariable)
Used in SET KEY K_PLUS TO dInc, to allow incrementing a date
field in a READ. Only useable with public or private
variables.
dInRange
(dTest, dFirst, dLast, [lInclusive])
Returns .true. if dTest is within the range defined by dFirst
and dLast. If lInclusive is .true. (the default), then this
function will return .true. if dTest is the same date as either
dFirst or dLast.
dLeapYear
([dStart], [dEnd])
Returns .true. if a leap day is between the 2 dates. If the
second date is not specified, then returns .true. if dStart is
in the same year as a leap day. Default dStart is Date().
dMMYY
(dAny)
Returns the date in "MM/YY" character format.
dMMYY2Date
(nMM, nYY)
Creates a date from the supplied month and year.
dNumMonths
(dStart, dEnd)
Returns the number of months between two dates.
dPicture
(dAny)
Returns a character string to use as a picture template.
Depending on value of dAny, the return value will be " <none> "
or "99/99/99".
dQuarter
(dAny)
Returns the quarter number which the date is within.
dRestore
(cCompressed)
Decompresses a compressed date string. Compressed dates take 3
bytes instead of 8.
dSame
([dAny], [nMonths])
Returns a date which is a number of months before or after the
current or specified date. Default nMonths is 1, dAny is
Date().
dSave
(d2Save)
Compresses a date. Compressed dates take 3 bytes instead of 8.
dSetCentury*
([lNewSetting])
Returns the current SET CENTURY setting, and optionally sets
it.
dSetDate*
(cdDate)
Sets the system date.
dSetSysDate
(dAny)
Sets the system date.
dStrFormat
(cDate)
Returns .true. if cDate is a valid character date.
dWeekNum
([dAny])
Returns the week number of the year in which dAny is. Default
dAny is Date().
dWord
(dAny)
Returns the worded format of the date.
dYear2
(dAny)
Returns a 2-digit number representing the year.
ENVIRONMENT FUNCTIONS
eFlush*
()
Flushes the buffers in the all work area.
eRestore
()
Restores the Clipper environment.
eSave
()
Saves the Clipper environment.
eSetBuffers
(nValue)
Sets the Buffers value in CONFIG.SYS. Requires re-boot to
activate.
eSetClipper
(cSettings)
Establishes a SET CLIPPER statement in AUTOEXEC.BAT with the
settings of cSettings.
eSetFiles
(nValue)
Sets the Files value in CONFIG.SYS. Requires re-boot to
activate.
eVariable
(cSetVar, cNewValue)
Sets the DOS environment variable cSetVar to cNewValue.
iEnvironment
<internal>
FILE FUNCTIONS
fAddLine
(cnFile, cLine)
Adds a new line, cLine, to the end of an existing text file.
cnFile may be the filename or the handle of an already open
file.
fAddRecord
([nSeconds])
Appends a blank record to the database, locking it, if possible
and returns .true. if successful. nSeconds is the number of
seconds to try before timing out, the default being 3600 (1
hour). There are 3/10's of a second between attempts.
fAverage
(cFieldList)
Returns an array of averages corresponding directly to the
number of field names specified in cFieldList, where each field
name is separated by a slash "/".
fBlankRec
()
Blanks the current record.
fBrowse
([nTopRow], [nTopCol], [nBottomRow], [nBottomCol], [aColumnInfo],
[nFreeze], [cF2Expr], [bSeek], [cColorTable], [lDisplayOnly],
[lSuppressRec], [cSubAlias])
Browses the current data file. Note that record locks are
handled internally when editing data. Also, certain special
keys are defined: <alt-C> Cut current column, <alt-I> insert
last cut column before current column, <alt-M> modify browse
window aspects, <alt-G> go to a specific column by way of pop-up
column list, <alt-L> mark a list of columns to delete. Default
values are (2, 2, MaxRow()-2, MaxCol()-2, {all field data},
iif(lSupressRec, 0, 1), , , iif(IsColor(), "N/W, N/BG, B/W,
B/BG, B/W, B/BG, R/W, B/R", "N/W, W/N, N/W, W/N, N/W, W/N,
N+/W, W*/N", .n., .n.)
fBytesNS
([cDrive])
Returns the number of bytes per sector from the specified or
current drive.
fChangeKey
("cField/cOldKey/cNewKey")
Changes the value of all records where field cField contains
the value of &cOldKey to the new value of &cNewKey.
fChDir
(cPath)
Changes the current directory to cPath. Same as DOS CHDIR.
fClustersND
([cDrive])
Returns the number of clusters per drive on the specified or
current drive.
fCompute
(cFile|aComputor, [bFor], [bWhile], [nNext], [nRec], [lRest])
Computes combinations of sum and average in a single pass. For
example, to compute both the sum and average of the field
BALANCE, aComputor would be {{"S", "Balance"}, {"A", "Balance",
{||Balance>0}}}. For lots of calculations, it is simpler to
maintain the list in a file, cFile.
fDriveReady
(cDrive)
Returns whether the specified drive is ready or not. cDrive
may be specified with or without the colon, eg "C" and "C:" are
both acceptable.
fCreateRpt
(cFilename, aReport)
Creates a BecknerVision Enhanced Report.
fEmpty
()
Returns .true. if the current record is blank, that is, all
fields are empty.
fExtNew
(cFilename, cExtension)
Returns cFilename with the extension cExtension.
fFixDbf
(cFile, [cNewFile])
Fixes bad records, invalid sectors and other nasty stuff in the
database file cFile, creating the new file cNewFile, which
defaults to "$Beckner.dbf".
fIsDir
(cDir)
Returns .true. if the specified directory exists. Drive
specification is optionally, and defaults to current drive.
fIsLocked
()
Returns .true. if the current record currently has a lock on
it.
fList
()
Lists all field data to the current output device in the file.
Basically, a data dump.
fLockRec
([nSeconds])
Locks the current record, if possible, returning .true. if
successful. nSeconds is the number of seconds to try before
timing out, the default being 3600 (1 hour). There are 3/10's
of a second between attempts.
fNumLines
(nFile)
Returns the number of lines in a text file. nFile is the
handle of a previously opened file.
fReadFrm
(cFilename)
Returns an array containing an FRM definition.
fRestoreRecord
()
Restore the contents of the previously saved record contents
into the current record.
fSetFilter
()
Prompts for, then sets, a filter expression. You can use the
<F2> key to pop up a field list.
fSumRec
(cFieldList)
Returns an array corresponding to the sum of the field name
list in cFieldList, in which fields are separated by "/". For
example, to sum 2 balance fields, named BALANCE1 and BALANCE2,
you would execute the function fSumRec("Balance1/Balance2"),
for which the return value would be a 2-element array
containing the sum of each field.
fUnique
([cTargetDir], [cExtension])
Returns a unique filename to be located in the directory
cTargetDir, default being the current directory, with the
extension cExtension, default being "DBF".
fZip2City
(cZipCode)
Returns a 2-element array containing the city and state which
correspond to the zip code passed.
MATH & FINANCIAL FUNCTIONS
mAmortPmt
(nStartBal, nAPR, nNumPmts)
Returns the payment amount based on the starting balance
nStartBal, the annual percentage rate of nAPR and the number of
payments nNumPmts.
mAmortSched
(nStartBal, nAPR, nNumPmts, [dStart], [lUse365])
Returns an array containing an amortization schedule. Elements
of each line item are: [1] payment date, [2] payment amount,
[3] principal, [4] interest, [5] balance. dStart defaults to
the first day of the following month. lUse365 defaults to
.false., whereas a 360-day year is used.
mAPR
(nAmtFin, nPayment, nNumPmts)
Returns the APR (annual percentage rate) knowing the amount
financed nAmtFin, the payment amount nPayment and the number of
payments nNumPmts.
mBase2Val
(cNumber, [nBase], [cSpace])
Converts any number in any base, from 2 to 38, to a decimal
number. Default nBase is 16. Some base numbers use a space
character, usually <space>, to separate groups of numbers.
Binary is a good example of this. The default cSpace is null.
mCents
(nAmount, [nDecimals])
Returns the cents portion of a dollar amount, returning the
specified number of decimal positions nDecimals, the default
being 2.
mDigit1Word
(nDigit)
Returns a word to represent the digit, a value in the range 0
to 9.
mDigitWord
(nNumber)
Converts nNumber to a worded representation.
mDivide
(nDividend, nDivisor)
Returns the result of nDividend/nDivisor or 0 if nDivisor=0.
Eliminates the divide by zero error.
mDollarWord
(nAmount)
Returns a string representation of the dollar amount, nAmount.
Used in check writing procedures.
mEvenNumber
(nAny)
Returns .true. if nAny is an even number.
mHex*
(nAny, [nPlaces])
Returns a string representing the hexadecimal value of nAny, to
a maximum number of digits nPlaces, the default being 2.
mOddNumber
(nAny)
Returns .true. if nAny is an odd number.
mRandom
(nBase)
Returns a pseudo-random number in the range 1 to nBase, where
nBase must be greater than 1.
mSplit2Sngl
(nAmtFin, nNumPmts, dAcquired, nSplitAmt, nBeforeRate, nAfterRate,
[lGetPmt], [nPrecision])
Returns either the payment amount or the APR, of a split-rate
percentage. A Split-rate is one where one percentage applies
to a certain amount of principal, then another APR applies for
amounts greater than the split amount. If lGetPmt, the
payment amount is returned. If not lGetPmt, the default, then
the single APR is returned. Nprecision specifies the decimal
precision to use, the default being 7 decimal places.
MOUSE FUNCTIONS
iMouse
<internal>
mAvailable
()
Returns .true. if a mouse device is available.
mButtons
()
Returns the number of buttons on the mouse device.
mDownC
()
Returns an array with 3 elements, which are [1] number of times
the center button has been pressed since the last call, [2] the
row where last pressed and [3] the column where last pressed.
mDownL
()
Returns an array with 3 elements, which are [1] number of times
the left button has been pressed since the last call, [2] the
row where last pressed and [3] the column where last pressed.
mDownR
()
Returns an array with 3 elements, which are [1] number of times
the right button has been pressed since the last call, [2] the
row where last pressed and [3] the column where last pressed.
mInit
()
Initializes the mouse driver. This function must be called
prior to using any of the mouse functions.
mLimits
(nStartRow, nStartCol, nEndRow, nEndCol)
Sets the screen coordinates wherein the mouse cursor may
reside.
mOff
()
Turns off the mouse cursor.
mOn
()
Turns on the mouse cursor.
mPos
()
Returns an array where element [1] is the current row, and [2]
is the current column, where the mouse cursor is located.
mSetPos
(nRow, nCol)
Specifies the coordinates to place the mouse cursor on.
mStatusC
()
Returns .true. if the center button is currently depressed.
mStatusL
()
Returns .true. if the left button is currently depressed.
mStatusR
()
Returns .true. if the right button is currently depressed.
mUpC
()
Returns an array with 3 elements, which are [1] number of times
the center button has been released since the last call, [2]
the row where last released and [3] the column where last
released.
mUpL
()
Returns an array with 3 elements, which are [1] number of times
the left button has been released since the last call, [2] the
row where last released and [3] the column where last released.
mUpR
()
Returns an array with 3 elements, which are [1] number of times
the right button has been released since the last call, [2] the
row where last released and [3] the column where last released.
mWait
()
Similar to Inkey(), but will wait until either a key depression
or a mouse button has been pressed.
mWithin
(nStartRow, nStartCol, nEndRow, nEndCol)
Returns .true. if the mouse cursor is currently within the
specified screen coordinates.
mXPos
()
Returns the X-coordinate position of the mouse cursor.
mYPos
()
Returns the Y-coordinate position of the mouse cursor.
OBJECT-ORIENTED FUNCTIONS
oRefresh
(aGetList)
Refreshes all GET objects within the array aGetList,
redisplaying each.
PRINTER & SPOOLER FUNCTIONS
iRoute
<internal>
pAddrLPT
()
Returns a 3-dimensional array giving the addresses of LPT1,
LPT2 and LPT3, respectively.
pCurrent
()
Requires PRINT.COM to be preloaded. Returns the filename of
the currently printing file.
pDespool
()
Begins despooling a spooled/network print file.
pFileList
([cFile], [aFields], [bFor], [bWhile], [nNext], [nRecord], [lRest])
Prints data from a file. cFile defaults to the current alias
(but must be a filename), aFields defaults to the record number
plus all fields. bFor, bWhile, nNext, nRecord and lRest
correspond to FOR, WHILE, NEXT, RECORD and REST clauses,
respectively.
pHold
()
Requires PRINT.COM to be preloaded. Temporarily halts print
despooling.
pInstalled
()
Returns .true. if PRINT.COM is installed.
pl10CPI
()
Requires Hewlett Packard compatible laser printer. Sets 10 CPI
(characters per inch).
pl12CPI
()
Requires Hewlett Packard compatible laser printer. Sets 12 CPI
(characters per inch).
pl17CPI
()
Requires Hewlett Packard compatible laser printer. Sets 17 CPI
(characters per inch).
pl6LPI
()
Requires Hewlett Packard compatible laser printer. Sets 6 LPI
(lines per inch).
pl8LPI
()
Requires Hewlett Packard compatible laser printer. Sets 8LPI
(lines per inch).
plCopies
(nCopies)
Requires Hewlett Packard compatible laser printer. Sets the
number of copies to make for the next printout.
plPageLength
([cnLength], [nLPI])
Requires Hewlett Packard compatible laser printer. Sets the
page length based on number of lines per page cnLength and
lines per inch nLPI. Defaults to 66, 6. cnLength may be a
value of 0, 66, 84, 63, 70 or 60 at 6 LPI, or 0, 88, 112, 84,
93 or 80 at 8LPI, or may be the capitalized letter in these
words: "Default", "Letter", "leGal", "Executive", "A4" or
"B5".
plReset
()
Requires Hewlett Packard compatible laser printer. Resets
printer defaults.
plSetHMI
([nHMI])
Requires Hewlett Packard compatible laser printer. Sets the
characters per inch to nHMI, which defaults to 12.
plSetVMI
([nVMI])
Requires Hewlett Packard compatible laser printer. Sets the
lines per inch to nVMI, which defaults to 8.
plSource
([cSource])
Requires Hewlett Packard compatible laser printer. Sets the
paper source, which may be the capitalized letter in one of
these phrases: "Current source", "Upper tray", "Manual feed" or
"manual Envelope", and defaults to "C".
plUnderline
([lOn])
Requires Hewlett Packard compatible laser printer. Turns on or
off underlined print, depending on the value of lOn, which
defaults to .true..
pPrinter
()
Returns .true. if the printer is available. If not, a list of
possible cures is displayed, and a wait state is invoked.
Pressing <escape> or correcting the problem will halt the wait
state, returning .true. if the problem was corrected or
.false. if <escape> was pressed.
pRelease
()
Requires PRINT.COM to be preloaded. Restarts despooling
following a pHold() function was issued.
pRemove
(cFile)
Requires PRINT.COM to be preloaded. Removes the specified
file, cFile, from the print queue.
pRoute
(cFile)
Routes subsequent printing to the file or device cFile. Use
pUnRoute() to disable routing.
pSendCodes
(cCodes)
Sends the specified codes to the printer. cCodes is a list of
decimal codes separated by a slash.
pSetLPT
(nPort, [nAddress])
Returns the current address of the specified line printer port
(1, 2 or 3), and, optionally, sets a new address.
pSubmit
(cFile, [nPriority])
Requires PRINT.COM to be preloaded. Submits cFile to the print
queue, with the specified priority, which defaults to 0.
pSwapLPT
(nPort1, nPort2)
Swaps the addresses of the specified line printer ports, which
may be 1, 2 or 3.
pTab
(nTab, x2Print)
Prints the expression, x2Print, at the tab position nTab.
Printing must be enabled.
pUnRoute
()
Restores printer routing to what it was prior to the last
pRoute() function call.
PROGRAMMING & MISCELLANEOUS FUNCTIONS
iCount
(nOption)
Normally <internal>. Sets up a static variable as a counter.
If nOption is 0, then the static variable's value is
initialized to 0, returning the value of the counter prior to
initialization. If nOption is 1, the default, then the counter
is incremented and the new counter value is returned.
iReadIdle
<internal>
iSyntax
<internal>
pAbort
()
Returns .true. unless <escape> is pressed. Use in WHILE
clauses to allow <escape> to be an abort key.
pAltC*
()
Sets <alt-C> to ask the user if they really want to quit, then
saving the screen to a file "altc.txt" before clearing the
screen and quitting.
pAnalyze
(xData1, cRel, xData2)
Returns the result of the evaluation of xData1 combined with
the evaluation of xData2 using the operation cRel.
pAnyTouch*
()
Same as Inkey(0).
pBeep
()
Makes a beep sound.
pBegin*
()
Logs the current date and time to a file called "_beckner.trk",
in compressed format. Returns .true. if the program last
issued a pEnd() before this pBegin(). Primarily used to see if
a program ended normally.
pCrashCheck
([lStart], [cNotes], [lDelIndices])
The newer method of checking to see if a program ended
abnormally. Maintains a file with a record for each terminal,
if networked, to see that they ended their programs normally.
Uses the same "errorlog.txt" used by the error handler. lStart
should be .true., the default, when first encountered in a
program, and must be .false. when ending a program. cNotes is
usually an indication of where you were in the program, for
easier debugging. If lDelIndices, the default, then all
indices will be deleted prior to quitting the program. A
notice will be given to warn the user of the situation. If not
lDelIndices, then the user will be prompted to reindex or
ignore the condition.
pCtrlW
()
Stuffs a <ctrl-W> into the keyboard buffer.
pDemo
([dExpires], [nMaxUse], [aFileMax], [acMessage])
Sets up the current program as a demo program, based on one or
more criteria. dExpires is a date of expiration, nMaxUse is
the maximum number of times the program can be used and
aFileMax sets a maximum number of records in one or more files
in the format {{cFile, nMax}}. acMessage is an optional
message possibly letting the user know the demo nature of the
program.
pDisplayRec
([nRow], [nCol])
Displays the current record number in the format "99,999,999"
at the specified screen coordinates nRow, nCol, which default
to MaxRow(), 0, respectively.
pDosCmd*
(cCommand, [cParm])
Issues a RUN command appending cParm, if specified, to
cCommand.
pEnd*
()
Logs the end of the program. A pBegin() functions must have
previously been called.
pError*
([nErrorCode])
Sets or returns the last BecknerVision error code. These are
not used by most functions and are obsolete.
pErrorMsg*
(cMsg, lQuit)
Displays a message cMsg, and optionally, quits.
pErrorSys
([cSystem])
Replaces Clipper's error handler with a more complete one.
Maintains a log of errors in "errorlog.txt". Should be first
thing used in a program.
pEvaluate
(cExprList, [cDelimiter])
Evaluates a series of expression, each delimited by cDelimiter,
which defaults to "//".
pHelp
(cProcedure, nLine, cVar)
Usually assigned to a key, ie SET KEY K_F1 TO pHelp, to allow
for context-sensitive help. Automatically creates a help
record in a file called "help.dbf" if one doesn't exist.
Fully-interactive.
pInSet
(xExpr, cExprSet, [cDelimiter])
Evaluates xExpr, then returns .true. if the result is found in
the set cExprSet, delimited by cDelimiter, which defaults to
",".
pInt86
(nInt, nAX, nBX, nCX, nDX, nAH, nAL, nBH, nBL, nCH, nCL, nDH, nDL)
Sets the registers AX, BX, CX and DX based on the supplied
parameters, then issues the interrupt nInt, returning an array
containing the registers {AX, BX, CX, DX}.
pKeyClear
()
Clears all SET KEY action block from all keys.
pLineChk
(cFile)
Prints the contents of the program source file cFile, verifying
all levels of quote marks.
pLoopEval
(b2Eval, [nCount], [nStart], [nStep])
A FOR...NEXT loop in function form, so that this sequence of
commands is executed: FOR nCtr := nStart TO nCount STEP nStep;
Eval(b2Eval, nCtr); NEXT Default values are 1 for nCount,
nStart and nStep.
pMenu
()
An interactive menu system for DOS, creating and executing
batch files to execute menu options.
pOnDo
(nOption, aProcs)
Emulates BASIC's ON...GOSUB command. aProcs contains the
procedures to execute, nOption specifies which one to execute.
Note that STATIC PROCEDURES/FUNCTIONS cannot be used here.
pQuit
()
Turns off color, clears the screen and quits the program.
pRandom*
(nMax)
Same as mRandom().
pSetSaver
([nTime], [bTimer])
Sets values for the SET SAVETIME, SET SAVEBLOCK and READ
commands. nTime is the time before the screen saver is
invoked, in seconds. Specify 0 to disable the screen saver.
bTimer is the code block to execute when the idle time exceeds
nTime. A default function is provided internally simply
displays the message "-press any key-" at random locations on
the screen.
pSetType
(bGetSet, cNewType)
Evaluates bGetSet, then changes the type of the return value to
cNewType, then re- evaluates bGetSet, passing the block the
altered original return value.
pSoundError
()
Makes an error sound.
pTestBit*
Same as bTestBit, except it requires the first parameter to be
numeric only.
pTSR
([nKey], [cKey], [cExe], [cPath], [nMemory], [lEMS], lXMS])
Requires Dr Switch-ASE Library. Sets up a TSR hot-key, and
invokes the hot-key program. nKey is the numeric key
expression, which defaults to K_ALT_F1. cKey is the character
representation of the hot key, which defaults to "{alt}{F1}".
cExe is the program to invoke. Passing a null string, the
default, causes a COMMAND.COM to be invoked. cPath is the path
where cExe is to be found, which defaults to "C:\". nMemory is
the total conventional memory to make available, which defaults
to 640. If lEMS , the default, then EMS memory is made
available. If lXMS, the default, then XMS memory is made
available.
pUpdate
(cFile)
cFile is a structure file, and contains file definitions for
other database files. Using the data in the structure file,
all matching files are verified for integrity. If the file is
different in the structure file, then it is updated,
maintaining all data integrity. New files are created as
needed.
pVal2Word*
(nInt)
Returns a word value.
pVarMake
(cVar, xInitialValue)
Creates a public variable named cVar, with an initial value of
xInitialValue.
pVarRelease
(cVar)
Release a public or private variable named cVar.
pWord2Val*
(cWord)
Returns an integer value from cWord.
RECORD POSITIONING FUNCTIONS
rAbsRecord
(cAlias, cSeek, cWhile, nCount)
Positions the record pointer in the work area cAlias after
issuing a SEEK command for the expression cSeek, WHILE cWhile
is evaluated .true. or FOR nCount times, whichever becomes
.false. first.
rDuplicate
([nStart], [nEnd])
Duplicates a series of records, copying the new records to the
end of the current file. If no parameters are specified, then
only the current record is duplicated. No indices may be
active if parameters are specified, or the result will be
improper. If only nStart is specified, then records are
duplicated from the current record to record # nStart. If both
parameters are specified, then records from # nStart to # nEnd
will be duplicated. Upon completion, the record pointer will
be at the first duplicated record.
rFullGet
([cAlias], [cGetVar])
An interactive function which lets you get a specified record
in the work are cALias, which defaults to the current work
area.
rFullLocate
()
An interactive search feature to get a record.
rGoBottom*
()
Same as dbGoBottom().
rGoRecord*
(nRecord)
Similar to dbGoto(). If the specified record number is
invalid, then functions the same as dbGoBottom().
rGoTop*
()
Same as dbGoTop().
rLocate
(cAlias, cLocator, cWhile)
In work area cAlias, a record is located which matches the
expression cLocator while the condition cWhile is .true.. If
not found, then the record pointer is positioned to the last
record in the file.
rNextRec
([cAlias], [cTest])
Skips to the next record in work area cAlias, which defaults to
the current work area, then evaluates cTest, if specified. If
the evaluation returns .false., then the record pointer is
positioned to the last record in the file.
rPickList*
(cField, [cFilter], [cWhile], [nStart], [lAllowNew], [nMaxRecs],
[nFirstRec], [nIndex], [cTitle], [cPrompt])
Superceded by vPopWhen().
rPriorRec
([cAlias], [cTest])
Skips to the previous record in work area cAlias, which
defaults to the current work area, then evaluates cTest, if
specified. If the evaluation returns .false., then the record
pointer is positioned to the last record in the file.
rSeek*
(cAlias, cSeek)
Use dbSeek() instead. Issues a SEEK command for the expression
cSeek in the work area cAlias.
rSequence
([cAlias])
Interactive function to let the user change the current master
index in the work area cAlias, which defaults to the current
work area.
rSkip
([cAlias], [cSkipCond], [nDistance])
Similar to dbSkip(). If no parameters are specified, or cAlias
is the only parameter specified, then SKIPs a single record in
the work area cAlias, which defaults to the current work area.
If cSkipCond is specified, then it is evaluated after the SKIP
completes. If .false., then the record pointer is positioned
to the last record in the file. nDistance is the number of
records to skip beginning with the current record and defaults
to 1.
STRING FUNCTIONS
sChar2Type
(cExpr, xTypeChk)
Evaluates xTypeChk, then converts the string cExpr into the
same type as xTypeChk, and returns the converted string.
sCharPos
(cFind, cSource, [nCount])
Returns the position in cSource where the nCount occurrence of
cFind is found. nCount defaults to 1.
sCharRange
(cAny, nMin, nMax)
Returns .true. if every character in cAny is within the ASCII
range nMin to nMax.
sChrData
(aNumbers)
Returns a string where each number in aNumbers represent an
ASCII value.
sConvertName
(cName)
Returns a name converted from "L,[ ]F[ M][ S]" to the format
"F[ M] L[ S]", where F is the first name, M is the middle name
or initial, L is the last name and S is a suffix in the set
{"II", "III", "JR", "SR"}.
sCount
(cSearch4, cAny)
Returns the number of occurrences of cSearch4 found in cAny.
sCountBegin
(cSearch4, cAny)
Returns the number of consecutive times cSearch4 is found at
the beginning of cAny.
sDistribute
(cAny, [nWidth])
Returns a string of length nWidth, which defaults to 80, where
all words are evenly spaced.
sDollar
(nAmount)
Returns a string, prefixed with a dollar sign, and no
intervening spaces, of nAmount.
sEval
(cAny, bCode)
Evaluates bCode, sending every character of cAny to bCode
individually.
sExtract
(cAny, [cDelimiter], [nCount])
Returns the nCount string "field", which defaults to the first
"field", from the string "record", where each "field" is
separated by cDelimiter, which defaults to "/".
sFieldNum
(cAny, [cDelimiter], cFind)
Returns the string "field" number from the string "record" cAny
where the string "field" cFind is found. Each "record" is
delimited by cDelimiter, which defaults to "/".
sFirstName
(cName, nLength)
Returns the first name extracted from a name field in the
format "L,[ ]F[ etc]", where L is the last name and F is the
first name. The returned string will be padded with spaces or
truncated to be the length nLength.
sGetDelimited
(cAny, [cDelimiters], [nCount])
Returns a substring of cAny, which is delimited on both sides
be the delimiters specified in cDelimiters. cDelimiters may be
one character, which would delimit both sides of the string
"field", or both the left and right delimiter. The default
cDelimiters is a double-quote mark. nCount specifies the
"field" to extract, and defaults to 1. Note that only the
characters between the delimiters are returned, not including
the delimiters.
sInitial
(cName, cWhich)
Returns the first or last name's initial from the name cName,
in the format "L,[ ]F[ etc]", where L is the last name and F is
the first name. cWhich determines which initial to return, and
may be "F" for first name or "L" for last name.
sLastName
(cName, nLength)
Returns the last name extracted from a name field in the format
"L,[ ]F[ etc]", where L is the last name and F is the first
name. The returned string will be padded with spaces or
truncated to be the length nLength.
sMake
(xAny)
Returns a string, converting any other data type. Character
types are returned without change, logical types are returned
as "Y" or "N", date types are converted using DToC() and
numeric types are trimmed of all spaces. Any other type
returns "error".
sParse
([@]cAny, [cnDelimiter])
Returns a substring parsed from the first characters of cAny up
to the delimiter cnDelimiter, which defaults to "/".
cnDelimiter may also be numeric, and thus specifies the number
of characters to parse. If passed by reference, cAny is
modified by physically removing the substring and the delimiter
(when cnDelimiter is a character delimiter).
sParseEval
(cAny, [cnDelimiter], bCode)
Repetitively evaluates bCode by passing the result of
sParse(@cAny, cnDelimiter). cAny is not modified.
sProtect
(cAny, [cProtector])
Returns an encrypted form of cAny based on cProtector, which
may be any string.
sSetLength
(cAny, nLength)
Returns cAny with the absolute length of nLength, which is
created by either truncating or padding the end of the string
with spaces.
sSqueeze
(cAny, nStart, nCount)
Returns a substring of cAny by removing every (nCount)th
character, beginning with the character at nStart.
sStateName
(cAbbrev)
Returns the state name based on the valid 2-character
abbreviation cAbbrev.
sStrZero
(nAny, nPlaces)
Returns a string whose length is nPlaces, where all spaces are
converted to zeroes.
sTrimZero
(nAmount)
Returns a string representation of nAmount with all zeroes
removed from the left and right sides.
sType2Char*
Same as sMake().
sUnProtect
(cAny, cProtector)
Decrypts a previously encrypted string, cAny, using cProtector,
which MUST be the same as specified with sProtect().
sUnSqueeze
(cAny, cReturn, nStart, nCount)
Stuffs cAny into cReturn by spreading the characters nCount
apart, beginning at character position nStart.
sValidChars
(cAny, cChars)
Returns .true. if every character in cAny is contained in
cChars.
sValidState
(cState)
Returns .true. if the 2-letter abbreviation cState is a valid
state abbreviation, or is empty.
sZipPicture
(cZipCode)
Returns "" if cZipCode is empty, or a 5-character zip code if
the right 4 character of cZipCode are empty, or in the format
"99999-9999" otherwise.
TIME FUNCTIONS
iElapse
<internal>
tChar2Time
(cTime)
Returns a compressed (3-character) time string from a normal
time string in the format "HH:MM:SS".
tDiffHr
(cStart, cEnd)
Returns the time difference in hours.
tDiffMin
(cStart, cEnd)
Returns the time difference in minutes.
tElapsedC
([nTimer])
Returns the elapsed time of the last started timer, or nTimer,
if specified.
tElapsedO
([nTimer])
Turns off nTimer, which defaults to the last timer set,
recovering the space it used.
tElapsedR
([nTimer])
Restarts a previously stopped timer nTimer, which defaults to
the last available timer.
tElapsedS
()
Starts an elapsed-time timer, returning the timer number.
tElapsedX
([nTimer])
Temporarily halts the timer nTimer, which defaults to the last
available timer.
tSetSysTime
(cTime)
Sets DOS' time.
tTime2Char
(cPacked)
Returns a time string in the format "HH:MM:SS" from a
previously packed time.
VIDEO FUNCTIONS
iBackground
<internal>
iCursor
<internal>
iJunk
<internal>
iScreen
<internal>
iViewColor
<internal>
iViewNum
<internal>
vActiveGet
([aGetList])
Returns the GET object number which has focus. aGetList
defaults to vSetGetList().
vAnswer
(cPrompt, nGetLength, [xDefault])
Returns a string answer which the user enters in response to
cPrompt, for a maximum length of nGetLength, using a default
value of xDefault, which defaults to spaces. The prompt is
presented on the last row on the screen.
vAnyKey
()
Prompts the user to press a key to continue, then awaits a
keypress.
vAsk
(cPrompt, cType, cPicture)
Issues the prompt cPrompt on the last row and awaits a response
from the user. The GET variable will be of type cType, using
the picture cPicture. The returned answer will be of type
cType.
vBackground
([cText], [cColor])
cText defaults to "Beckner", and cColor defaults to gray on
white. If cText is a single character, then the screen, except
for the first row, is set to this character. Multiple
characters are printed in a special design.
vBorder
(nStartRow, nStartCol, nEndRow, nEndCol, [cType])
A border is drawn at the specified coordinates. If cType is
"D", the default, a double-line box is drawn. If cType is "S",
a single-line box is drawn. Otherwise, cType contains the
characters to use in a @...BOX command.
vCenter
(nWidth, nRow, nCol, cAny)
Centers the string cAny on the screen beginning at nRow, nCol,
within the width nWidth.
vCenterPos
(cAny, nWidth)
Returns the column number to start printing the string cAny to
fit in the width nWidth, which defaults to MaxCol()+1.
vCopy
(nStartRow, nStartCol, nEndRow, nEndCol, nNewRow, nNewCol)
Copies the screen defined by the first four coordinates to the
screen area whose top coordinates are nNewRow and nNewCol.
vCopyW
(nStartRow, nStartCol, nNumRows, nNumCols, nNewRow, nNewCol)
Copies the screen defined by the first two coordinates to the
screen area whose top coordinates are nNewRow and nNewCol,
copying nNumRows number of rows and nNumCols number of columns.
vCreateScreen
<internal>
vCursRest
()
Restores the cursor to the position it was at when the last
vCursSave() function was called.
vCursSave
()
Saves the current cursor position. Use vCursRest() to restore
it.
vFullColor
()
Returns a color string created by the user in an interactive
fashion.
vGet
(oGet)
A replacement reader for READ. Automatically used when
including the Beckner header file "beckner.inc"
vHighlight
()
Returns a color string to highlight the current.
vInsCursor
()
Toggles the state of the insert mode, with the cursor being
full block for non insert mode and half size for insert mode.
Usually used in set key, eg SET KEY K_INS TO vInsCursor.
vIsSure
([nRow], [nCol], [lBeep])
Displays and "Are you sure?" message, returning the user's
logical response. The message is in a centered window unless
the screen coordinates are specified. If one screen coordinate
is specified, both must be specified. If lBeep, a beep sound
is made prior to the prompt. The default for lBeep is .false..
vMakeCoord
(nRows, nCols, [lBorder])
Returns an array of 4 screen coordinates corresponding to the
upper left row & column and the lower right row & column to
create a window nRows high by nCols wide. If lBorder, the
default, the screen coordinates are made one larger in any
direction to accommodate a border.
vMenu
(cMenuData, [aMenuList])
Produces a menu and returns the users menu choice number.
cMenuData is a menu type, followed by a slash, followed by the
menu options if aMenuList is not specified. If specified, then
aMenuList's element correspond to each menu choice and
cMenuData merely specifies the menu type, which may be "T" for
top menu or "D" for down menu, which is centered on the screen.
If "D" is used, then the number of rows, columns and window
width must be specified after the "D", separated by slashes.
vMenu2
(aMenuList)
Produces a top-line menu, using the elements of aMenuList as
the menu options, returning the user's menu choice number or 0
if <esc> is pressed.
vMessageOff
()
Turns off the last message turned on by vMessageOn().
vMessageOn
(acMessage, [cColor])
Displays a centered message on-screen. acMessage may be a
single string or an array of string lines.
vMove
(nStartRow, nStartCol, nEndRow, nEndCol, nNewRow, nNewCol)
Moves the screen defined by the first four coordinates to the
screen area whose top coordinates are nNewRow and nNewCol.
vMoveW
(nStartRow, nStartCol, nNumRows, nNumCols, nNewRow, nNewCol)
Moves the screen defined by the first two coordinates to the
screen area whose top coordinates are nNewRow and nNewCol,
copying nNumRows number of rows and nNumCols number of columns.
vNewColor
(nStartRow, nStartCol, nEndRow, nEndCol, cColor)
Changes the screen color to cColor in the screen area defined
by the first four coordinates.
vPause
()
If the current row is one away from the bottom row, a pause
message is issued and a wait state insues. When the user
presses a key, the screen is cleared and the cursor is
positioned at 0, 0.
vPhonePict
(nPhone)
Returns a valid picture string for the phone number specified
in nPhone. Return string will be one of these: " <none> ",
" 999-9999" or "999/999-9999".
vPopWhen
(cTital, cAlias, [nStart], cRetExpr, [cDispExpr], [aCoord],
[cSeekExpr], [lAllowNew], [bOnZero], [bFor], [bWhile], [nNext],
[nRecord], [lRest])
Pops up a window and returns the evaluation of cRetExpr. The
window is displayed at the coordinates defined by aCoord, which
defaults to {7, 45, 20, 78}. The displayed items are defined
by the evaluation of cDispExpr, which defaults to cRetExpr.
The record pointer is positioned in cAlias based on cSeekExpr,
if specified. If lAllowNew (default is .false.), then the user
may enter a new record into the list and database. bOnZero, if
specified, is executed if the <esc> key is pressed. The list
is built from consecutive records, or as defined by specifying
bFor, bWhile, nNext, nRecord and/or lRest.
vPrintScreen
([nStartRow, nStartCol, nEndRow, nEndCol])
Prints the contents of the screen area defined by the specified
coordinates, which defaults to the entire screen.
vReadAttr
([nRow], [nCol])
Returns the character attribute of the specified screen
coordinates, which defaults to the current cursor position.
vReadChar
([nRow], [nCol])
Returns the character of the specified screen coordinates,
which defaults to the current cursor position.
vReadLines
([nStartRow], [nStartCol], [nEndRow], [nEndCol])
Returns an array containing the lines from the screen defined
by the specified coordinates, which default respectively to 0,
0, MaxRow(), MaxCol().
vReadStr
([nStartRow], [nStartCol], [nEndRow], [nEndCol])
Returns a string containing the characters from the screen
defined by the specified coordinates, which default
respectively to 0, 0, MaxRow(), MaxCol().
vRepHorz*
(cString, nTimes)
Same functionality as Replicate().
vRepVert
(cString, nTimes)
Repeatedly displays cString vertically for the number of times,
nTimes, specified.
vRestore
([nScreen], [anStartRow], [nStartCol], [nEndRow], [nEndCol], [lPack])
Restores a previously saved screen, using vSave(). The default
screen number is the last one saved. The default screen
coordinates are the same as the ones saved. Screen coordinates
may be specified by an array, or individual coordinates.
vSave
([nStartRow], [nStartCol], [nEndRow], [nEndCol], [lClear])
Saves a portion of the screen whose coordinates are as
specified, which defaults to 0, 0, MaxRow(), MaxCol(),
optionally clearing the area saved.
vScr2File
(cFile, [nStartRow], [nStartCol], [nEndRow], [nEndCol])
Saves the screen area defined by the coordinates, which default
to 0, 0, MaxRow(), MaxCol(), to a file, cFile.
vScr2Prg
(cFile, [nStartRow], [nStartCol], [nEndRow], [nEndCol])
Saves the screen area defined by the coordinates, which default
to 0, 0, MaxRow(), MaxCol(), to a Clipper source-code file,
cFile.
vScreenMode
([nNewMode])
Optionally sets the video mode, returning the old value.
vScroll*
(nStartRow, nStartCol, nEndRow, nEndCol, [cDirection], [nDistance])
Superceded by Clipper's Scroll() function. The screen area
defined by the specified coordinates would be scrolled in the
direction specified by cDirection, which may be "U" for "up",
the default, "D" for "down", "L" for "left" or "R" for "right".
The distance of the scroll is nDistance, which defaults to 1.
vScrollW
(nRow, nCol, nNumRows, nNumCols, [cDirection], [nDistance])
Superceded by Clipper's Scroll() function. The screen area
beginning at nRow, nCol, for nNumRows number of rows and
nNumCols number of columns, would be scrolled in the direction
specified by cDirection, which may be "U" for "up", the
default, "D" for "down", "L" for "left" or "R" for "right".
The distance of the scroll is nDistance, which defaults to 1.
vSetGetList
([aGetList])
If aGetList is specified, then the array is saved on a stack.
If not specified, then the last saved aGetList is returned.
vTab
(nTab, xExpr)
Displays xExpr beginning at the tab position nTab.
vTitle
(aTitle, [nDelay], [cColor])
The title is displayed in a centered window for nDelay, which
defaults to 5, number of seconds.
vViewBorder
(aCoordinates, [cType], [cColor])
aCoordinates contains the four screen coordinates where a
border will be drawn. cType, which defaults to "D", may be "D"
for double-line border, "S" for single-line border, "N" for no
border or may contain the @...BOX characters.
vViewClose
()
Closes the last window opened by vViewOpenC().
vViewOpenC
(nNumRows, nNumCols, [cType], [cColor])
Opens a centered window which will contain nNumRows number of
rows and nNumCols number of columns, with a border type cType,
which may be the same as that for vViewBorder().
vWindow
(nNumRows, nNumCols, [lDouble], [cTitle], [cColor])
Creates a centered window for nNumRows number of rows and
nNumCols number of columns, with either a single or double-line
border as specified by lDouble, which defaults to .true., with
an optional title cTitle.
CLASSES
This section is a last-minute addition. Thanks first to the North
Carolina Clipper Users Group for allowing their inclusion. These were
created for teaching purposes by the members of the group in the
January 1993 meeting. My special thanks to Dr Charles Beattie and
David Coulter for their help getting this together at the last moment
before release. Remember, all source code is included with the
REGISTERED version. To use these classes, YOU MUST OWN CLASS(Y).
CLASS FileIO
A basic file i/o class.
Constructor:
new
(cFile, [cPath])
Returns an object. cFile is the filename. cPath is optional
and defaults to the current directory.
Exported Instance Variables:
none
Methods:
open
([nHow])
Opens the file. nHow specifies the method to open, and may be
FO_READ, the default, FO_WRITE or FO_READWRITE. The manifest
constants are in "fileio.ch".
close
()
Closes the file.
create
()
Creates the file. If the file already exists, its contents are
destroyed.
top
()
Positions the byte pointer to the top of the file.
bottom
()
Positions the byte pointer to the end of the file. Note that
it points to the last byte in the file, not after the byte.
posChar
([nOffset])
Positions the byte pointer to a position nOffset bytes from the
current position. This is a move relative to the current
position, and may be a positive or negative number. The
default is 1.
fileSize
()
Returns the number of bytes in the file.
writeChar
(cString)
Writes cString into the file at the current position,
overwriting any data already at the location, or adding to the
end of the file, depending upon the current byte position prior
to the write.
readChar
([nBytes])
Returns a string which contains the bytes read. nBytes is the
number of characters to read, and defaults to 1.
CLASS FileText
Inherited from FileBasic. The constructor and all methods are
the same. New methods are shown below
METHODS
readLine
([nLines])
Returns an array containing the actual lines read. nLines
specifies the number of lines to read, and defaults to 1.
writeLine
(cLine)
Writes the line, cLine, at the current line position. Be sure
to position the file to the end of the file with (::bottom();
::readChar()) before using this function if you want to append
lines.
posLine
(nLineNumber)
Positions the file so that the next line read is line number
nLineNumber.