Dec 212017
 
Clipper 5.01 bugs, anomolies and documentation errors, in text and Norton Guide forms. Dated 9/91.
File CL504ER.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Clipper 5.01 bugs, anomolies and documentation errors, in text and Norton Guide forms. Dated 9/91.
File Name File Size Zip Size Zip Type
CL5104.NG 48243 16155 deflated
CL5104.TXT 51480 13875 deflated

Download File CL504ER.ZIP Here

Contents of the CL5104.TXT file



README About this report.

Report Name: CL5104 Report Date: 09/08/91
Author: Compiled by Jo W. French dba Practical Computing of La Canada
290 Starlight Crest Drive
La Canada, CA 91011
(818) 790-3699
CompuServe ID: 74730,1751

Note: Supercedes CL5103. ^b*^b indicates corrections and additions.

This report pertains to Clipper(r) 5.01. Each item herein contains the
applicable version number. It has been compiled from messages posted
on CompuServe forums from 04/19/91 through 09/07/91. The author has
verified most, but not all, of the stated anomalies. The severity of
each item is best left to the reader's judgement.

Verification Conditions.

a) COMPILER: Clipper 5.01 version 1.29 dtd 04/15/91.
b) LINKER: RTLINK version 3.13, as supplied by lanquage vendor.

c) Note: System and DOS changed 8/91 From:

SYSTEM: IBM PS/2 Model 80 with 4Mb RAM, 222 Mb Fixed Disk.
DOS Version: IBM DOS version 3.30
CONFIG.SYS:
DEVICE=c:\dos\vdisk.sys 1536 512 128 /E
DEVICE=c:\qemm\qemm.sys RAM
SHELL=c:\command.com /E:512 /P
FILES=51
BUFFERS=8
ENVIRONMENT
COMSPEC=C:\COMMAND.COM
PROMPT=$p$g
PATH=C:\dos;C:\bat;C:\;C:\me;C:\ws5;F:\clipper5\bin;D:\trh;
C:\qemm;F:\ng;
LIB=F:\clipper5\lib;
INCLUDE=F:\clipper5\include;
OBJ=F:\clipper5\obj;
PLL=F:\clipper5\pll;
CLIPPER=F21;
EXTENDED MEMORY: 1536Kb (DOS VDISK)
EXPANDED MEMORY: 1536Kb (QEMM vs. 5.0)
TSR's: All TSR's are loaded above 9FFF using QEMM's LOADHI.

d) To:

SYSTEM: IBM PS/2 Model 80 with 8Mb RAM, 222 Mb Fixed Disk.
DOS Version: IBM DOS version 5.00
CONFIG.SYS
DEVICE=C:\QEMM\QEMM386.SYS RAM NOSORT DMA=128
DEVICE=C:\QEMM\LOADHI.SYS /R:1 C:\DOS\SMARTDRV.SYS 256 256 /A
DEVICE=C:\QEMM\LOADHI.SYS /R:2 C:\STACKER\STACKER.COM ( E: & F: )
DEVICE=C:\QEMM\LOADHI.SYS /R:1 C:\DOS\RAMDRIVE.SYS 3072 512 128 /A
DEVICE=C:\QEMM\LOADHI.SYS /R:2 C:\DOS\SETVER.EXE
DEVICE=C:\STACKER\SSWAP.COM F: G:
DEVICE=C:\STACKER\SSWAP.COM E: H:
SHELL=C:\COMMAND.COM C:\ /E:512 /P
FILES=10
BUFFERS=8
DOS=HIGH
ENVIRONMENT
COMSPEC=C:\COMMAND.COM
PROMPT=$P$G
TEMP=I:\TMP
PATH=C:\dos;C:\bat;C:\STACKER;C:\;C:\qe;C:\me;C:\ws5;F:\cl5\bin;
C:\qemm;F:\ng;F:\blink
GLOB=C:\DOS\GLOB.EXE
LIB=F:\cl5\lib;
INCLUDE=F:\cl5\include;
OBJ=F:\cl5\obj;
PLL=F:\cl5\pll;
CLIPPER=//F:21;

==============================================================================

|D|A|M|N|
| | | | New since last release.
| | | Miscellaneous comments.
| | Anomaly.
| Documentation error / omission.

==============================================================================
AEVAL() Undocumented return reference.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

AEVAL() documentation does not mention the presence of a second return
reference; i.e., the element number.

^bCause^b

Documentation omission.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
ALERT() Miscellaneous Comments

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

a) ALERT()'s prompt is limited to 4 choices.

b) There is an undocumented third parameter, cColorString, which may be
a color pair such as "W/N".

c) The environmental parameter, NOALERT, will prevent the display of
any messages to be generated by this function.

d) In general, this function should be used for error situations, only.
It may have a detrimental effect on other screen environment settings
(note that it cannot be contained by DISPBEGIN() / DISPEND()).

^bCause^b

a) -c) Documentation omission.

d) N/A

^bWork Around(s)^b

a) - c) Annotate your documentation.

d) Write your own ALERT() equivalent function.

==============================================================================
APPEND FROM Append From Delimited with Character Numbers.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

APPEND FROM DELIMITED does not translate numbers enclosed in quotes to
numerics for input to a numeric field.

^bCause^b

Unknown

^bWork Around(s)^b

Unknown.

==============================================================================
ATAIL() Miscellaneous comment.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Per the documentation, ATAIL(aArray) 'gets' the value of the last element
in the array. It may NOT be used to 'set' the value and will return
Compiler error 2042, Invalid lvalue, if you attempt to use it in this
fashion.

^bCause^b

N/A.

^bWork Around(s)^b

Use aArray[ Len(aArray) ] := something to 'set' a value.

==============================================================================
BOF() Set to .T. on LastRec() + 1 access.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

BOF() will return .T. under the following example:
USE test
GO LASTREC() + 1
? BOF() // => .T.

^bCause^b

Unknown.

^bWork Around(s)^b

Don't 'Jump' to LastRec() + 1 and test for BOF(). Skip works ok.

==============================================================================
BREAK/RECOVER May not return code block.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The BREAK / RECOVER USING methodology may not return a code block.
Here's one example from Jeff Cheney [72570,675] :

*********************
** PRNERROR.PRG **
** compile with /N **
*********************
FUNCTION prnError
LOCAL lErrorObj
SET DEVICE TO PRINT
DO WHILE .T.
// begin trapping printer errors
BEGIN SEQUENCE
// make sure printer is turned off to invoke handler
@ 1,0 SAY "!!!!!"
RECOVER USING lErrorObj
// set a break point here and have a look at lErrorObj with
// Monitor Locals under the debugger, it's NOT AN OBJECT anymore!
IF lErrorObj:cargo
LOOP
ELSE
EXIT
ENDIF
END SEQUENCE
ENDDO
SET DEVICE TO SCREEN
RETURN NIL

**********************
** ERROR.prg **
** compile with /N **
**********************
#include "Error.Ch"

FUNCTION errorsys
// set up new error handler
ERRORBLOCK( { | lErrorObj | ErrorTest( lErrorObj ) } )
RETURN NIL

FUNCTION ErrorTest( lErrorObj )
LOCAL lChoice,lSetDevice
IF lErrorObj:genCode == EG_PRINT .AND. lErrorObj:canRetry
lSetDevice := SET( _SET_DEVICE,"SCREEN" )
lChoice := ALERT( "Printer Error", { "Abort","Retry","Restart" } )
SET( _SET_DEVICE,lSetDevice )
IF lChoice <> 2
lErrorObj:cargo := ( lChoice == 3 )
BREAK // I also tried BREAK( lChoice == 3 )
ENDIF // and BREAK( lErrorObj ) but it acts
ENDIF // the same way
RETURN ( lChoice == 2 )

^bCause^b

Unknown.

^bWork Around(s)^b

Code would be unique to each incidence.

==============================================================================
Browse:footSep Documentation ommission.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

browse:footSep is missing from the documentation. This is a footing
separator for the browse object. It may be overridden by a col:footSep.

^bCause^b

Documentation ommission.

^bWork Around(s)^b

Annotate your manual to include this Instance Variable.

==============================================================================
CLD Debugger anomalies.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) The debugger will indicate incorrect variable values following a
PARAMETERS statement.

2) The debugger will not return the values stored in cargo when the
values are contained in a multi-dimensioned array; e.g:

? oTb:cargo[1,1] no workee.

3) The debugger returns the row/column in the debugger when queried,
not the ROW() / COL() in the application.

^bCause^b

1 - 3 Unknown.

^bWork Around(s)^b

1) If possible, avoid using the PARAMETERS statement.

2) & 3) Assign to a variable, then query the variable; e.g.;
#ifdef TEST
aVar := oTb:cargo
#endif
Then ? aVar[1,1] when in the debugger.

==============================================================================
COL() COL() returns 0 after MENU TO.

^bClipper Version^b 1.29 dtd 04/15/91.

^bGeneral Statement^b

COL() will return the column at the end of the prompt if queried
before the MENU TO. It returns 0 after the MENU TO.

==============================================================================
CLOSE DATABASES Does not change current work area.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

CLOSES DATABASES does not change the current work area; e.g.:

Use File1 New
Use File2 New
Close Databases // or DBCloseAll()
? Select() // => 2

which is not compatible with S '87. A 'Use File' will open the file in
workarea 2.

^bCause^b

See Std.ch and compare to CLOSE ALL.

^bWork Around(s)^b

Select(0) will 'reset' work areas so that 1 will be the next open
work area. Also Use FileName NEW will select workarea 1.

==============================================================================
CLOSE-UP Problem with CLOSE-UP remote operation.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Keys may not be recognized when using CLOSE-UP remote operation.

^bCause^b

Incorrect CLOSE-UP settings.

^bWork Around(s)^b

Set CLOSE-UP keys to Advanced (requires version 3.0A).

==============================================================================
COMMAND.COM Clipper in a batch file with DOS 5.0.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

When a Clipper program is executed from a batch file, using DOS 5.0,
you may get a "Missing Command.com" message on exit.

^bCause^b

Unknown

^bWork Around(s)^b

Put the following in the batch file, before executing the Clipper app:

%COMSPEC% /C EXIT

==============================================================================
COMPILER Miscellaneous observations.

^bClipper Version^b 1.29 dtd 04/15/91.

^bObservations^b

1) IF the /P parameter is used in SET CLIPPERCMD and in the command
line, the result is no .ppo file.

2) Reminder, per the manual, pg. 3-2, SET CLIPPERCMD or command line
options MUST be separated by a space (or the remainder will be ignored).

3) /O Compiler Option ( Programming and Utilities Guide, pg 3-10)
If only a path is supplied, it must end with \.

4) Compiler error documentation is incomplete; e.g., Fatal error 3039,
phase error is not documented.

==============================================================================
DBCREATEIND() Requires parameter.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The NG states that the third parameter, , is optional.

^bWork Around(s)^b

Revise your documentation.

==============================================================================
DBEDIT()* Locks up with return value of 2.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

When a UDF returns a value of 2, DBEdit locks up.

^bCause^b

Unknown.

^bWork Around(s)^b

1) Use TBrowse.

2) If you still want to use DBEdit, then:
a) save the recno() of the following record
b) "go top"
c) go to the saved recno()
d) _then_ refresh your screen.

==============================================================================
DBF FILES Assure proper closing.

^bClipper Version^b 1.29 dtd 04/15/91.

^bGeneral Comment^b

5.01 is very sensitive about work area management. Assure that files,
including indices, are properly closed before attempting things such
as APPEND FROM.

==============================================================================
DBU Locks up with empty file.


^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The "Getting Started" manual, page 4-8, indicates, to add a record to
an empty file, 'just start typing'. This will cause a lock-up.

^bCause^b

Documentation error.

^bWork Around(s)^b

Press K_DOWN, before typing other characters.

==============================================================================
Division by Zero Results in zero.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Division by zero results in zero vis-a-vis a run time error in S'87.

^bWork Around(s)^b

a) Test divisors for zero and return whatever you desire.
b) See Clipper 5.01 ErrorSys for trapping this occassion.

==============================================================================
DOS 5.0 Using PLL's with DOS 5.0.

^bClipper Version^b 1.29 dtd 04/15/91.

^bGeneral Comment^b

If you encounter a problem executing an application.EXE and you are
using a PLL try:

a) LOADFIX App

b) Re-making the PLL file under DOS 5.0

c) Executing the application from a batch file which 'eats up' some
of the memory in the first 64Kb segment; e.g.,

@echo off command /e:32000 /c %1 %2 %3 %4 %5 %6 %7


==============================================================================
DOS ERROR 4 Encountered on a network.

^bClipper Version^b 1.29 dtd 04/15/91.

^bGeneral Comment^b

If you encounter DOS Error 4 on a network, check that your SHELL.CFG
file has a sufficent number of files specified. Without a FILES=
statement, the default will be 40 (Novell).

==============================================================================
FIELDBLOCK() Does not return NIL for invalid cFieldName

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The NG erroneously states that FIELDBLOCK will return NIL if
is not in the current work area. FIELDBLOCK will return a code block,
which, when evaluated, will cause a runtime error.

^bWork Around(s)^b

Verify fields, before using FIELDBLOCK.
==============================================================================

==============================================================================
FIELDWBLOCK() Does not return NIL for invalid cFieldName

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The NG erroneously states that FIELDWBLOCK will return NIL if
is not in the designated work area. FIELDBLOCK will return a code block,
which, when evaluated, will cause a runtime error.

^bWork Around(s)^b

Verify fields, before using FIELDWBLOCK.
==============================================================================

==============================================================================
FOR..NEXT..STEP Use Integers.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The following will not produce the desired effect:

FOR n := 1 to 2 step .1
? n => 1 thru 1.9
NEXT

^bCause^b

Clipper numerics.

^bWork Around(s)^b

Use integers in the loop statements and convert within the loop; e.g.:

FOR n := 10 TO 20 STEP 1
j := n / 10
? j
NEXT

==============================================================================


==============================================================================
ERRORSYS.PRG Not compatible with S'87.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Clipper 5.0's ERRORSYS.PRG is incompatible with S'87 routines.

^bWork Around(s)^b

Use the new ErrorSys.

^bNote:^b You may wish to download ERS501.ZIP from Nanforum for
S'87 to 5.01 compatibilty solutions.

==============================================================================
Get:Delete() Documentation omission.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Get:Delete() Syntax is not in documentation.

^bCause^b

Documentation omission.

^bWork Around(s)^b

Annotate your documentation to add the definition to the GET Class,
Cursor Movement Methods definitions

delete() Deletes the character under the cursor

==============================================================================
Get:Subscript() Works the same on any dimension array.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The NG states that Get:Subscript() returns a number for a single
dimension array. Get:Subscript() returns an array of number(s) for
any dimension array.

^bCause^b

Documentation error.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
INTERNAL ERRORS No documentation. See User-upload, CL5IEn.ZIP

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Nantucket(r) has not supplied Internal Error documentation.

^bWork Around^b

None; however, CL5IEn.ZIP in the NanForum library may be of some help.

==============================================================================
JOIN FIELDS statement required for secondary fields.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Join will not incorporate secondary file fields, unless so specified
by the FIELDS argument. This is different than S'87, but noted in the
docs.

^bWork Around^b

Use FIELDS argument if you want to include secondary fields in your
resultant .dbf.

==============================================================================
LOCAL Inline assignment clarification.

^bClipper Version^b 1.29 dtd 04/15/91.

^bClarification:^b

Inline assignments of the following form:

LOCAL a := b := c:= 0

result in LOCAL a and PRIVATE b and c. Use:
LOCAL a, b, c
a := b := c := 0

Further, LOCAL x := 1, y := x + 2, z := y + 4 will cause a run-time
error: BASE/1081 Argument Error: +. Use:
LOCAL x, y, z
x := 1; y := x + 2; z := y + 4 or

LOCAL x := 1
LOCAL y := x + 2
LOCAL z := y + 4

==============================================================================
Macro Compiler Unacceptable codeblock contents. ^b^CB3D^CB3 ^CB3 ^CB3 ^CB3^b

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The macro compiler cannot handle the following types of things when
attempting to compile a code block:

1) Assignment, Increment and Decrement Operators; e.g., :=, ++.

2) A nested code block.

^bCause^b

Unknown.

^bWork Around(s)^b

When possible, substitute an acceptable expression; e.g., var + 1.

==============================================================================
MISC Miscellaneous clarification/anomalies.

^bClipper Version^b 1.29 dtd 04/15/91.

1) NDX File Support ( Card contained with Clipper 5.0 )
You must request this feature from Nantucket(r). Not available
as of early June.

2) MEMVARBLOCK() (NG Function Description)
MEMVARBLOCK() cannot be used to create set-get blocks for LOCAL
or STATIC variables.

3) Code block parameter visibility - documentation anomaly.
Page 1-21 of the Clipper 5 Reference, last sentence, 2nd paragraph
reads: "....a declaration that occurs within a code block (a block
parameter), applies to that code block and any code blocks nested
within it.". The block parameter IS NOT visible to nested code blocks,
unless you pass it.

4) Menu.prg example on page 1-2 of the Reference Manual has as its
first line '#include "Database.prg" ...'. This directive should
be placed at the end of the program (it includes generic database
functions).

5) STATIC arrays. Documentation anomaly, pg. 1-57. Contrary to the
documentation, STATIC arrays are also dynamic.

6) The following program results in a run-time error because x was not
initialized; however, the error message, "Error BASE/1087 Argument
error: -- " should reference ++ instead.

function main
local x
x++
return nil

7) The COPY FILE command doesn't throw an error to the error handler if
there is an "out of drive space" error.

8) An corrupted index error may refer to the prior index in a list.

9) There _is_ a, to be defined, limit to what TBrowse can handle in terms
of number of fields versus screen display rows.

10) A memory overbooked error may be caused by too many #define statements.

11) When using @ .. GET aArray[nCtr] VALID SomeFunc(oGet) in a FOR nCtr ..
loop, the nCtr can't be used in SomeFunc(oGet), (it will have a value
of n + 1). Use oGet:getVar() to retrieve the get value for validation.

12) The following variations of InKey() all produce the same effect as
INKEY(0) : Inkey(NIL), Inkey(""), Inkey(cString).


==============================================================================
MEMORY() Memory(3) and (4) undocumented.

^bClipper Version^b 1.29 dtd 04/15/91.

Memory(3) returns the approximate amount of memory allocated to the SVOS.

Memory(4) returns the amount of Expanded Memory available.

==============================================================================
MEMOLINE() Minimum is 1.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The minimum for the parameter has been reduced to 1.
This has not been documented.

^bCause^b

N/A.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
MLCOUNT() Minimum is 1.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The minimum for the parameter has been reduced to 1.
This has not been documented.

^bCause^b

N/A.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
MLCTOPOS() Position reporting error.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

If Word Wrap is ON _and_ the line preceeding the one for which the
position is being determined is either the same length or length -1
of the line length specified in the function call.

( For example, if nLine_Len is specified as 66 and a call is made to a
row/columnn where the previous physical line is either 65 or 66 characters
long.) - per DORMAN BLACKMAN 73047,177.

MLCTOPOS() will report the position of the previous chr(141) character,
regardless of where the cursor is on the line.

^bCause^b

Unknown.

^bWork Around(s)^b

Unknown.

==============================================================================
==============================================================================
MLPOS() Position reporting error.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

If Word Wrap is ON _and_ the line preceeding the one for which the
position is being determined is either the same length or length -1
of the line length specified in the function call.

( For example, if nLine_Len is specified as 66 and a call is made to a
row/columnn where the previous physical line is either 65 or 66 characters
long.) - per DORMAN BLACKMAN 73047,177.

MLPOS() will report a position that is 2 less than the actual line starting
position. This only applies to the 1st line following the 'long line'. It
corrects itself on the 2nd and subsequent lines (as long as there are no
more 'long lines').

^bCause^b

Unknown.

^bWork Around(s)^b

Use MLPOS() to determine nlOffset (line offset) and add 2 if
SUBSTR(cMemo, nlOffset, 1) == Chr(141).

==============================================================================
==============================================================================
MPOSTOLC() Position reporting error.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

If Word Wrap is ON _and_ the line preceeding the one for which the
position is being determined is either the same length or length -1
of the line length specified in the function call.

( For example, if nLine_Len is specified as 66 and a call is made to a
row/columnn where the previous physical line is either 65 or 66 characters
long.) - per DORMAN BLACKMAN 73047,177.

MPOSTOLC() has an offset error of plus 3.

^bCause^b

Unknown.

^bWork Around(s)^b

Unknown.

==============================================================================

==============================================================================
MULTI-STATEMENT Multi-statement lines, CAUTION.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

When using multiple statements on one programming line; i.e.;
separating commands with a semi-colon; there are several commands
which will cause erroneous results, if they are not at the end of
line.

^bCause^b

Pre-processor action.

^bWork Around(s)^b

Make sure that the following commands, if used, appear at the end
of the line, ONLY.

ENDDO <*x*> SET STEP <*x*>
ENDIF <*x*> SET SAFETY <*x*>
ENDCASE <*x*> SET TALK <*x*>
ENDFOR <*x*> SET PATH TO <*path*>
SET ECHO <*x*> SET COLOR TO <*spec*>
SET HEADING <*x*> SET COLOUR TO <*spec*>
SET MENU <*x*> RUN <*cmd*>
SET STATUS <*x*> ! <*cmd*>

COPY TO <(file)> DELIMITED WITH <*delim*>
APPEND FROM <(file)> DELIMITED WITH <*delim*>

==============================================================================
NETWORKS Seeks and Indexing comments.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b per Darren DeLoach [76264,1042]

1) A bug exists which can result in failed SEEK statements on a
workstation whenever _another_ workstation on the network edits the
logical top record in the file to have a new index key which moves it
in the index such that it is no longer at the logical top-of-file.
Other stations do not see the new index value in the NTX pages, and so
incorrectly perform SEEKs in the file. The problem only occurs with
the logical first record in the file; adding new records does not cause
the problem, even if you are adding the first record in the file.

2) General comment on indexing (see workaround #2).

^bCause^b

1) Unknown.
2) N/A

^bWork Around(s)^b

1) Setting SOFTSEEK ON seems to make SEEK perform correctly. A GO TOP
before the SEEK worked in one specific case, but is not guaranteed
to work in all situations.

2) A user has reported that the following methodology has eliminated
problems he was having with indices:

Lock the File
Index the File
Close the Index
UnLock the File
Set Index to ...

==============================================================================
NG MODE Un-documented Norton(r) Guide Mode.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

NG can be executed in a mode which will permit it to unload from
memory when F10 or Escape is used to exit the program.

^bCause^b

Documentation omission.

^bWork Around(s)^b

Enter NG TEST.NG at the DOS prompt. When NG receives the specific
parameter TEST.NG, it will load in the above described mode.
Annotate your documentation.

^bNote^b TEST.NG is the specific parameter to be used. This is NOT
the name of an existing file.

==============================================================================
NOSNOW() Returns lState, not NIL

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

NOSNOW( ) returns a logical value indicating current setting,
not NIL, as stated in the NG.

^bCause^b

N/A.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
OPEN ERROR(0) Potential Fix.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

a) User was getting the subject error message repeatably.

^bCause^b

Unknown.

^bWork Around^b Per user report:

The workaround is to insert a call to indexkey() on an already open dbf,
just before the attempt to open the new dbf.

..
xx = mastinv->(indexkey(0)) && mastinv.dbf is already open
sele 0
net_use("store_w",.F.,5)
set index to store_w && this was causing openerror(0)
..

==============================================================================
PRINT Miscellaneous Comments.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

a) When DEVICE is set to print, using @ row, col will not set PROW() and
PCOL() to row, col as it did in S'87. (It will clear the noted screen
row).

b) If printing is directed to a file, the default extension of the file
name will be .PRN, not .TXT.

^bCause^b

a) See Std.ch

b) N/A

^bWork Around(s)^b

a) Use @ row, col SAY "" or SETPRC(row, col).

==============================================================================
PICTURE Comments on 5.01's PICTURE clause.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) The PICTURE clause will not increase a variable's length.
Example:

cVar := ""
@ row, col get cVar PICTURE "!!!!!" // Does not work.

2) The PICTURE format function, "@Z #" does not perform per S'87.
Assuming the get variable is zero, the active get will display 0.
Note: Clipper 5.01 documentation has been changed.

3) The GET PICTURE format function, "@S" performs differently
than S'87; i.e., large values of will not wrap to the next
line(s). Clipper 5.01 documentation reflects this change.

4) The PICTURE format function "@( " does not work correctly with
commas in the picture clause; e.g., try entering -100 below:
LOCAL x:= -10, Getlist := {}
@ 10, 10 SAY "Enter" GET x PICTURE "@( 99,999"
READ

5) The PICTURE format function "@R " may not work correctly with
character strings; e.g.:
LOCAL x:= "213", Getlist := {}
@ 10, 10 SAY "Enter" GET x PICTURE "@R (999)"
READ

Note: numerical vars are formatted correctly.

==============================================================================
PROMPT MESSAGE Comments on usage.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) Undocumented feature. @...PROMPT...[MESSAGE] documentation does not
indicate that the message may be a code block as well as a .

2) The CENTER clause is off by one column; i.e., a centered message will
be 1 column to the left of the desired position.

^bCause^b

1) N/A.

2) Nan Goof.

^bWork Around(s)^b

1) Annotate your documentation.

2) Use the undocumented feature to call a function which centers the
message correctly. Example:
@ 10, 10 PROMPT "Hello" MESSAGE {|| Showit("John") }
MENU TO nChoice

FUNCTION ShowIt(cString)
LOCAL nRow := SET(_SET_MESSAGE), nCol
nCol := INT( (MAXCOL() + 1 - LEN(TRIM(cString))) / 2 )
DEVPOS( nRow, nCol ) ; QQOUT( TRIM(cString) )
RETURN ("")

==============================================================================
RANGE Not verified unless 'get' is changed.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

When using @...[SAY]...GET...RANGE, the range will not be verified
unless the get is changed.

^bCause^b

RangeCheck() function in GETSYS.PRG

^bWork Around(s)^b

Modify your copy of GetSys.prg, if this action is unacceptable.

==============================================================================
RESTORE Problem with change to higher level privates.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

RESTSTORE FROM ADDITIVE may change the value(s) of higher
level privates. An example:
// Run this as a standalone program:
Procedure MemSave
Memvar VarA
Private VarA
VarA := 'ABCDEF'
Save to Test All Like VarA
Return
// Then run this:
Procedure A
Memvar V1
Private V1
V1 = 1
? 'Procedure A, V1 Should be 1, V1=',V1 // => 1
Do B
? 'Procedure A, V1 Should be 1, V1=',V1 // => 2
Return
***********
Procedure B
Memvar V1
Private V1
V1 = 2
? 'Procedure B, V1 Should be 2, V1=',V1 // => 2
Do C
? 'Procedure B, V1 Should be 2, V1=',V1 // => 3
Return
***********
Procedure C
MemVar V1
Private V1
V1 = 3
? 'Procedure C, V1 Should be 3, V1=',V1 // => 3
RESTORE FROM Test ADDITIVE
Return

^bCause^b

Unknown

^bWork Around(s)^b

Don't store variables in .MEM files.

==============================================================================
RESTSCREEN() Undocumented defaults.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

RESTSCREEN() defaults to 0, 0, MaxRow(), MaxCol() if these parameters
are NIL.

^bCause^b

N/A.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
==============================================================================
RMAKE > Omit spaces when re-directing error output.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b
This re-direction of error output statement does not work:
// Inference rule to compile
.prg.obj:
clipper $** $(options) > comperr.txt

^bCause^b

N/A.

^bWork Around^b

Remove the spaces surrounding the >; i.e.,
clipper $** $(options)>comperr.txt

==============================================================================
REINDEX Does not re-create index file header.

^bClipper Version^b 1.29 dtd 04/15/91 (and Summer '87)

^bProblem Statement^b

REINDEX uses the existing index file header. If this is corrupted,
the resultant index file will also be invalid.

^bCause^b

N/A

^bWork Around(s)^b

1) Use INDEX ON to create new indices. Some users have suggested
erasing the existing index file prior to INDEX ON usage.

==============================================================================
REPLICATE Maximum string length is 65516 characters.

^bClipper Version^b 1.29 dtd 04/15/91 (and Summer '87)

^bProblem Statement^b

Contrary to the documentation, the maximum REPLICATE is 65516 bytes.

^bCause^b

N/A

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
REPORT FORM Anomalies with Report forms.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) Multi-line reports cannot be printed using the string +";"+ string
method.

2) REPORT ... HEADING ".." cannot be printed using the +";"+ method.

3) The Group Eject option is not implemented.

4) Command line parameters NOEJECT and SUMMARY incorrectly implemented.

5) SubSubTotal problem.

6) First page line counting error.

7) Wasted header spacing.

8) SET PATH problem in FRMBACK.PRG.

9) Potential run-time error due to ListAsArray() in FRMBACK.PRG.

^bCause^b

Errors and Ommissions

^bWork Around(s)^b

8) Edit Line 154 in FRMBACK.PRG as follows:

Change: paths := ListAsArray( s )

To read: paths := ListAsArray( s, ";")

9) Edit ListAsArray() to check for nWidth > 0. The following works
for me:

FUNCTION ListasArray(cList, cDelim, nWide)
LOCAL aList := {}, lNum
cDelim := IF(VALTYPE(cDelim) == 'C', cDelim, ";")
cList := TRIM( STRTRAN(cList, cdelim, chr(13)+chr(10)) )
nWide := IF( (lNum := (VALTYPE(nWide) == 'N' .and. nWide > 0 )), ;
nWide, LEN(cList) )
aList := ARRAY(MLCOUNT(cList,nWide,1,.T.))
AEVAL(aList, {|a,e| ;
aList[e] := IF(lNum, MEMOLINE(cList,nWide,e,1,.T.),;
TRIM(MEMOLINE(cList,nWide,e,1,.T.)))})
RETURN aList

^bNotes^b

C5REP6.ZIP, on NANFORUM, contains a FrmRun.prg which fixes 1 - 7, above.

==============================================================================
RESERVED WORDS Comments on reserved words.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

Numerous users have reported problems which have been traced to the
use of variable names which conflict with Clipper 5.0 commands or
statements.

^bWork Around(s)^b

Exercise caution in the choice of variable names. Remember, if your
variable name is four characters long and these characters match the
first four letters of a Clipper 5.0 or UDC command, you've got problems.
Just avoid this situation as well as names that match Clipper 5.0
commands and statements. Remember also, If you create a UDF of the same
name as a Clipper 5.0 function, its action will supersede Clipper's.

==============================================================================
RL Use with caution.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

5.01's RL utility is a warmed over Summer '87. It inherits the anomalies
of it's parent. F1 Help is not incorporated. Some of the things to watch
out for are:

1) Adding an extra column inadvertently.
2) Totaling the last column.
3) The eject before/after print options.

^bCause^b

Programming errors.

^bWork Around(s)^b

Use PgUp to save 'gets'. On item 2, save the report without indicating
totals and then try a second time. Re-write RL.

==============================================================================
ROUND() Returns unpredictable results.

^bClipper Version^b 1.29 dtd 04/15/91 (and Summer '87).

^bProblem Statement^b

The ROUND() function, like its predecessor in S'87, does not return
the desired result, in certain cases.

^bCause^b
Unknown.

^bWork Around(s)^b

The following function seems to do the trick:

FUNCTION ROUNDIT(nNumber, nPlaces)
nPlaces := IF( nPlaces == NIL, 0, nPlaces )
RETURN IF(nNumber < 0.0, -1.0, 1.0) * ;
INT( ABS(nNumber) * 10 ^^ nPlaces + 0.50 + 10 ^^ -12 ) / 10 ^^ nPlaces

^bNotes^b
FYI, here are some particularly unique numbers which do not Round() up.
1.265 146.795 8.245 18.435 10.165 16.685
1.025 4.645 8.155 35.105 286.335 4.515 4.225

==============================================================================
RTLINK/DESQVIEW Undocumented parameters.

^bClipper Version^b 1.29 dtd 04/15/91 (and Summer '87).

^bProblem Statement^b

The following edited statement was supplied by a user:

RTLink running inside a DESQview window is not well-behaved.
Unless you issue the following SET commands (either before you enter
DESQview or inside the window where .RTLink will run), it writes outside
its memory area and can crash a system; necessitating a hardware reboot.

SET RTLEMSOFF=1
SET RTLXMSOFF=1

Note: Problem confirmed by Quarterdeck with window protection level 3.
Solution provided by QuarterDeck.

==============================================================================
SAVESCREEN() Undocumented defaults.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

SAVESCREEN() defaults to 0, 0, MaxRow(), MaxCol() if these parameters
are missing.

^bCause^b

N/A.

^bWork Around(s)^b

Annotate your documentation.

==============================================================================

==============================================================================
SCREEN Misc. SETMODE(), SETBLINK(), SETCOLOR()

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) Cursor anomalies. Try using SET CLIPPER=CGACURS if you are
experiencing cursor anomalies. Reference: NG Environment.

2) A 'splash of color' may remain at 0, 65 after using SETCOLOR()
and GET. This can be eliminated by SET SCOREBOARD OFF.

3) SETBLINK(), SETMODE() (NG Function Descriptions)
These are environmental or screen attributes; hence, they will
change the full screen when invoked. You may want to save the
screen before invoking either of these functions.

SETMODE() should be followed by a CLS or CLEAR SCREEN.
The following routine will put the display in 50 row mode and
turn off the cursor - on an IBM PS/2 Model 80.

SetMode(50,80)
Cls
SetCursor(1)
FOR nI := 1.0 to 250; NEXT // Adjust delay as required.
SetCursor(0)

Similar programming is required when returning to 25 row mode.

SETBLINK() is a tricky little devil. Despite the fact that its
alleged default is .T., it may be necessary to issue SetBlink(.T.)
before any blinking will occur. Further, it may be necessary to
re-issue a SetColor(cVar) after the SetBlink(lVar) call. Takes
a little experimentation . Note that a string saved by
Set(_SET_COLOR), containing an * will end up with a + in its
place.

==============================================================================
SET() Missing Documentation.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) SET(_SET_EXTRA, ) and SET(_SET_TYPEAHEAD, ) are missing
from the documentation.

2) SET(_SET_EXTRA) always returns NIL, not it's present state.

^bCause^b

Unknown.

^bWork Around(s)^b

SET(_SET_EXTRA) is similar to SET(_SET_ALTERNATE) and SET(_SET_TYPEAHEAD)
is similar to SET TYPEAHEAD TO. Annotate your documentation.

==============================================================================
SET CLIPPER SET CLIPPER syntax and notes.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

a) There is a problem in 5.01 with how Clipper applications read the
CLIPPER environment variable.

b) The //NOALERT variable is not documented.

^bCause^b

a) Unknown.

b) Documentation omission.

^bWork Around(s)^b

a) Prefix all settings with a // and put a space between them.
Put a colon between the setting and its value. For example:

SET CLIPPER=//F:50 //SWAPPATH:'C:\TEMP' //TEMPPATH:'C:\TEMP'

b) NOALERT may be used to disable any messages provided by the ALERT()
function.

==============================================================================
SET COLOUR Incorrect syntax in STD.CH.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

SET COLOUR directives in STD.CH need to be changed to enable
command recognition.

^bCause^b
Incorrect programming.

^bWork Around(s)^b

#command SET COLOUR TO [<*spec*>] => SetColor( # )
or
#command SET COLOUR TO [<*spec*>] => SET COLOR TO

==============================================================================
SWAPPATH 60 Character limit.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The SWAPPATH environmental statement is limited to 60 characters.

^bCause^b

Unknown

^bWork Around(s)^b

Annotate your documentation.

==============================================================================

==============================================================================
TBROWSE Miscellaneous Comments

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) oTb:Freeze must be defined _after_ the column to be frozen is added
to the browse object.

2) oTb:setColumn returns the browse object, not the column object as
stated in the NG.

3) oTb:colorSpec affects the color outside the browse window. Use
SetColor() before writing to this area.

4) Using oTb:panRight() and oTb:colorRect() together can cause a runaway
situation requiring a warm boot - specifically, this sequence:

oTb:colorRect(), InKey(), oTb:panRight(), oTb:colorRect(), oTb:Stabilize()

A solution is to use oTb:refreshCurrent() in place of the 2nd
oTb:colorRect() or use the sequence:

oTb:colorRect(), InKey(), oTb:colorRect(), oTb:panRight(), oTb:Stabilize()

==============================================================================
TEMPPATH 60 Character limit.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The TEMPPATH environmental statement is limited to 60 characters.

^bCause^b

Unknown

^bWork Around(s)^b

Annotate your documentation.

==============================================================================
==============================================================================
TEXT* TO PRINTER _or_ TO FILE

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

The syntax description, in the documentation, indicates [TO PRINTER]
[TO FILE ()]. Only one of these options may be used at a time.

^bCause^b

STD.CH or documentation error.

^bWork Around(s)^b

Unknown.

==============================================================================
TYPE() Comments on Clipper 5.0 return values.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

1) TYPE("LocalVar" or "StaticVar") returns 'U'.

2) Successive uses of TYPE may produce erroneous values; e.g.,

? TYPE( "{| a | Foo( a ), }" ) // Prints "UE", syntax error.

? TYPE( "{| a | Foo( a ), .T. }" ) // Error has been corrected, but
// TYPE() still returns "UE".
? TYPE( "{| a | Foo( a ), .T. }" ) // This time, TYPE() returns "B".

^bCause^b

1) TYPE("xVar") uses macro expansion to evaluate variables.

2) Unknown.

^bWork Around(s)^b

1) Use VALTYPE(var)

2) Use a function; e.g., the following by Michael Vivino 72210,2630

FUNCTION ChkBlock( cBlock )
TYPE( "{|| .T. }" ) // reset any prior error by passing
// a valid block to type()
RETURN TYPE( cBlock ) == [B] // Now syntax-check the passed block

^bNotes^b

TYPE("Undeclared_Var") Returns 'U'
VALTYPE(Undeclared_Var) Returns runtime error

==============================================================================
TYPEAHEAD Typeahead cannot be set in the 1 to 15 range.

^bClipper Version^b 1.29 dtd 04/15/91.

^bProblem Statement^b

SET TYPEAHEAD TO or SET(_SET_TYPEAHEAD, ) do not react
to numbers less than the DOS buffer (except 0).

^bCause^b

Unknown.

^bWork Around(s)^b per Chuck Friedel [76467,706]

*---------------
FUNCTION strokes ( nCount )
*---------------
* retain specified number of keystrokes (oldest)
*---------------

LOCAL nKey, cChrs := ""

DO WHILE nCount-- > 0 .AND. ( nKey := INKEY() ) # 0
IF nKey < 0 .OR. nKey > 255 // outside CHR()'s range
RETURN NIL
ENDIF
cChrs += CHR( nKey )
ENDDO

KEYBOARD ( cChrs )

RETURN NIL

==============================================================================
\SOURCE\SYS Comments on \CLIPPER5\SOURCE\SYS\ Files.

The following files in the \CLIPPER5\SOURCE\SYS sub-directory
are hard coded in CLIPPER.EXE. They may be modified, compiled
and linked to make changes.

FRMDEF.CH LBLBACK.PRG
FRMBACK.PRG LBLRUN.PRG
FRMRUN.PRG ERRORSYS.PRG
LBLDEF.CH GETSYS.PRG
==============================================================================

Credits That's Thanks Folks!

My Thanks to the Sysops and Members of CompuServe for their
countless hours of cussing, working and losing sleep to present
solutions to the anomalies presented herein. Keep up the Good Work!

This is NOT an official Nantucket(r) publication.

Please report errors and ommissions to: Jo W. French 74730,1751

Note: See Read Me



 December 21, 2017  Add comments

Leave a Reply