Sunteți pe pagina 1din 15

Document: Clipper 5.

0 Documentation Errata
Copyright (c) 1991, Nantucket Corporation

Version: 5.01a (April 19, 1991)

Summary: This document gives a summary of corrections that should be


made to your printed documentation. This document is
organized by book, chapter, and page number.

========================================================================
1 Getting Started

1.1 Chapter 1: Installation

1.1.1 Page 1-4 Clipper 5.0 Development Environment Directory Structure

Table 1-1 should read:

\CLIPPER5
.
.
.
\SOURCE
.
.
.
\SAMPLE
\SYS Subsystem source files

------------------------------------------------------------------------
1.2 Chapter 3: Creating a First Program

1.2.1 Page 3-2 Linking Your Program

The .RTLink command-line should read:

RTLINK FILE First

========================================================================
2 Quick Reference

2.1 Chapter 1: Statements

2.1.1 Page 1-5 STATIC

Last sentence on this page should read:

Static variables are visible only within the procedure or program


(.prg) file in which they are declared and have a lifetime of the
entire program.

------------------------------------------------------------------------
2.2 Chapter 3: Standard Commands

2.2.1 Page 3-15 USE

The syntax for the ALIAS clause should read:

[ALIAS <xcAlias>]
------------------------------------------------------------------------
2.3 Chapter 4: Standard Functions

2.3.1 Page 4-6 DEVPOS()

The syntax for this function should read:

DEVPOS(<nRow>, <nCol>) --> NIL

2.3.2 Page 4-7 EXP()

The syntax for EXP() should read:

EXP(<nExponent>) --> nExp

2.3.3 Page 4-8 FIELDNAME()

The syntax for this function should read:

FIELDNAME(<nPosition>) --> cFieldName

2.3.4 Page 4-9 FRENAME()

The syntax for FRENAME() should read:

FRENAME(<cOldFile>, <cNewFile>) --> nSuccess

2.3.5 Page 4-10 INKEY()

The last clause of the description should read:

..., and returns its INKEY() code as a numeric value.

2.3.6 Page 4-11 LASTKEY()

The description for this function should read:

Returns the INKEY() code of the last key extracted from the keyboard.

2.3.7 Page 4-13 NETERR()

The description for this function should read:

Returns true (.T.) if a USE, USE...EXCLUSIVE, USE...SHARED, APPEND


BLANK, FLOCK(), or RLOCK() fails in a network environment.

2.3.8 Page 4-14 NEXTKEY()

The description for this function should read:

Returns the INKEY() code of the next key pending in the keyboard as a
numeric value.

2.3.9 Page 4-16 ROUND()

The description for this function should begin as follows:

Returns <nNumber> rounded to...

------------------------------------------------------------------------
2.4 Chapter 5: Standard Classes

2.4.1 Page 5-1 - 5-2 Error Class, Exported Instance Variables

Add "assignable" to all Error class exported instance variable syntax


statements.

2.4.2 Page 5-3 GetNew(), Class Function

The syntax for the GetNew() function should read:

GetNew([<nRow>], [<nCol>], [<bBlock>], [<cVarName>],


[<cGetPicture>], [<cColorString>]) --> oGet

2.4.3 Page 5-13 setColumn()

The syntax for setColumn() should read:

setColumn(<nColumn>, <oColumnNew>) --> oColumnCurrent

The first sentence of the description should read:

...specified by <oColumnNew>.

------------------------------------------------------------------------
2.5 Chapter 9: The Clipper Debugger

2.5.1 Page 9-1 ?

The syntax for the ? command should read:

? | ?? <exp>

2.5.2 Page 9-1 ANIMATE

The description for ANIMATE should read:

Executes an application in Animate Mode until a Breakpoint or


Tracepoint is reached.

2.5.3 Page 9-1 BP

The syntax for the BP command should read:

BP [AT] <lineNum> [[IN] <idProgramFile>]]


BP <idFunction> | <idProcedure>

2.5.4 Page 9-1 CALLSTACK

The syntax for the CALLSTACK command should read:

CALLSTACK [on | OFF]

2.5.5 Page 9-1 DELETE

The syntax for the DELETE command should read:

DELETE ALL [BP | TP | WP]


DELETE BP | TP | WP <number>

2.5.6 Page 9-1 FIND

The syntax for the FIND command should read:

FIND <searchString>

2.5.7 Page 9-2 GOTO

The syntax for the GOTO command should read:

GOTO <lineNum>

The description should read:

Moves the cursor in the Code Window from its current position to the
specified line number.

2.5.8 Page 9-2 INPUT

The syntax for the INPUT command should read:

INPUT <idScriptFile>

2.5.9 Page 9-2 INSPECT CALLSTACK

The INSPECT CALLSTACK command has been removed.

2.5.10 Page 9-2 INSPECT WP

The INSPECT WP command has been removed.

2.5.11 Page 9-2 LIST

The syntax for the LIST command should read:

LIST BP | TP | WP
The description should read:

Lists all Watchpoints, Tracepoints, and Breakpoints.

2.5.12 Page 9-2 NEW

The NEW command has been removed.

2.5.13 Page 9-2 NUM

The syntax for the NUM command should read:

NUM [ON | off]

2.5.14 Page 9-3 PP

The PP command has been removed.

2.5.15 Page 9-3 SPEED

The syntax for the SPEED command should read:

SPEED <delay>

The description should read:

Sets the display in Animate Mode to a specified speed.

2.5.16 Page 9-3 STEP

The STEP command does not allow an argument. The syntax for this
command should read:

STEP

The description should read:

Executes an application in Single Step Mode.

2.5.17 Page 9-3 VIEW

The syntax for the VIEW command should read:

VIEW <idFileName>

========================================================================
3 Reference

3.1 Introduction

3.1.1 page vi, Table: Typographical Conventions


Row 10 of the table should read:

Assert() User-defined functions...

------------------------------------------------------------------------
3.2 Chapter 1: Basic Concepts

3.2.1 Page 1-2 and 1-4 A Typical Clipper Program, code examples

Line 4 of MainMenu() should read:

SET MESSAGE TO 23 CENTER

3.2.2 Page 1-2 A Typical Clipper Program, code example

Line 2 of the code example '#include "Database.prg"' should be deleted.

3.2.3 Page 1-11 Passing by Value, code example

Line 3 of the code example should read:

SayIt( Customer->Name, nNumber )

3.2.4 Page 1-11 Passing by Reference

The last sentence of the last paragraph on page 1-11 should read:

Variables other than field variables and array elements can be passed
by reference...

3.2.5 Page 1-13 Argument Checking

The second sentence of the last paragraph should be replaced with:

To ascertain this information, compare the parameter in question to


NIL. If it is equal, you can either supply a default value or
generate an argument error.

3.2.6 Page 1-17 Decision Making Structures

The last sentence of first paragraph of this section should read:

Clipper has two such structures, IF...ENDIF and DO CASE...ENDCASE,


but they are identical in functionality.

3.2.7 Page 1-18 Error Handling Structures

The last sentence of the page refers to a non-existent chapter and


should be deleted.

3.2.8 Page 1-30 and 1-31 Memo Data Type


Insert the following paragraphs after the first paragraph of the Memo
section:

The contents of a memo (.dbt) file are handled in blocks of 512


bytes. Each memo field in the database (.dbf) file contains the
block number in ASCII which identifies the memo field data location.
If the memo field contains no data there is no number in the database
(.dbf) file. When the user writes to a memo field, the next
available block is used and its number is stored in the block number
field.

In Clipper, when you change a memo field with less than 512 bytes,
the existing block is used until the block is filled. Once full, the
block is discarded and copied to a new location.

3.2.9 Page 1-45 Increment and Decrement Operators

The first row of Table 1-16 should read:

++ Prefix or Postfix Increment

3.2.10 Page 1-52 Compile and Run, code example

The third code example should read:

bBlock := &( "{ |exp| QOUT(exp) }" )


.
.
.
EVAL(bBlock, DATE())

3.2.11 Page 1-61 Arrays as Function Arguments and Return Values

The last paragraph of this section should read:

Arrays can be returned as values from functions. For example:

3.2.12 Page 1-66 Searching an Array, code example

Line 1 of the first code example should read:

LOCAL aArray := { "Tom", "Mary", "Sue", "Mary" }

3.2.13 Page 1-76 Work Area Attributes

The last three rows of Table 1-19 should read:

RECCOUNT()|LASTREC() Number of records


RECNO() Record number
SELECT() Work area number

3.2.14 Page 1-79 Index Files


The last paragraph of this section beginning with "An alternate method
is provided..." should be deleted.

3.2.15 Page 1-88 Writing to a File

The last sentence of this section should read:

The I2BIN() and L2BIN() functions are provided to convert Clipper


numeric values to binary form and return the results as character
strings. These character strings can then be written to a binary
file.

------------------------------------------------------------------------
3.3 Chapter 2: Statements

3.3.1 Page 2-1 BEGIN SEQUENCE, Description

The second sentence of the third paragraph of Description section should


read:

You cannot RETURN, LOOP, or EXIT between a BEGIN SEQUENCE and RECOVER
statement. From within the RECOVER statement block, however, you can
LOOP, EXIT, BREAK, or RETURN since the SEQUENCE is essentially
completed at that point.

------------------------------------------------------------------------
3.4 Chapter 3: Pre-processor Directives

3.4.1 Page 3-13 #ifdef, Description

The first sentence of the second paragraph should read:

The #else directive specifies the code to compile if <identifier> is


not defined.

------------------------------------------------------------------------
3.5 Chapter 4: Standard Commands

3.5.1 Page 4-10 @...GET, See also

Add QOUT() to the @...GET see also list.

3.5.2 Page 4-15 @...SAY, See also

Add QOUT() to the @...SAY see also list.

3.5.3 Page 4-48 DISPLAY, Examples

The second example's code should read:

#define K_ESC 27
USE Sales INDEX Salesman NEW
DISPLAY Branch, Salesman, Amount WHILE INKEY() != K_ESC

3.5.4 Page 4-57 INPUT, Description


The second paragraph of the Description should be replaced with the
following:

Pressing Return terminates entry of the expression. The expression


is then compiled and evaluated using the macro (&) operator, and the
result assigned to <idVar>. If the variable is not visible or does
not exist, it is created as a private. If no expression is entered,
no action is taken.

3.5.5 Page 4-62 LABEL FORM, Examples

The second example's code should read:

#define K_ESC 27
USE Sales INDEX Sales NEW
LABEL FORM Sales WHILE INKEY() != K_ESC

3.5.6 Page 4-64 LIST, Examples

The second example's code should read:

#define K_ESC 27
USE Sales INDEX Salesman NEW
LIST Branch, Salesman, Amount WHILE INKEY() != K_ESC

3.5.7 Page 4-82 REPORT FORM, Examples

The second example's introductory text should read:

This example demonstrates how to interrupt a REPORT FORM by using


INKEY() to test if the user has pressed the Esc key:

3.5.8 Page 4-82 REPORT FORM, Examples

The second example's code should read:

#define K_ESC 27
USE Sales INDEX Sales NEW
REPORT FORM Sales WHILE INKEY() != K_ESC

3.5.9 Page 4-147 STORE, Description

The first and second paragraphs should be replaced with the following
paragraph:

STORE assigns a value to one or more variables of any storage class.


The storage classes of Clipper variables are local, static, field,
private, and public. STORE is identical to the simple assignment
operators (=) and (:=). In fact, a STORE statement is pre-processed
into an assignment statement using the in-line (:=) operator. Like
all of the assignment operators, STORE assigns to the most recently
declared and visible variable referenced by <idVar>. If, however,
the variable reference is ambiguous (i.e., not declared at compile
time or not explicitly qualified with an alias), it is assumed to be
MEMVAR. At runtime, if no private or public variable exists with the
specified name, a private variable is created.

3.5.10 Page 4-159 USE, Syntax and Arguments

The syntax for the ALIAS clause should read:

[ALIAS <xcAlias>]

The ALIAS argument description should read:

ALIAS <xcAlias> specifies...

------------------------------------------------------------------------
3.6 Chapter 5: Standard Functions

3.6.1 Page 5-36 CMONTH(), See also

CMONTH() should be removed from the CMONTH() see also list.

3.6.2 Page 5-48 DBEDIT(), Description

The second sentence of the first paragraph on page 5-48 should read:

The User Function Return Values table on the previous page summarizes
the possible return values and the corresponding actions.

3.6.3 Page 5-60 DEVPOS(), All sections

Within this item all instances of DEVICEPOS() should be replaced with


DEVPOS().

3.6.4 Page 5-69 EMPTY(), Examples

The second example's code should read:

LOCAL cCust := SPACE(15), nAmount := 0


USE Sales NEW
@ 10, 10 GET cCust
@ 11, 10 GET nAmount PICTURE "999.99"
READ
//
IF !EMPTY(cCust)
APPEND BLANK
REPLACE Sales->Cust WITH cCust, Sales->Amount WITH nAmount
ENDIF

3.6.5 Page 5-77 EXP(), Syntax

The syntax for EXP() should read:

EXP(<nExponent>) --> nExp


3.6.6 Page 5-84 FERROR(), See also

Add FERASE() and FRENAME() to the see also section for FERROR().

3.6.7 Page 5-85 FIELDNAME(), All sections

All references to "FIELD()" should be replaced with "FIELDNAME()."

3.6.8 Page 5-99 FRENAME(), Syntax

The syntax for FRENAME() should read:

FRENAME(<cOldFile>, <cNewFile>) --> nSuccess

3.6.9 Page 5-126 LEFT(), Files

The library for LEFT() should be CLIPPER.LIB.

3.6.10 Page 5-163 PCOL(), See also

Add QOUT() to the see also list.

3.6.11 Page 5-167 PROW(), See also

Add QOUT() to the see also list.

3.6.12 Page 5-182 RIGHT(), Files

The library for RIGHT() should be EXTEND.LIB.

3.6.13 Page 5-189 SCROLL(), Library

In versions 5.01 SCROLL() is located in CLIPPER.LIB rather than


EXTEND.LIB.

3.6.14 Page 5-225 USED(), Examples

Remove the second example entirely. To test if a specific alias exists


use the expression SELECT("<alias>") != 0 instead.

------------------------------------------------------------------------
3.7 Chapter 6: Standard Classes

3.7.1 Page 6-1 - 6-3 Error Class, Exported Instance Variables

Add "assignable" to all Error class exported instance variable syntax


statements.

3.7.2 Page 6-5 GetNew(), Class Function


The syntax for the GetNew() function should read:

GetNew([<nRow>], [<nCol>], [<bBlock>], [<cVarName>],


[<cGetPicture>], [<cColorString>]) --> oGet

------------------------------------------------------------------------
3.8 Glossary

3.8.1 Page 4 - 5 Data Type

The third sentence of this item should read:

In Clipper 5.0, the following data types are defined: character,


numeric, date, logical, array, object, code block, and NIL.

3.8.2 Page 8 File Locking

Remove "Automatic File Locking" from the see also list.

3.8.3 Page 12 Metasymbol

Remove "Extended Expressions" from the see also list.

========================================================================
4 Programming and Utilities

4.1 Chapter 1: The Runtime Environment

4.1.1 Page 1-2 Files and Buffers

In the second and fourth paragraphs of this section, references to DOS


3.2 should be changed to DOS 3.3.

4.1.2 Page 1-7 Table 1-1

Delete the third row of Table 1-1. The R parameter is not supported in
Clipper 5.0.

4.1.3 Page 1-7 Specifying the Number of Files--F Parameter

The last sentence of the second paragraph of this section should read:

The ideal <nHandles> is an odd number and 5 less than the number
specified with the FILES command.

4.1.4 Page 1-9 Assigning Rights

The "Search rights" entry in the bullet list should read:

* Search rights: The user has the right to search the directory's
file list

------------------------------------------------------------------------
4.2 Chapter 2: Network Programming

4.2.1 Page 2-2 Clipper Network Features

The first bullet point should read:

* Shared access to allow two or more users to open the same file
simultaneously (USE...SHARED).

The second bullet point should read:

* Exclusive access to prevent other users from opening the same file
at the same time (USE...EXCLUSIVE).

4.2.2 Page 2-5 Programming in a Network Environment

Delete the last bullet point "How buffers are handled" from the list.
Note that this information is discussed in the "Update Visibility"
section beginning on page 2-12.

4.2.3 Page 2-7 How To Open Files for Sharing

The comment on the second line of the first code example at the top of
page 2-7 should read:

// Returns true (.T.) if USE failed

------------------------------------------------------------------------
4.3 Chapter 3: Clipper Compiler--CLIPPER.EXE

4.3.1 Page 3-3 The Compiler Return Code

The first sentence of this section should read:

If a fatal error occurs or the user presses either Ctrl-C or


Ctrl-Break, the compiler terminates with a DOS return code of 1.

------------------------------------------------------------------------
4.4 Chapter 5: Program Maintenance--RMAKE.EXE

4.4.1 Page 5-16 Table 5-1

The fourth row of Table 5-1 should read:

$< Expands to the full name of the dependency file that triggered
the rule

------------------------------------------------------------------------
4.5 Chapter 6: Clipper Program Editor--PE.EXE

4.5.1 Page 6-2 Table 6-1, PE Editing Keys

The contents of Table 6-1 should read:

Uparrow/Ctrl-E Line up
Dnarrow/Ctrl-X Line down
Leftarrow/Ctrl-S Character left
Rightarrow/Ctrl-D Character right
Ctrl-Leftarrow/Ctrl-A Word left
Ctrl-Rightarrow/Ctrl-F Word right
Home Beginning of line
End End of line
Ctrl-Home Top of window
Ctrl-End End of window
PgUp Previous window
PgDn Next window
Ctrl-PgUp Top of file
Ctrl-PgDn End of file
Return Begin next line
Delete Delete character
Backspace Delete character left
Tab Insert tab/spaces
Ctrl-Y Delete line
Ctrl-T Delete word right
Alt-H, F1 Display help screen
Ctrl-W Save and exit
Alt-W Save and continue
Alt-O New output filename
Alt-X, Esc Exit
Alt-F Display filename
Alt-S Search
Alt-A Search again
Alt-I, Ins Toggle insert mode

------------------------------------------------------------------------
4.6 Chapter 8: Report and Label Utility--RL.EXE

4.6.1 Page 8-10 Reporting from Related Work Areas

The code at the top of page 8-10 should read:

SET RELATION TO CustNum INTO Customer // Establish the link


REPORT FORM CustInv TO PRINTER

------------------------------------------------------------------------
4.7 Chapter 10: Using the Extend System

4.7.1 Page 10-11 Example

The Sinrec() code example should begin as follows:

#include "extend.h"
#include "math.h"

4.7.2 Page 10-27 Date Values, Assembly Language Example

The sixth line of the assembly language code example that currently
reads "pop si" should read:

push si

4.7.3 Page 10-30 Logical Values, Assembly Language Example

In the assembly code example on this page, the following line of code
should be inserted after "call __retl" and before "RET:"

add sp, 2

------------------------------------------------------------------------
4.8 Chapter 11: Extend Function Reference

4.8.1 Page 11-16 _retclen(), Examples

The code example should read:

char data[5] = {1, 0, 2, 0, 3, 3};


_retclen(data, 5);

4.8.2 Page 11-25 _storclen(), Examples

The code example should read:

char data[5] = {1, 0, 2, 0, 3, 3};


_storclen(data, 5, 1);

========================================================================
5 The Clipper Debugger

The Clipper Debugger has been changed significantly in version 5.01,


making the printed documentation inaccurate. Complete and updated
documentation is provided in Debugger.doc.

* * *

S-ar putea să vă placă și