Do not swap data disks without first closing all the open files on the original
disk. Not doing so will cause the loss of data in buffers, and will also write
a new entry in the directory of the new disk. USE will close the currently
SELECTed database file and CLOSE DATABASES will close all database files in all
work areas. CLEAR ALL also closes all open database files and will also release
all memory variables. QUIT closes all files, releases all variables, and exits
dBASE III. Choose one of these commands to close your files before swapping
data disks.
>>> COPY TO <filename> [SDF/DELIMITED [WITH <delimiter>]]
(1) COPY TO <filename> DELIMITED does not enclose logical fields with the
specified delimiters. Numeric and date fields are also treated this
way. Date fields go out in the format YYYYMMDD.
(2) COPY TO <filename> DELIMITED WITH , encloses the character fields in
commas and separates the fields with another comma. This command behaves
differently from dBASE II as shown below:
In dBASE II:
. USE file1
. COPY TO file2 DELIMITED WITH ,
will result in:
SANTA,CLAUS,NORTH POLE,ALASKA
In dBASE III:
. USE file1
. COPY TO file2 DELIMITED WITH ,
will result in:
,SANTA,,,CLAUS,,,NORTH POLE,,,ALASKA,
>>> COPY
Many users find it difficult to COPY a single record or a block of records from
one database file to another. The method is quite simple. When you LOCATE the
record or the first record of the block you wish to COPY to the second database
file, first COPY it to a temporary database file, and then APPEND the temporary
into the secondary database file. To specify the group of records to COPY,
define a scope or use a WHILE condition. If you only want the current record,
use the scope NEXT 1. The NEXT scope always begins at the current record and
proceeds for as many records as are specified, so NEXT 1 refers to the current
record only. If, for example, you want to COPY five records including the
current record, your scope would be NEXT 5.
The following demonstrates this concept:
SET SAFETY OFF
USE File1
SELECT 2
USE File2
SELECT 1
* ---Move the record pointer to the record you want
* ---to COPY to the secondary database file.
LOCATE FOR Name = "Henry"
COPY NEXT 1 TO Temp
SELECT File2
APPEND FROM Temp
SELECT File1
If the grouping of records you want to COPY to the secondary database file is
based on a value of a field or an expression, then you should use a WHILE
condition. By specifying a WHILE condition you can COPY from the current record
until the condition is not true.
When you use this technique, be sure to SET SAFETY OFF so that you do not have
to answer the overwriting query that will accompany each COPY TO Temp once Temp
is created.
>>> COPY FILE <source filename> TO <target filename>
The COPY FILE command copies files in 512 byte blocks; whereas, the COPY TO
command will copy a .DBF file until the end-of-file. Therefore, the COPY FILE
command will usually create a slightly larger file than the COPY TO command.
However, the COPY FILE is faster.
>>> COPY STRUCTURE EXTENDED & CREATE FROM
COPY STRUCTURE EXTENDED and CREATE FROM are fully implemented in dBASE III
although not documented. A brief description is given below.
1) COPY STRUCTURE EXTENDED creates a file in whch the field
names become the contents of one record. The syntax for
this COPY option is:
COPY STRUCTURE EXTENDED TO <new file>
2) CREATE FROM forms a new database (.DBF) file in which the
structure is determined by the contents of a file created
with COPY STRUCTURE EXTENDED. The syntax is:
CREATE <new file> FROM <structure extended file>
>>> CREATE/MODIFY REPORT
When you get the error message "Internal error - bucket overfilled" while in
CREATE REPORT or MODIFY REPORT, you have too many characters in the report. The
maximum number of characters, or bucket size, is 1,440 bytes. This includes the
number of characters in the following list:
Report heading - plus one byte for each line
Subtotal heading(s) - plus one byte for each line
Subtotal expression(s) - plus one byte for each expression
Field heading(s) - plus one byte for each line
Field expression(s) - plus one byte for each expression
The extra byte is a null terminator for each expression and heading. When there
are multiple lines in a heading, dBASE III separates them with a semicolon in
the .FRM file.
>>> Date conversion from dBASE II
The dBASE BRIDGE manual (pages 23-24) lays out an elaborate scheme for
converting dBASE II "dates" to dBASE III date fields. A much easier way is to
simply convert the dBASE II database file to a dBASE III file and modify the
structure from character to date field. All dates stored in a dBASE II character
field as "MM/DD/YY" will directly convert to a dBASE III date field.
>>> Dates that are blank
CTOD() and DTOC() are intended to be inverse functions. That is, if DTOC(date)
= char, then CTOD(char) = date. This is true in all circumstances except when
the date is blank and the character string is " / / ". To detect a blank date,
you must use the DTOC() function rather than CTOD(). For example:
reg_date = CTOD("11/09/84")
? reg_date = CTOD("11/09/84")
.T.
? DTOC(reg_date) = "11/09/84"
.T.
* ---With a blank date the following occurs:
blank_date = CTOD(" / / ")
? blank_date = CTOD(" / / ")
.F.
? DTOC(blank_date) = " / / "
.T.
As is evident from the example, the blank date is handled differently than the
non-blank date.
>>> dBRUN (Developer's Release)
(1) Pages 1-32 and 1-33 of the RunTime+ documentation state that the dBRUN disk
contains the files DBRUN.EXE and DBRUN.OVL. In fact, a directory of the disk
shows DBRUN.COM and DBRUN.OVL. DBRUN.EXE is a hidden file and will not show up
when you do a DIR or LIST FILES LIKE *.*.
(2) On page 1-43 of the same manual, the user is instructed to rename the
DBRUN.EXE to a name that reflects the RunTime+ application. However, the
DBRUN.EXE file is hidden and therefore cannot be renamed. The correct procedure
is to rename the executable loader file, DBRUN.COM file, which is not hidden.
>>> Debugging tip
The RETURN and CANCEL commands will release all PRIVATE memory variables
whenreturning to the dot prompt. This can make debugging difficult with
versions1.0 and 1.1 as you may want to check the status of variables used by the
program. The following debugging utility can be set up as a command file. This
utility, called Dot.PRG, will allow you to interactively enter commands, such as
LIST MEMORY and LIST STATUS.
You can insert the command "DO Dot" at various problem points in your program.
When this command is encountered, you will be able to enter interactive commands
without destroying the current environment of the program at runtime. Once the
program is fully debugged, you can remove the "DO Dot" command lines.
* Dot.PRG
DO WHILE .T.
ACCEPT 'DOT ' TO command
IF LEN( TRIM(command) ) = 0
EXIT
ENDIF
&command
ENDDO
RETURN
>>> DELETE
There are occasions when you want to DELETE records in one database file based
on values in a related database file. The following code fragment demonstrates
how this can be done. Entries in the Master database file are DELETEd if there
are no matching transactions in the Trans database file.
SELECT 1
USE Master
SELECT 2
USE Trans INDEX Customer
SELECT Master
SET RELATION TO key INTO Trans
DELETE ALL FOR Customer <> Trans->Customer
The same technique can be used to DELETE all transactions in the Trans database
file for entries that have no Master record. The Master database file would
have to be INDEXed on the linking expression, a RELATION SET from the Trans work
area INTO the Master work area, and the DELETE command issued from the Trans
work area.
>>> Demonstration Disk (RunTime+)
In the Developer's Release of dBASE III, the dBRUN programs from the
Demonstration Disk are not compatible with the full system. Code crunched with
DBC.COM from the Demonstration Disk can only be run with dBRUN from the
Demonstration Disk. Code crunched with DBC.COM from the Developer's Disk can
only be run with the full dBASE III system or the dBRUN disk, purchased
separately.
The error message:
No database is in USE. Enter filename:
is a common indicator that the incorrect dBRUN or dBC is being used.
>>> DISPLAY and LIST
The DISPLAY and LIST commands are documented inthe manual as not having a
FIELDS clause as part of the syntax, while the ASSIST and HELP menu options
assume the FIELDS clause is required. dBASE III will accept either syntax for
these two commands.
>>> Duplicate Keywords in Config.DB
If two or more COMMAND = <value> lines are contained in the Config.DB file,
only the last COMMAND will execute. This is true of any duplicate <keyword> =
<value> entry in the Config.DB file, with the exception of DELIMITERS, which can
legitimately have two entries. This is true for versions 1.0 and 1.1 of dBASE
III.
>>> FILE() function
The FILE() function only searches the current directory. SET PATH TO does not
affect this function. If other directories are to be searched, they must be
supplied to the function. For example,
* ---This will not find Data.dbf, if Data.dbf is in the
* ---subdirectory ACCTS.
SET PATH TO \DBASE\ACCTS
IF FILE( "DATA.DBF" )
DO Process
ENDIF
Workaround:
* ---This method will work.
mpath = "\DBASE\ACCTS\"
SET PATH TO &mpath
IF FILE( mpath + "DATA.DBF" )
DO Process
ENDIF
>>> CTOD() Function
The dBASE III Reference Manual does not clearly state that the CTOD() function
will convert invalid dates to valid dates. The day is adjusted first.
? CTOD("02/29/85")
03/01/85 <------------ Extra day is added to month.
? CTOD("02/29/84")
02/29/84 <------------ Leap years are correct.
If the month is invalid, it is divided by twelve and the year is adjusted. For
example:
? CTOD("13/01/84")
01/01/85 <------------ Extra month is added to year.
? CTOD("12/32/84")
01/01/85 <------------ Extra day is added to month,
extra month is added to year.
? CTOD("99/99/62")
06/23/70
>>> @...GET...RANGE
RANGE is used in conjunction with @...GET to specify an acceptable continuous
set of input values to date or numeric fields. The RANGE is initialized by
specifying lower and upper bounds (inclusive) which may be literal values,
memory variables, or expressions. For example:
1) Literal values:
@ 10,10 GETvar1 RANGE 1,9
@ 11,10 GET mdate RANGE CTOD('12/12/84'),CTOD('12/12/85')
2) Memory variables:
STORE 1 TO low
STORE 9 TO high
@ 10,10 GET var1 RANGE low,high
STORE CTOD('12/12/84') TO low_date
STORE CTOD('12/12/85') TO high_date
@ 10,10 GET mdate RANGE low_date,high_date
3) Expressions:
@ 10,10 GET var1 RANGE low+365,high+(365*10)
@ 11,10 GET mdate RANGE DATE(),high_date+120
Entries outside of the defined range will generate an error message and input
will be prompted until a valid entry is made.
>>> @...GET and READ
(1) If an attempt is made to @...GET memvar PICTURE "999.99" and the memory
variable is not initialized with the number of decimal places specified in the
PICTURE clause, the GET display will not show the decimal digits for input.
Entering a decimal point will exit the GET. For example:
* ---Set up numeric input.
num = 0
@ 10,10 SAY "Enter number " GET num PICTURE "999.99"
READ
*
* ---After entering a decimal point during the READ,
* ---the GET will display the following:
Enter number : 0. :
To properly input numeric memory variables with decimal digits using
@...GET...PICTURE, initialize the memory variable with the number of decimal
digits used in the PICTURE clause. For example:
* ---The following command line assigns num with
* ---the same number of decimal digits as found
* ---in the PICTURE clause.
num = 0.00
@ 10,10 SAY "Enter number " GET num PICTURE "999.99"
READ
(2) When using @...GET and READ cetain keys will terminate the READ. The
following table shows which keys do so and where in the pending GETs the key
will terminate the READ.
Key: The READ will terminate at:
----------- ---------------------------
Backspace First character of first GET
Left arrow First character of first GET
Right arrow Last character of last GET
Up arrow First GET
Down arrow Last GET
Esc Anywhere
F1 Anywhere
Ctrl-[ Anywhere
Ctrl-Q Anywhere
Ctrl-W Anywhere
Ctrl-Home Anywhere
Ctrl-End Anywhere
PgUp Anywhere
PgDn Anywhere
Ctrl-PgUp Anywhere
Ctrl-PgDn Anywhere
Alt 0-9 Anywhere
>>> @...GET...PICTURE
Assuming a memvar is initialized with zero (that is, memvar = 0), when the
user types a period at an @...GET memvar PICTURE "9999.99", dBASE will proceed
to the next command line. This will not occur when the memory variable is
initialized to two decimal places (that is, memvar = 0.00). Only the integer
portion of the number just entered will be stored to memvar if the period is
typed.
>>> @...GET...PICTURE
The function "@B" is used with the @...SAY...GET statement to left-justify
variables of numeric type. It is most useful when SAYing a numeric field or
memory variable that is more easily understood as a character string, such as
a part number. Use of this FUNCTION with GET, however, causes a slight change
in the way numeric variables are read from the screen that may cause some
difficulties.
A numeric memory variable will default to a length of ten digits when
initialized; however, if you are using the PICTURE function "@B" in an @...GET
statement, a numeric memory variable will GET the width of the memory variable
exactly as initialized, even if a template symbol is used. Initializing a
memory variable to zero will cause the GET statement to display one zero on
the screen. A READ command will allow one digit only to be entered to the
memory variable.
This occurs whether the memoy variable is initialized to 0 or 0000. For
example:
SET DELIMITERS ON
w = 1234
x = 0
y = 0000
@ 9,0 GET w PICTURE "@B9999"
@ 10,0 GET x PICTURE "@B9999"
@ 11,0 GET y PICTURE "@B9999"
will produce:
:1234:
:0:
:0:
A READ command will allow four characters to be entered in the first
variable, but only one character in the next two variables. If the "@B"
function is used, initialize the memory variable to the proper length or the
input may be truncated.
>>> @...SAY...PICTURE
To display a dollar-sign character ("$") in front of a numeric value and not
have the possibility of a lot of "$"s filling the blank areas, do the
following:
* ---To display a single "$".
STORE 123.56 TO num
@ 10,10 SAY "$"
@ 10,11 SAY num PICTURE "99,999.99"
This will generate:
$ 123.56
* ---The other option available is:
STORE 123.56 TO num
@ 10,10 SAY num PICTURE "$$,$$$.$$"
This will generate:
$$$123.56
>>> @...SAY using relative addressing
We use the '$' function in dBASE II to control relative screen addressing
with the @...SAY function. For example, you can have a command file print the
contents of a datafile to the screen as follows:
* ---This is dBASE II syntax.
USE <datafile>
DO WHILE .NOT. EOF
*
@ 5, 5 SAY <Field1>
@ $+1,$ SAY <Field2>
@ $+1,$ SAY <Field3>
@ $+1,$ SAY <Field4>
SKIP
*
ENDDO [while .not. eof]
The dBASE III utility, dCONVERT, is used to convert dBASE II programs,
datafiles, etc. to dBASE III formats. dCONVERT does not change the '$'
function to ROW() and COL(); it leaves it alone. However, this will not cause
any problems when executing the code in dBASE III. dBASE III will treat the
'$' function as a relative addressing function.
>>> APPEND FROM <filename> [SDF/DELIMITED [WITH <delimiter>]]
The DELIMITED form of the APPEND FROM command should be documented as having
a WITH clause. WITH is not mentioned in the reference section. Below are a
few examples:
Example 1. To read a comma delimited file in which the
character strings are enclosed in double quotes:
APPEND FROM <filename> DELIMITED
or
APPEND FROM <filename> DELIMITED WITH "
Example 2. To read a comma delimited file in which the
character strings are enclosed in single quotes:
APPEND FROM <filename> DELIMITED WITH '
Example 3. To read a comma delimited file in which the
character strings are not enclosed at all:
dBASE III CANNOT READ A FILE OF THIS FORMT!
Also, the syntax of the APPEND command does not include a WHILE option as the
manual indicates. The correct syntax is
APPEND FROM <file name> [FOR <condition>]
[SDF/DELIMITED [WITH <delimiter>]]
APPEND FROM <textfile> SDF expects records in te text file to be terminated
with a carriage return/line feed (0DH 0AH) pair, in this order. If the order
is reversed (0AH 0DH), dBASE III ignores the character following the carriage
return. This causes the first character of every record (after the first
record) to be missed in the resultant database file.
>>> Numeric fields with decimal places
Although not documented, dBASE III expects the user to allow for a leading
digit and a decimal point on numeric fields containing decimal places. For
example, a numeric field of two decimal places should not be defined any smaller
than four digits in length--one position for the leading digit, one position for
the decimal point, and two positions for the two decimal places.
If the structure for a numeric field does not allow for a leading digit (such
as, a width of three and two decimal places), numeric input to the numeric field
will always be stored as zero. Also, if other numeric fields follow this field,
they might automatically be zeroed out when numeric data is entered to the first
field.
>>> Numeric input of large numbers
If a variable is initialized to zero, dBASE III does not allow input larger
than 10 digits when using the @...GET command, even if the PICTURE clause is
used. For example:
x = 0
@ 5,5 SAY "Enter digits" GET x PICTURE "99999999999"
* (There are eleven 9's) ----------^
READ
The display is:
Enter digits 0
If an eleven digit value is entered, the display is:
Enter digits ********** (10 asterisks)
This can be avoided by initializing 'x' to a value greater than ten digits
(such as, 1000000000). This problem does not occur if a field is used rather
than a memory variable.
>>> ON KEY
If you have set the ON KEY command and are executing any command that takes
some time to process, such as LIST or REPORT FORM, pressing a key will not
interrupt the command being executed. Instead the key pressed will be stored in
the typeahead buffer and ON KEY will execute when that command is finished.
>>> PARAMETERS, passing Fields
In the documentation concerning PARAMETERS when used in conjunction with the DO
<filename> [WITH <parameter list>] command, page 4-76 of the version 1.0 manual
states, "A passed parameter may be any legitimate expression." Also, in the
Glossary (page 7-3) the definition for Expression is, "Expression may consist of
a field, a memory variable, a function, a constant, or any combination thereof."
However, when a DO is invoked with a field in the parameter list, dBASE III
will give the message, "Variable not found." In order to use a field name in
the parameter list, you must use the Alias -> Fieldname form. For example:
USE Filea
DO <Filename> WITH Filea -> Field1
will work, but the following will not.
USE Filea
DO <Filename> WITH Field1
>>> Reserved Device Names in MS-DOS
The MS-DOS manual specifies that certain names have a special meaning to
MS-DOS. Do not use these reserved device names as dBASE III filenames: CON,
AUX, COM1, COM2, LPT1, PRN, LPT2, LPT3, or NUL. This applies to database files,
index files, command files, format files, or form files. Various error messages
will result when files with any of these names are accessed.
>>> Reserved words
Page 1-138 of the tutorial in the first edition of the manual uses a sample
routine which creates a memory variable with the name 'continue.' Since this is
a reserved word, dBASE III will give the message, "No database in USE, enter
filename." dBASE III is assuming you intend to CONTINUE on a LOCATE command.
This will only happen if you use the <variable> = <value> frm of assignment;
dBASE III will execute correctly when you use the STORE <value> TO <variable>
form. Other words that will not work with the first syntax are AVERAGE, COUNT,
and SUM.
>>> ROW(), COL()
After a READ, the ROW() function always returns 24; however, the COL() function
does not change. For example:
SET TALK OFF
var = SPACE(2)
@ 5,40 GET var
? ROW(), COL() <--- This returns 6 and 3.
READ
? ROW(), COL() <--- This returns 24 and 3.
>>> RUN (or !)
The RUN command requires that COMMAND.COM be in the boot drive or the directory
indicated by SET COMSPEC. Otherwise, the incorrect error message "Insufficient
memory" is displayed.
>>> RUN COMMAND
You can get the equivalent to Framework's DOS Access in dBASE III by issuing
RUN COMMAND. This will leave you at the DOS operating system level and will
allow you to enter any DOS commands. To get back to the dBASE III dot prompt,
type EXIT.
>>> SET ALTERNATE TO
dBASE III will not send a linefeed (that is, CHR(10)) to an alternate file
(Word Perfect looks for this linefeed character in its mail merge program). The
following command file:
SET ALTERNATE TO x
SET ALTERNATE ON
?? "first LF"
?? CHR(10)
?? "second LF"
SET ALTERNATE OFF
CLOSE ALTERNATE
will generate the following test file:
first LFsecond LF
As you can see, there is no linefeed in the file.
>>> SET COLOR
(1) To get enhanced video to be black on black, use the command SET COLOR TO
x/y,0+/0. Black on black is frequently used to allow user input without
displaying the characters on the screen, as with entry of a password.
(2) The command:
SET COLOR TO ,<cr>
will produce black on black, even if there is no space after the comma.
(3) The asterisk (*) used with the SET COLOR command allows you to have
blinking characters on thescreen. The asterisk must be used in conjunction with a color parameter. For example:
SET COLOR TO 6*/1,7/4,6
or:
SET COLOR TO GR*/B,W/R,GR
>>> SET COLOR TO on the Compaq computer
SET COLOR TO U on the Compaq computer will not generate underlining. Instead,
SET COLOR TO U and SET COLOR TO I give quarter intensity. Using U+ or I+ will
generate half intensity. You will not get the monochrome attributes, because the
Compaq monitor is operating as if it where color.
>>> SET CONSOLE ON/OFF
The SET CONSOLE ON/OFF command behaves differently in dBASE III than it does in
dBASE II. Specifically, it has no effect when issued at the dot prompt, and if SET CONSOLE OFF is issued in a command file that neglects to SET CONSOLE ON, dBASE III will automatically set the console back on upon the termination of execution of that file. This includes normal termination as well as termination by means of pressing the escape key.
>>> SET DEBUG ON
SET DEBUG ON overrides SET CONSOLE OFF and output will be echoed to the screen.
>>> SET DELETED
SET DELETED in dBASE III applies to all commands, unlike dBASE II, where
certain commands ignore the status of SET DELETED. In dBASE III you are
permitted to COPY, APPEND, and REPORT deleted records if DELETED is set OFF.
>>> SET DOHISTORY ON/OFF (Developer's Release)
If your dBASE III Developer's Release Reference Manual does not contain page
4-115A in the Commands section which explains the use of SET DOHISTORY, the
following documents the command:
SET DOHISTORY determines whether or not commands from command files are
recorded in HISTORY.
Syntax: SET DOHISTORY ON/OFF
Defaults: SET DOHISTORY is normally OFF
Usage: When SET DOHISTORY is ON, commands that were
executed from within command files are stored in
HISTORY. You can then edit these in full-screen
edit mode and execute them.
Note that SET DOHISTORY has no effect on commands
you issue from the dot prompt.
Tips: In conjunction with SUSPEND, SET DOHISTORY is
useful for debugging. However, because SET
DOHISTORY slows down command file execution, use
it only when debugging.
See Also: DISPLAY HISTORY, LIST HISTORY, RESUME, SET DEBUG,
SET ECHO, SET HISTORY, SET STEP, SUSPEND
>>> SET FILTER TO
(1) The SORT command will only sort those records that meet the filter
condition. The INDEX command will index all records in the file whether or not
they meet the filter condition. However, a FIND command will return "No find"
if the key falls outside the scope of FILTER.
(2) Some users are confused regarding the performance that may be expected when
using the SET FILTER TO command. The database file is not smaller in size when
a filter is set. Consequently, activities that access the file are not
proportionately faster. Commands that operate on the FILTERed set of records
must still scan the entire database file.
>>> SET FORMAT TO (Developer's Release & RunTime+)
A format file must remain unencrypted, or be worked into the .SRC file to be
utilized by dBRUN. The documentation for RunTime+ does not mention that an
unencrypted format (.FMT) file may be accessed with the SET FORMAT TO command.
In fact, dBRUN will process only an unencrypted format file with this command.
>>> SET MENUS ON/OFF
The default for SET MENUS is OFF. However, ASSIST leaves MENUS SET ON even if
they were off prior to entering ASSIST.
>>> SET PROCEDURE TO, PARAMETERS, PROCEDURE
The following program and procedure files illustrate the use of parameter
passing with procedures. FUTVALUE.PRG calculates the future value of an
investment and the future value of an annuity with the use of the BUSINESS.PRG
procedure file. Notice how the parameters can be passed to BUSINESS.PRG. They
can either be literal numbers, expressions, or variables. Also, notice that the
PARAMETERS command is included after each PROCEDURE that receives parameters.
LISTINGS:
* FUTVALUE.PRG
* ------------
SET TALK OFF
SET FIXED ON
SET PROCEDURE TO Business
*
* { Calculate future value of an investment
result = 0.00
DO FV WITH 6000.00, 8.5, 4, 5, result
? result
*
* { Calculate future value of regular deposits (Annuity)
result = 0.00
DO FVA WITH 150.00, 7.0, 12, 2, result
? result
*
CLOSE PROCEDURE
SET FIXED OFF
SET TALK ON
RETURN
* EOF: FUTVALUE.PRG
* BUSINESS.PRG { Library of business procedures
* ------------
*
PROCEDURE FV { Calculate future value of an investment
PARAMETERS amount, rate, periods, years, result
rate = rate / periods / 100
result = amount * (1 + rate) (periods * years)
result = ROUND( result, 2 )
RETURN
*
PROCEDURE FVA { Calculate future value of regular deposits
PARAMETERS amount, rate, periods, years, result
rate = rate / periods / 100
result = amount * ( (1 + rate) (periods *;
years) - 1 ) / rate
result = ROUND( result, 2 )
RETURN
*
* EOF: BUSINESS.PRG
OUTPUT:
9136.77
3852.15
The following is a procedure that demonstrates the use of MEMO fields in
conjunction with @...SAY...GET:
USE <filename>
DO WHILE .T.
APPEND BLANK
CLEAR
@ 10,10 SAY 'Field 1 = ' GET Fld1
@ 11,10 SAY 'Field 2 = ' GET Fld2
READ
IF Fld1=SPACE(10)
EXIT
ELSE
CHANGE NEXT 1 FIELDS Memo1
ENDIF
ENDDO
RETURN
The screen will initially show the format specified by the @...SAY...GET. When
the last field has been entered, the screen will clear and the MEMO field will
be displayed in reverse video. The user will then press Ctrl-Home and enter the
full screen MEMO editing mode. When you are finished editing, a Ctrl-End will
save changes or additions and return the user to the MEMO field. A <RETURN>
will proceed to the execution of the next command.
dBASE III Database File Structure
The structure of a dBASE III database file is composed of a
header and data records. The layout is given below.