minor doc/comment/test cleanups

This commit is contained in:
Viktor Szakats
2013-03-31 21:35:57 +02:00
parent aaa6a84532
commit 35300e401d
11 changed files with 45 additions and 29 deletions

View File

@@ -10,6 +10,19 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-03-31 21:35 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbgt/tests/test.prg
* doc/en/array.txt
* doc/en/command.txt
* doc/en/rdddb.txt
* doc/en/rddmisc.txt
* doc/en/string.txt
* doc/en/var.txt
* include/dbinfo.ch
* src/rdd/dbcmd53.c
* src/rtl/mouse53.c
* minor doc/comment/test cleanups
2013-03-31 21:22 UTC+0200 Viktor Szakats (harbour syenar.net)
* .gitignore
* deleted .def file as they are now covered by bin/*/ and

View File

@@ -17,7 +17,7 @@ PROCEDURE Main()
HBTEST gt_StrCSPN( "this is a test", "as " ) IS 3
HBTEST gt_StrCSPN( "this is a test", "elnjpq" ) IS 11
HBTEST gt_StrDiff( "the cat", "the rat" ) IS "rat"
HBTEST gt_StrExpand( "HARBOUR", 2, "-" ) IS "H--A--R--B--O--U--R"
HBTEST gt_StrExpand( "Harbour", 2, "-" ) IS "H--a--r--b--o--u--r"
HBTEST gt_StrLeft( "this is a test", "hsit " ) IS 8
HBTEST gt_StrPBRK( "this is a test", "sa " ) IS "s is a test"
HBTEST gt_StrRight( "this is a test", "teas " ) IS 8

View File

@@ -479,8 +479,8 @@
array <aTarget> remains constant.
$EXAMPLES$
LOCAL nCount := 2, nStart := 1, aOne, aTwo
aOne := { "HARBOUR", " is ", "POWER" }
aTwo := { "CLIPPER", " was ", "POWER" }
aOne := { "Harbour", " is ", "Power" }
aTwo := { "Clipper", " was ", "Power" }
ACopy( aOne, aTwo, nStart, nCount )
$STATUS$
R

View File

@@ -235,7 +235,7 @@
METHOD <MethodName>( [<params,...>] ) BLOCK <CodeBlock>
METHOD <MethodName>( [<params,...>] ) EXTERN <NAME>([<args,...>])
METHOD <MethodName>( [<params,...>] ) EXTERN <NAME>( [<args,...>] )
METHOD <MethodName>( [<params,...>] ) SETGET

View File

@@ -128,7 +128,7 @@
This function add a new record to the end of the database
in the selected or aliased work area. All fields in that
database will be given empty data values - character fields
will be filled with blank spaces, date fields with CToD('//'),
will be filled with blank spaces, date fields with hb_SToD(),
numeric fields with 0, logical fields with .F., and memo fields
with NULL bytes. The header of the database is not updated until
the record is flushed from the buffer and the contents are
@@ -137,7 +137,7 @@
Under a networking enviroment, dbAppend() performs an additional
operation: It attrmps to lock the newly added record. If
the database file is currently locked or if a locking assignment
if made to LastRec()+1, NetErr() will return a logical true (.T.)
if made to LastRec() + 1, NetErr() will return a logical true (.T.)
immediately after the dbAppend() function. This function does
not unlock the locked records.
@@ -147,7 +147,7 @@
default for this parameter is a logical false (.F.).
$EXAMPLES$
PROCEDURE Main()
LOCAL cName := "HARBOUR", nId := 10
LOCAL cName := "Harbour", nId := 10
USE test
test->( dbAppend() )
REPLACE test->Name WITH cName, test->Id WITH nId
@@ -721,7 +721,7 @@
$ONELINER$
This function locks the record based on identity
$SYNTAX$
dbRLock([<xIdentity>]) --> lSuccess
dbRLock( [<xIdentity>] ) --> lSuccess
$ARGUMENTS$
<xIdentity> Record identifier
$RETURNS$
@@ -812,7 +812,7 @@
$ONELINER$
Unlocks a record based on its identifier
$SYNTAX$
dbRUnlock([<xIdentity>])
dbRUnlock( [<xIdentity>] )
$ARGUMENTS$
<xIdentity> Record identifier, typically a record number
$DESCRIPTION$
@@ -1012,7 +1012,7 @@
$ONELINER$
Moves the record pointer in the selected work area.
$SYNTAX$
dbSkip([<nRecords>])
dbSkip( [<nRecords>] )
$ARGUMENTS$
<nRecords> Numbers of records to move record pointer.
$DESCRIPTION$

View File

@@ -103,7 +103,7 @@
$ONELINER$
Returns the alias name of a work area
$SYNTAX$
Alias([<nWorkArea>]) --> <cWorkArea>
Alias( [<nWorkArea>] ) --> <cWorkArea>
$ARGUMENTS$
<nWorkArea> Number of a work area
$RETURNS$
@@ -696,7 +696,7 @@
$ONELINER$
Tests the success of a network function
$SYNTAX$
NetErr([<lNewError>]) --> lError
NetErr( [<lNewError>] ) --> lError
$ARGUMENTS$
<lNewError> Is a logical Expression.
$RETURNS$
@@ -714,11 +714,14 @@
This allow the run-time error-handling system to control the way
certain errors are handled.
$EXAMPLES$
USE test NEW INDEX test
USE test NEW
IF ! NetErr()
SEEK test->Name := "HARBOUR"
INDEX ON field->First TO test
SET INDEX TO test
test->First := "Harbour"
SEEK "Harbour"
IF Found()
? test->Name
? test->First
ENDIF
ENDIF
USE
@@ -919,7 +922,7 @@
$ONELINER$
Returns the work area number for a specified alias.
$SYNTAX$
Select([<cAlias>]) --> nWorkArea
Select( [<cAlias>] ) --> nWorkArea
$ARGUMENTS$
<cAlias> is the target work area alias name.
$RETURNS$

View File

@@ -423,7 +423,7 @@
SubStr( <cString>, 1, <nLen> )
$EXAMPLES$
? Left( "HELLO HARBOUR", 5 ) // HELLO
? Left( "Hello Harbour", 5 ) // Hello
$STATUS$
R
$COMPLIANCE$
@@ -464,7 +464,7 @@
SubStr( <cString>, Len( <cString> ) - <nLen> + 1, <nLen> )
$EXAMPLES$
? Right( "HELLO HARBOUR", 5 ) // RBOUR
? Right( "Hello Harbour", 5 ) // rbour
$STATUS$
R
$COMPLIANCE$
@@ -511,9 +511,9 @@
characters from <nStart> to the end of the string is less than <nLen>
the rest are ignored.
$EXAMPLES$
? SubStr( "HELLO HARBOUR" , 7, 4 ) // HARB
? SubStr( "HELLO HARBOUR" , -3, 3 ) // OUR
? SubStr( "HELLO HARBOUR" , 7 ) // HARBOUR
? SubStr( "Hello Harbour" , 7, 4 ) // Harb
? SubStr( "Hello Harbour" , -3, 3 ) // our
? SubStr( "Hello Harbour" , 7 ) // Harbour
$STATUS$
R
$COMPLIANCE$
@@ -1157,10 +1157,10 @@
This function returns the string <cExpression> will all leading and
trailing blank spaces removed.
$EXAMPLES$
? AllTrim( "HELLO HARBOUR" )
? AllTrim( " HELLO HARBOUR" )
? AllTrim( "HELLO HARBOUR " )
? AllTrim( " HELLO HARBOUR " )
? AllTrim( "Hello Harbour" )
? AllTrim( " Hello Harbour" )
? AllTrim( "Hello Harbour " )
? AllTrim( " hello Harbour " )
$STATUS$
R
$COMPLIANCE$

View File

@@ -838,7 +838,7 @@
PROCEDURE Main()
? ValType( Array( 1 ) ) // "A"
? ValType( {|| 1 + 1 } ) // "B"
? ValType( "HARBOUR" ) // "C"
? ValType( "Harbour" ) // "C"
? ValType( Date() ) // "D"
? ValType( .T. ) // "L"
? ValType( 1 ) // "N"

View File

@@ -268,7 +268,7 @@
#define DBI_DB_VERSION 101 /* Version of the Host driver */
#define DBI_RDD_VERSION 102 /* current RDD's version */
/* HARBOUR extension */
/* Harbour extension */
#define DBI_LOCKSCHEME 128 /* Locking scheme used by RDD */
#define DBI_ISREADONLY 129 /* Was the file opened readonly? */
#define DBI_ROLLBACK 130 /* Rollback changes made to current record */

View File

@@ -285,7 +285,7 @@ HB_FUNC( ORDISUNIQUE )
if( ! pOrderInfo.itmOrder )
pOrderInfo.itmOrder = hb_param( 1, HB_IT_NUMERIC );
pOrderInfo.atomBagName = hb_param( 2, HB_IT_STRING );
/* HARBOUR extension: NewVal to set/reset unique flag */
/* Harbour extension: NewVal to set/reset unique flag */
pOrderInfo.itmNewVal = hb_param( 3, HB_IT_LOGICAL );
pOrderInfo.itmResult = hb_itemPutL( NULL, HB_FALSE );
SELF_ORDINFO( pArea, DBOI_UNIQUE, &pOrderInfo );

View File

@@ -48,7 +48,7 @@
#include "hbapigt.h"
/* HARBOUR callable interface */
/* Harbour callable interface */
#ifdef HB_COMPAT_C53