2016-10-19 01:24 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)

+ contrib/hbxpp/doc/en/binnumx.txt
  + contrib/hbxpp/doc/en/browse.txt
    * sync more docs with 3.4 fork

  * contrib/hbgt/doc/en/hbgt.txt
    * sync some updates from 3.4 fork
This commit is contained in:
Viktor Szakats
2016-10-19 01:25:24 +02:00
parent ebe3aaf390
commit 24894493d3
4 changed files with 270 additions and 2 deletions

View File

@@ -10,6 +10,14 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2016-10-19 01:24 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
+ contrib/hbxpp/doc/en/binnumx.txt
+ contrib/hbxpp/doc/en/browse.txt
* sync more docs with 3.4 fork
* contrib/hbgt/doc/en/hbgt.txt
* sync some updates from 3.4 fork
2016-10-18 19:16 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
- contrib/hbct/doc/en/ct.txt
* contrib/hbct/doc/en/ctc.txt

View File

@@ -686,8 +686,8 @@
$EXAMPLES$
// Print the setting of the flags in a flag string called ``cDave''
FOR nFlag := 1 to ( hb_BLen( cDave ) * 8 )
? "Flag number ", nFlag, " == ", gt_IsFlag( cDave, nFlag )
FOR nFlag := 1 TO hb_BLen( cDave ) * 8
? "Flag number", nFlag, "==", gt_IsFlag( cDave, nFlag )
NEXT
$SEEALSO$
gt_NewFlag() gt_SetFlag() gt_ClrFlag()

View File

@@ -0,0 +1,209 @@
/*
* Copyright 2000 Chen Kedem <niki@actcom.co.il>
* Documentation for: Bin2W(), Bin2U(), W2Bin(), U2Bin()
*
* See COPYING.txt for licensing terms.
*
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
Bin2W()
$CATEGORY$
API
$SUBCATEGORY$
Conversion
$ONELINER$
Convert unsigned short encoded bytes into Harbour numeric
$SYNTAX$
Bin2W( <cBuffer> ) --> nNumber
$ARGUMENTS$
<cBuffer> is a character string that contains 16-bit encoded unsigned
short integer (least significant byte first). The first two bytes
are taken into account, the rest if any are ignored.
$RETURNS$
Bin2W() return numeric integer (or 0 if <cBuffer> is not a string).
$DESCRIPTION$
Bin2W() is one of the low level binary conversion functions, those
functions convert between Harbour numeric and a character
representation of numeric value. Bin2W() take two bytes of encoded
16-bit unsigned short integer and convert it into standard Harbour
numeric value.
You might ask what is the need for such functions, well, first of
all it allow you to read/write information from/to a binary file
(like extracting information from DBF header), it is also a useful
way to share information from source other than Harbour (C for
instance).
Bin2W() is the opposite of W2Bin()
$EXAMPLES$
// Show header length of a DBF
#include "fileio.ch"
PROCEDURE Main()
LOCAL hFile, cBuffer := Space( 2 )
IF ( hFile := hb_vfOpen( "test.dbf", FO_READ ) ) != NIL
hb_vfSeek( hFile, 8 )
hb_vfRead( hFile, @cBuffer, hb_BLen( cBuffer ) )
? "Length of DBF header in bytes:", Bin2W( cBuffer )
hb_vfClose( hFile )
ELSE
? "Can not open file"
ENDIF
RETURN
$STATUS$
R
$COMPLIANCE$
C
$FILES$
Library is core
$SEEALSO$
Bin2I(), Bin2L(), Bin2U(), I2Bin(), L2Bin(), W2Bin(), Word(), U2Bin()
$END$
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
Bin2U()
$CATEGORY$
API
$SUBCATEGORY$
Conversion
$ONELINER$
Convert unsigned long encoded bytes into Harbour numeric
$SYNTAX$
Bin2U( <cBuffer> ) --> nNumber
$ARGUMENTS$
<cBuffer> is a character string that contains 32-bit encoded unsigned
long integer (least significant byte first). The first four bytes
are taken into account, the rest if any are ignored.
$RETURNS$
Bin2U() return numeric integer (or 0 if <cBuffer> is not a string).
$DESCRIPTION$
Bin2U() is one of the low level binary conversion functions, those
functions convert between Harbour numeric and a character
representation of numeric value. Bin2U() take four bytes of encoded
32-bit unsigned long integer and convert it into standard Harbour
numeric value.
You might ask what is the need for such functions, well, first of
all it allow you to read/write information from/to a binary file
(like extracting information from DBF header), it is also a useful
way to share information from source other than Harbour (C for
instance).
Bin2U() is the opposite of U2Bin()
$EXAMPLES$
// Show number of records in DBF
#include "fileio.ch"
PROCEDURE Main()
LOCAL hFile, cBuffer := Space( 4 )
IF ( hFile := hb_vfOpen( "test.dbf", FO_READ ) ) != NIL
hb_vfSeek( hFile, 4 )
hb_vfRead( hFile, @cBuffer, hb_BLen( cBuffer ) )
? "Number of records in file:", Bin2U( cBuffer )
hb_vfClose( hFile )
ELSE
? "Can not open file"
ENDIF
RETURN
$STATUS$
R
$COMPLIANCE$
XPP
$FILES$
Library is core
$SEEALSO$
Bin2I(), Bin2L(), Bin2W(), I2Bin(), L2Bin(), W2Bin(), Word(), U2Bin()
$END$
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
W2Bin()
$CATEGORY$
API
$SUBCATEGORY$
Conversion
$ONELINER$
Convert Harbour numeric into unsigned short encoded bytes
$SYNTAX$
W2Bin( <nNumber> ) --> cBuffer
$ARGUMENTS$
<nNumber> is a numeric value to convert (decimal digits are ignored).
$RETURNS$
W2Bin() return two bytes character string that contains 16-bit
encoded unsigned short integer (least significant byte first).
$DESCRIPTION$
W2Bin() is one of the low level binary conversion functions, those
functions convert between Harbour numeric and a character
representation of numeric value. W2Bin() take a numeric integer
value and convert it into two bytes of encoded 16-bit unsigned short
integer.
You might ask what is the need for such functions, well, first of
all it allow you to read/write information from/to a binary file
(like extracting information from DBF header), it is also a useful
way to share information from source other than Harbour (C for
instance).
W2Bin() is the opposite of Bin2W()
$STATUS$
R
$COMPLIANCE$
XPP
$FILES$
Library is core
$SEEALSO$
Bin2I(), Bin2L(), Bin2U(), Bin2W(), I2Bin(), L2Bin(), Word(), U2Bin()
$END$
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
U2Bin()
$CATEGORY$
API
$SUBCATEGORY$
Conversion
$ONELINER$
Convert Harbour numeric into unsigned long encoded bytes
$SYNTAX$
U2Bin( <nNumber> ) --> cBuffer
$ARGUMENTS$
<nNumber> is a numeric value to convert (decimal digits are ignored).
$RETURNS$
U2Bin() return four bytes character string that contains 32-bit
encoded unsigned long integer (least significant byte first).
$DESCRIPTION$
U2Bin() is one of the low level binary conversion functions, those
functions convert between Harbour numeric and a character
representation of numeric value. U2Bin() take a numeric integer
value and convert it into four bytes of encoded 32-bit unsigned long
integer.
You might ask what is the need for such functions, well, first of
all it allow you to read/write information from/to a binary file
(like extracting information from DBF header), it is also a useful
way to share information from source other than Harbour (C for
instance).
U2Bin() is the opposite of Bin2U()
$STATUS$
R
$COMPLIANCE$
XPP
$FILES$
Library is core
$SEEALSO$
Bin2I(), Bin2L(), Bin2U(), Bin2W(), I2Bin(), L2Bin(), W2Bin(), Word()
$END$
*/

View File

@@ -0,0 +1,51 @@
/*
* Copyright 1999 Chen Kedem <niki@actcom.co.il>
* Documentation for: dbSkipper()
*
* See COPYING.txt for licensing terms.
*
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
dbSkipper()
$CATEGORY$
API
$SUBCATEGORY$
User interface
$ONELINER$
Helper function to skip a database
$SYNTAX$
dbSkipper( <nRecs> ) --> nSkipped
$ARGUMENTS$
<nRecs> is the number of records to skip relative to current record.
Positive number would try to move the record pointer forward, while
a negative number would try to move the record pointer back <nRecs>
records.
$RETURNS$
dbSkipper() return the number of actual record skipped.
$DESCRIPTION$
dbSkipper() is a helper function used in browse mechanism to skip
a number of records while giving the caller indication about the
actual records skipped.
$EXAMPLES$
// open a file and find if we've got enough records in it
USE month_sales
IF dbSkipper( 100 ) == 100
? "Good work! You can party now"
ELSE
? "Too bad, you should really work harder"
ENDIF
dbCloseArea()
$STATUS$
R
$COMPLIANCE$
XPP
$FILES$
Library is core
$SEEALSO$
dbSkip(), SKIP
$END$
*/