c:\harbour\doc\en\array.txt |
/*
* $Id: array.txt 9192 2008-08-19 14:17:51Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999 Chen Kedem
* Documentation for: ASORT()
*
* Copyright 1999 Luiz Rafael Culik
* Documentation for: ARRAY(), AADD(), ACLONE(), ACOPY(), ASIZE(),
* ATAIL(), AINS(), ADEL(), AFILL(), ASCAN(), AEVAL()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* ARRAY()
* $CATEGORY$
* Array
* $ONELINER$
* Create an uninitialized array of specified length
* $SYNTAX$
* ARRAY( [, ...] ) --> aArray
* $ARGUMENTS$
* is the number of elements in the specified dimension.
* $RETURNS$
* an array of specified dimensions.
* $DESCRIPTION$
* This function returns an uninitialized array with the length of
* . Nested arrays are uninitialized within the same array
* pointer reference if additional parameters are specified.
* Establishing a memory variable with the same name as the array may
* destroy the original array and release the entire contents of the
* array. This depends, of course, on the data storage type of either
* the array or the variable with the same name as the array.
* $EXAMPLES$
* FUNCTION Main()
* LOCAL aArray:=Array(10)
* LOCAL x:=1
* FOR x:=1 to LEN(aArray)
* aArray[x]:=Array(x)
* NEXT
* Return Nil
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper Compliant in all Cases, except that
* arrays in Harbour can have an unlimited number of dimensions, while
* Clipper has a limit of 4096 array elements.
* $FILES$
* Library is vm
* $SEEALSO$
* AADD(),ADEL(),AFILL(),AINS()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AADD()
* $CATEGORY$
* Array
* $ONELINER$
* Dynamically add an element to an array
* $SYNTAX$
* AADD([, ]) --> Value
* $ARGUMENTS$
* The name of an array
*
* Element to add to array
* $RETURNS$
* if specified , will return , otherwise this
* function returns a NIL value.
* $DESCRIPTION$
* This function dynamically increases the length of the array named
* by one element and stores the value of to that
* newly created element.
*
* may be an array reference pointer, which in turn may be
* stored to an array's subscript position.
* $EXAMPLES$
* LOCAL aArray:={}
* AADD(aArray,10)
* FOR x:=1 to 10
* AADD(aArray,x)
* NEXT
* $STATUS$
* R
* $FILES$
* Library is vm
* $SEEALSO$
* AINS(),ASIZE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ASIZE()
* $CATEGORY$
* Array
* $ONELINER$
* Adjust the size of an array
* $SYNTAX$
* ASIZE(, ) --> aTarget
* $ARGUMENTS$
* Name of array to be dynamically altered
*
* Numeric value representing the new size of
* $RETURNS$
* an array pointer reference to .
* $DESCRIPTION$
* This function will dynamically increase or decrease the size of
* by adjusting the length of the array to subscript
* positions.
*
* If the length of the array is shortened, those former
* subscript positions are lost. If the length of the array is
* lengthened a NIL value is assigned to the new subscript position.
* $EXAMPLES$
* aArray := { 1 } // Result: aArray is { 1 }
* ASIZE(aArray, 3) // Result: aArray is { 1, NIL, NIL }
* ASIZE(aArray, 1) // Result: aArray is { 1 }
* $STATUS$
* R
* $COMPLIANCE$
* If HB_COMPAT_C53 is defined, the function generates an Error,
* else it will return the array itself.
* $FILES$
* Library is vm
* $SEEALSO$
* AADD(),ADEL(),AFILL(),AINS()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ATAIL()
* $CATEGORY$
* Array
* $ONELINER$
* Returns the rightmost element of an array
* $SYNTAX$
* ATAIL( ) --> Element
* $ARGUMENTS$
* is the array.
* $RETURNS$
* the expression of the last element in the array.
* $DESCRIPTION$
* This function return the value of the last element in the array
* named . This function does not alter the size of the
* array or any of the subscript values.
* $EXAMPLES$
* LOCAL array:= {"Harbour", "is", "Supreme", "Power"}
* ? ATAIL(aArray)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is vm
* $SEEALSO$
* LEN(),ARRAY(),ASIZE(),AADD()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AINS()
* $CATEGORY$
* Array
* $ONELINER$
* Insert a NIL value at an array subscript position.
* $SYNTAX$
* AINS( , ) --> aTarget
* $ARGUMENTS$
* Array name.
*
* Subscript position in
* $RETURNS$
* an array pointer reference.
* $DESCRIPTION$
* This function inserts a NIL value in the array named
* at the th position.
*
* All array elements starting with the th position will be
* shifted down one subscript position in the array list and the
* last item in the array will be removed completely. In other words,
* if an array element were to be inserted at the fifth subscript
* position, the element previously in the fifth position would now
* be located at the sixth position. The length of the array
* will remain unchanged.
* $EXAMPLES$
* LOCAL aArray:={"Harbour","is","Power!","!!!"}
* AINS(aArray,4)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is vm
* $SEEALSO$
* AADD(),ACOPY(),ADEL(),AEVAL(),AFILL(),ASIZE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ADEL()
* $CATEGORY$
* Array
* $ONELINER$
* Delete an element form an array.
* $SYNTAX$
* ADEL(, ) --> aTarget
* $ARGUMENTS$
* Name of array from which an element is to be removed.
*
* Subscript of the element to be removed.
* $RETURNS$
* an array pointer reference.
* $DESCRIPTION$
* This function deletes the element found at subscript position
* in the array . All elements in the array below the
* given subscript position will move up one position in the
* array. In other words, what was formerly the sixth subscript position
* will become the fifth subscript position. The length of the array
* will remain unchanged,as the last element in the array will
* become a NIL data type.
* $EXAMPLES$
* LOCAL aArray
* aArray := { "Harbour","is","Power" } // Result: aArray is
*
* ADEL(aArray, 2) // Result: aArray is
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is vm
* $SEEALSO$
* ACOPY(),AINS(),AFILL()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AFILL()
* $CATEGORY$
* Array
* $ONELINER$
* Fill an array with a specified value
* $SYNTAX$
* AFILL( , , [], [] ) --> aTarget
* $ARGUMENTS$
* Name of array to be filled.
*
* Expression to be globally filled in
*
* Subscript starting position
*
* Number of subscript to be filled
* $RETURNS$
* an array pointer.
* $DESCRIPTION$
* This function will fill each element of an array named with
* the value . If specified, denotes the beginning
* element to be filled and the array elements will continue to be
* filled for positions. If Not specified, the value of
* will be 1, and the value of will be the value
* of LEN(); thus, all subscript positions in the array
* will be filled with the value of .
*
* This function will work on only a single dimension of .
* If there are array pointer references within a subscript ,
* those values will be lost, since this function will overwrite those
* values with new values.
* $EXAMPLES$
* LOCAL aTest:={Nil,0,1,2}
* Afill(aTest,5)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is vm
* $SEEALSO$
* AADD(),AEVAL(),DBSTRUCT(),DIRECTORY()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ASCAN()
* $CATEGORY$
* Array
* $ONELINER$
* Scan array elements for a specified condition
* $SYNTAX$
* ASCAN( , , [], [] ) --> nStoppedAt
* $ARGUMENTS$
* Name of array to be scanned.
*
* Expression to search for in
*
* Beginning subscript position at which to start the search.
*
* Number of elements to scan with .
* $RETURNS$
* A numeric value of subscript position where
* was found.
* $DESCRIPTION$
* This function scan the content of array named for the
* value of . The return value is the position in the array
* in which was found. If it was not found, the
* return value will be 0.
*
* If specified, the beginning subscript position at which to start
* scanning may be set with the value passed as . The default
* is 1.
*
* If specified, the number of array elements to scan may be set with
* the value passed as . The default is the number of elements
* in the array .
*
* If is a code block, the operation of the function is
* slightly different. Each array subscript pointer reference is
* passed to the code block to be evaluated. The scanning routine
* will continue until the value obtained from the code block is a
* logical true (.T.) or until the end of the array has been reached.
* $EXAMPLES$
* aDir:=Directory("*.prg")
* AScan(aDir,,,{|x,y| x[1]="Test.prg"})
* $STATUS$
* R
* $COMPLIANCE$
* This function is not CA-Cl*pper compatible. Clipper ASCAN() is affected by the SET EXACT ON/OFF Condition
* $FILES$
* Library is vm
* $SEEALSO$
* AEVAL()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AEVAL()
* $CATEGORY$
* Array
* $ONELINER$
* Evaluated the subscript element of an array
* $SYNTAX$
* AEVAL(, , [], []) --> aArray
* $ARGUMENTS$
* Is the array to be evaluated.
*
* Is a code block to evaluate for each element processed.
*
* The beginning array element to evaluate.
*
* The number of elements to process.
* $RETURNS$
* an array pointer reference.
* $DESCRIPTION$
* This function will evaluate and process the subscript elements
* in . A code block passed as defines the operation
* to be executed on each element of the array. All elements in
* will be evaluated unless specified by a beginning subscript position
* in for elements.
*
* Two parameters are passed to the code block . The individual
* elements in an array are the first parameter and the subscript position
* is the second.
*
* AEVAL() does not replace a FOR...NEXT loop for processing arrays. If
* an array is an autonomous unit, AEVAL() is appropriate. If the array
* is to be altered or if elements are to be reevaluated, a FOR...NEXT
* loop is more appropriate.
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is vm
* $SEEALSO$
* EVAL(),DBEVAL()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ACOPY()
* $CATEGORY$
* Array
* $ONELINER$
* Copy elements from one array to another
* $SYNTAX$
* ACOPY( , , [], [], [] )
* --> aTarget
* $ARGUMENTS$
* is the array to copy elements from.
*
* is the array to copy elements to.
*
* is the beginning subscript position to copy from
*
* the number of subscript elements to copy from .
*
* the starting subscript position in to copy
* elements to.
* $RETURNS$
* an array pointer reference
* $DESCRIPTION$
* This function copies array elements from to .
* is the beginning element to be copied from ;
* the default is 1.
*
* is the number of elements to be copied from ;
* the default is the entire array.
*
* is the subscript number in the target array,,
* to which array elements are to be copied; the default is 1
*
* This function will copy all data types in to .
*
* If an array element in is a pointer reference to another
* array, that array pointer will be copied to ; not all
* subdimensions will be copied from one array to the next. This must
* be accomplished via the ACLONE() function.
*
* Note
* If array is larger then , array elements will
* start copying at and continue copying until the end
* of array is reached. The ACOPY() function doesn't append
* subscript positions to the target array, the size of the target
* array remains constant.
* $EXAMPLES$
* LOCAL nCount := 2, nStart := 1, aOne, aTwo
* aOne := {"HABOUR"," is ","POWER"}
* aTwo := {"CLIPPER"," was ","POWER"}
* ACOPY(aOne, aTwo, nStart, nCount)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is vm
* $SEEALSO$
* ACLONE(),ADEL(),AEVAL(),AFILL(),AINS(),ASORT()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ACLONE()
* $CATEGORY$
* Array
* $ONELINER$
* Duplicate a multidimensional array
* $SYNTAX$
* ACLONE() --> aDuplicate
* $ARGUMENTS$
* Name of the array to be cloned.
* $RETURNS$
* A new array pointer reference complete with nested
* array values.
* $DESCRIPTION$
* This function makes a complete copy of the array expressed as
* and return a cloned set of array values. This provides
* a complete set of arrays values for all dimensions within the
* original array
* $EXAMPLES$
* LOCAL aOne, aTwo
* aOne := {"Harbour"," is ","POWER"}
* aTwo := ACLONE(aOne) // Result: aTwo is {1, 2, 3}
* aOne[1] := "The Harbour Compiler" // Result: aOne is {99, 2, 3}
* // aTwo is still {1, 2, 3}
* $STATUS$
* R
* $COMPLIANCE$
* Clipper will return NIL if the parameter is not an array.
* $FILES$
* Library is vm
* $SEEALSO$
* ACOPY(),ADEL(),AINS(),ASIZE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ASORT()
* $CATEGORY$
* Array
* $ONELINER$
* Sort an array
* $SYNTAX$
* ASORT( , [], [], [] ) --> aArray
* $ARGUMENTS$
* Array to be sorted.
*
* The first element to start the sort from, default is 1.
*
* Number of elements starting from to sort, default
* is all elements.
*
* Code block for sorting order, default is ascending order
* {| x, y | x < y }. The code block should accept two parameters and
* must return .T. if the sort is in order, .F. if not.
* $RETURNS$
* reference to the now sorted or NIL if the
* passed is not an array.
* $DESCRIPTION$
* ASORT() sort all or part of a given array. If is omitted,
* the function expect to be one dimensional array containing
* single data type (one of: Character, Date, Logical, Numeric) and sort
* this array in ascending order: Character are sorted by their ASCII
* value, Dates are sorted chronologically, Logical put .F. values before
* .T., Numeric are sorted by their value.
*
* If is specified, it is used to handle the sorting order. With
* each time the block is evaluate, two array elements are passed to the
* code block, and must return a logical value that state if
* those elements are in order (.T.) or not (.F.). Using this block you
* can sort multidimensional array, descending orders or even (but why
* would you want to do that) sort array that contain different data
* type.
* $EXAMPLES$
* // sort numeric values in ascending order
* ASORT( { 3, 1, 4, 42, 5, 9 } ) // result: { 1, 3, 4, 5, 9, 42 }
*
* // sort character strings in descending lexical order
* aKeys := { "Ctrl", "Alt", "Delete" }
* bSort := {| x, y | UPPER( x ) > UPPER( y ) }
* ASORT( aKeys,,, bSort ) // result: { "Delete", "Ctrl", "Alt" }
*
* // sort two-dimensional array according to 2nd element of each pair
* aPair := { {"Sun",8}, {"Mon",1}, {"Tue",57}, {"Wed",-6} }
* ASORT( aPair,,, {| x, y | x[2] < y[2] } )
* // result: { {"Wed",-6}, {"Mon",1}, {"Sun",8}, {"Tue",57} }
* $STATUS$
* R
* $COMPLIANCE$
* Codeblock calling frequency and order differs from Clipper, since
* Harbour uses a different (faster) sorting algorithm (quicksort).
* $FILES$
* Library is vm
* $SEEALSO$
* ASCAN(),EVAL(),SORT
* $END$
*/
|
c:\harbour\doc\en\binnum.txt |
/*
* $Id: binnum.txt 9191 2008-08-19 13:11:22Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Chen Kedem
* Documentation for: BIN2W(), BIN2I(), BIN2L(), BIN2U(), I2BIN(), W2BIN(),
* L2BIN(), U2BIN()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* BIN2W()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert unsigned short encoded bytes into Harbour numeric
* $SYNTAX$
* BIN2W( ) --> nNumber
* $ARGUMENTS$
* is a character string that contain 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 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
* FUNCTION main()
* LOCAL nHandle, cBuffer := space( 2 )
* nHandle := fopen( "test.dbf" )
* IF nHandle > 0
* fseek( nHandle, 8 )
* fread( nHandle, @cBuffer, 2 )
* ? "Length of DBF header in bytes:", BIN2W( cBuffer )
* fclose( nHandle )
* ELSE
* ? "Can not open file"
* ENDIF
* RETURN NIL
* $STATUS$
* R
* $COMPLIANCE$
* BIN2W() works exactly like CA-Cl*pper's BIN2W()
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2U(),I2BIN(),L2BIN(),W2BIN(),WORD(),U2BIN(),FREAD()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* BIN2I()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert signed short encoded bytes into Harbour numeric
* $SYNTAX$
* BIN2I( ) --> nNumber
* $ARGUMENTS$
* is a character string that contain 16 bit encoded signed
* short integer (least significant byte first). The first two bytes
* are taken into account, the rest if any are ignored.
* $RETURNS$
* BIN2I() return numeric integer (or 0 if is not a string).
* $DESCRIPTION$
* BIN2I() is one of the low level binary conversion functions, those
* functions convert between Harbour numeric and a character
* representation of numeric value. BIN2I() take two bytes of encoded
* 16 bit signed 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).
* BIN2I() is the opposite of I2BIN()
* $EXAMPLES$
* // Show DBF last update date
* FUNCTION main()
* LOCAL nHandle, cYear, cMonth, cDay
* nHandle := fopen( "test.dbf" )
* IF nHandle > 0
* fseek( nHandle, 1 )
* cYear := cMonth := cDay := " "
* fread( nHandle, @cYear , 1 )
* fread( nHandle, @cMonth, 1 )
* fread( nHandle, @cDay , 1 )
* ? "Last update:", BIN2I( cYear ), BIN2I( cMonth ), BIN2I( cDay )
* fclose( nHandle )
* ELSE
* ? "Can not open file"
* ENDIF
* RETURN NIL
* $STATUS$
* R
* $COMPLIANCE$
* BIN2I() works exactly like CA-Cl*pper's BIN2I()
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2L(),BIN2U(),BIN2W(),I2BIN(),L2BIN(),W2BIN(),WORD(),U2BIN(),FREAD()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* BIN2L()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert signed long encoded bytes into Harbour numeric
* $SYNTAX$
* BIN2L( ) --> nNumber
* $ARGUMENTS$
* is a character string that contain 32 bit encoded signed
* long integer (least significant byte first). The first four bytes
* are taken into account, the rest if any are ignored.
* $RETURNS$
* BIN2L() return numeric integer (or 0 if is not a string).
* $DESCRIPTION$
* BIN2L() is one of the low level binary conversion functions, those
* functions convert between Harbour numeric and a character
* representation of numeric value. BIN2L() take four bytes of encoded
* 32 bit signed 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).
* BIN2L() is the opposite of L2BIN()
* $EXAMPLES$
* // Show number of records in DBF
* FUNCTION main()
* LOCAL nHandle, cBuffer := space( 4 )
* nHandle := fopen( "test.dbf" )
* IF nHandle > 0
* fseek( nHandle, 4 )
* fread( nHandle, @cBuffer, 4 )
* ? "Number of records in file:", BIN2L( cBuffer )
* fclose( nHandle )
* ELSE
* ? "Can not open file"
* ENDIF
* RETURN NIL
* $STATUS$
* R
* $COMPLIANCE$
* BIN2L() works exactly like CA-Cl*pper's BIN2L()
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2U(),BIN2W(),I2BIN(),L2BIN(),W2BIN(),WORD(),U2BIN(),FREAD()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* BIN2U()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert unsigned long encoded bytes into Harbour numeric
* $SYNTAX$
* BIN2U( ) --> nNumber
* $ARGUMENTS$
* is a character string that contain 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 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
* FUNCTION main()
* LOCAL nHandle, cBuffer := space( 4 )
* nHandle := fopen( "test.dbf" )
* IF nHandle > 0
* fseek( nHandle, 4 )
* fread( nHandle, @cBuffer, 4 )
* ? "Number of records in file:", BIN2U( cBuffer )
* fclose( nHandle )
* ELSE
* ? "Can not open file"
* ENDIF
* RETURN NIL
* $STATUS$
* R
* $COMPLIANCE$
* BIN2U() is an XBase++ compatibility function and does not exist
* as a standard CA-Cl*pper 5.x function.
* This function is only visible if source/rtl/binnum.c was compiled
* with the HB_COMPAT_XPP flag.
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2W(),I2BIN(),L2BIN(),W2BIN(),WORD(),U2BIN(),FREAD()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* I2BIN()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert Harbour numeric into signed short encoded bytes
* $SYNTAX$
* I2BIN( ) --> cBuffer
* $ARGUMENTS$
* is a numeric value to convert (decimal digits are ignored).
* $RETURNS$
* I2BIN() return two bytes character string that contain 16 bit
* encoded signed short integer (least significant byte first).
* $DESCRIPTION$
* I2BIN() is one of the low level binary conversion functions, those
* functions convert between Harbour numeric and a character
* representation of numeric value. I2BIN() take a numeric integer
* value and convert it into two bytes of encoded 16 bit signed 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).
* I2BIN() is the opposite of BIN2I()
* $EXAMPLES$
* // Update DBF "last update" date
* #include "fileio.ch"
* FUNCTION main()
* LOCAL nHandle, cYear, cMonth, cDay
* use test
* ? "Original update date is:", lupdate()
* close
* nHandle := fopen( "test.dbf", FO_READWRITE )
* IF nHandle > 0
* fseek( nHandle, 1, )
* cYear := I2BIN( 68 )
* cMonth := I2BIN( 8 )
* cDay := I2BIN( 1 )
* fwrite( nHandle, cYear , 1 ) // write only the first byte
* fwrite( nHandle, cMonth, 1 )
* fwrite( nHandle, cDay , 1 )
* fclose( nHandle )
* use test
* ? "New update date is:", lupdate()
* close
* ELSE
* ? "Can not open file"
* ENDIF
* RETURN NIL
* $STATUS$
* R
* $COMPLIANCE$
* I2BIN() works exactly like CA-Cl*pper's I2BIN()
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2U(),BIN2W(),L2BIN(),W2BIN(),WORD(),U2BIN(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* W2BIN()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert Harbour numeric into unsigned short encoded bytes
* $SYNTAX$
* W2BIN( ) --> cBuffer
* $ARGUMENTS$
* is a numeric value to convert (decimal digits are ignored).
* $RETURNS$
* W2BIN() return two bytes character string that contain 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$
* W2BIN() is an XBase++ compatibility function and does not exist
* as a standard CA-Cl*pper 5.x function.
* This function is only visible if source/rtl/binnum.c was compiled
* with the HB_COMPAT_XPP flag.
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2U(),BIN2W(),I2BIN(),L2BIN(),WORD(),U2BIN(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* L2BIN()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert Harbour numeric into signed long encoded bytes
* $SYNTAX$
* L2BIN( ) --> cBuffer
* $ARGUMENTS$
* is a numeric value to convert (decimal digits are ignored).
* $RETURNS$
* L2BIN() return four bytes character string that contain 32 bit
* encoded signed long integer (least significant byte first).
* $DESCRIPTION$
* L2BIN() is one of the low level binary conversion functions, those
* functions convert between Harbour numeric and a character
* representation of numeric value. L2BIN() take a numeric integer
* value and convert it into four bytes of encoded 32 bit signed 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).
* L2BIN() is the opposite of BIN2L()
* $STATUS$
* R
* $COMPLIANCE$
* L2BIN() works exactly like CA-Cl*pper's L2BIN()
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2U(),BIN2W(),I2BIN(),W2BIN(),WORD(),U2BIN(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* U2BIN()
* $CATEGORY$
* Binary conversion
* $ONELINER$
* Convert Harbour numeric into unsigned long encoded bytes
* $SYNTAX$
* U2BIN( ) --> cBuffer
* $ARGUMENTS$
* is a numeric value to convert (decimal digits are ignored).
* $RETURNS$
* U2BIN() return four bytes character string that contain 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$
* U2BIN() is an XBase++ compatibility function and does not exist
* as a standard CA-Cl*pper 5.x function.
* This function is only visible if source/rtl/binnum.c was compiled
* with the HB_COMPAT_XPP flag.
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2U(),BIN2W(),I2BIN(),L2BIN(),W2BIN(),WORD(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* WORD()
* $CATEGORY$
* Conversion
* $ONELINER$
* Converts double to integer values.
* $SYNTAX$
* WORD( ) -->
* $ARGUMENTS$
* is a numeric double value.
* $RETURNS$
* WORD() return an integer in the range +-32767
* $DESCRIPTION$
* This function converts double values to integers to use
* within the CALL command
* $STATUS$
* R
* $COMPLIANCE$
* The Clipper NG states that WORD() will only work when used in CALL
* commands parameter list, otherwise it will return NIL, in Harbour
* it will work anywhere.
* $FILES$
* Library is rtl
* $SEEALSO$
* CALL
* $END$
*/
|
c:\harbour\doc\en\browse.txt |
/*
* $Id: browse.txt 9191 2008-08-19 13:11:22Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999 Chen Kedem
* Documentation for: BROWSE(), DBEDIT(), TBROWSEDB(), DBSKIPPER()
*
* See doc/license.txt for licensing terms.
*
*/
/* TODO: put more comprehensive $EXAMPLES$.
DBEDIT() is a complex function, the doc I had made cover all the
parameters but probably not good enough for a new user that does
not know what this function is all about and how to use it. I am
not that good with the English language (and I did not want to
COPY the NG text) I suggest later some one should add to this
text. [chkedem] */
/* $DOC$
* $FUNCNAME$
* DBEDIT()*
* $CATEGORY$
* Data input and output
* $ONELINER$
* Browse records in a table
* $SYNTAX$
* DBEDIT( [], [], [], [], [], [], [], [], [], [], [], [] ) --> lOk
* $ARGUMENTS$
* coordinate for top row display. could range from 0
* to MAXROW(), default is 0.
*
* coordinate for left column display. could range
* from 0 to MAXCOL(), default is 0.
*
* coordinate for bottom row display. could range
* from 0 to MAXROW(), default is MAXROW().
*
* coordinate for right column display. could range
* from 0 to MAXCOL(), default is MAXCOL().
*
* is an array of character expressions that contain
* database fields names or expressions to display in each column.
* If not specified, the default is to display all fields from the
* database in the current work area.
*
* is a name of a user defined function or a code block
* that would be called every time unrecognized key is been pressed or
* when there are no keys waiting to be processed and DBEDIT() goes
* into idle mode. If is a character string, it must
* contain root name of a valid user define function without
* parentheses. Both the user define function or the code block should
* accept two parameters: nMode, nCurrentColumn. Both should return
* a numeric value that correspond to one of the expected return codes
* (see table below for a list of nMode and return codes).
*
* is an optional picture. If
* is a character string, all columns would used this value as a
* picture string. If is an array, each element
* should be a character string that correspond to a picture string
* for the column with the same index. Look at the help for @...SAY
* to get more information about picture values.
*
* contain the header titles for each column, if this
* is a character string, all columns would have that same header, if
* this is an array, each element is a character string that contain
* the header title for one column. Header may be split to more than
* one line by placing semicolon (;) in places where you want to break
* line. If omitted, the default value for each column header is taken
* from or field name if was not specified.
*
* is an array that contain characters that draw
* the lines separating the headers and the fields data. Instead of an
* array you can use a character string that would be used to display
* the same line for all fields. Default value is a double line.
*
* is an array that contain characters that draw
* the lines separating displayed columns. Instead of an array you can
* use a character string that would be used to display the same line
* for all fields. Default value is a single line.
*
* is an array that contain characters that draw
* the lines separating the fields data area and the footing area.
* Instead of an array you can use a character string that would be
* used to display the same line for all footers. Default is to have to
* no footing separators.
*
* contain the footing to be displayed at the bottom
* of each column, if this is a character string, all columns would
* have that same footer, if this is an array, each element is a
* character string that contain the footer for one column. Footer may
* be split to more than one line by placing semicolon (;) in places
* where you want to break line. If omitted, no footer are displayed.
* $RETURNS$
* DBEDIT() return .F. if there is no database in use or if the number
* of columns to display is zero, else DBEDIT() return .T.
* $DESCRIPTION$
* DBEDIT() display and edit records from one or more work areas in
* a grid on screen. Each column is defined by element from
* and is the equivalent of one field. Each row is equivalent of one
* database record.
* Following are active keys that handled by DBEDIT():
* ---------------------------------------------------
*
*
* Key Meaning
*
* Left Move one column to the left (previous field)
* Right Move one column to the right (next field)
* Up Move up one row (previous record)
* Down Move down one row (next record)
* Page-Up Move to the previous screen
* Page-Down Move to the next screen
* Ctrl Page-Up Move to the top of the file
* Ctrl Page-Down Move to the end of the file
* Home Move to the leftmost visible column
* End Move to the rightmost visible column
* Ctrl Left Pan one column to the left
* Ctrl Right Pan one column to the right
* Ctrl Home Move to the leftmost column
* Ctrl End Move to the rightmost column
*
* When is omitted, two more keys are active:
*
* Key Meaning
*
* Esc Terminate BROWSE()
* Enter Terminate BROWSE()
*
*
* When DBEDIT() execute it pass the following arguments:
* nMode and the index of current record in . If
* is omitted, the index number is the FIELD() number of the open
* database structure.
*
* DBEDIT() nMode could be one of the following:
* ---------------------------------------------
*
*
* Dbedit.ch Meaning
*
* DE_IDLE DBEDIT() is idle, all movement keys have been handled.
* DE_HITTOP Attempt to cursor past top of file.
* DE_HITBOTTOM Attempt to cursor past bottom of file.
* DE_EMPTY No records in work area, database is empty.
* DE_EXCEPT Key exception.
*
*
* The user define function or code block must return a value that tell
* DBEDIT() what to do next.
*
* User function return codes:
* ---------------------------
*
*
* Dbedit.ch Value Meaning
*
* DE_ABORT 0 Abort DBEDIT().
* DE_CONT 1 Continue DBEDIT() as is.
* DE_REFRESH 2 Force reread/redisplay of all data rows.
*
*
* The user function is called once in each of the following cases:
* - The database is empty.
* - The user try to move past top of file or past bottom file.
* - Key exception, the uses had pressed a key that is not handled by DBEDIT().
* - The keyboard buffer is empty or a screen refresh had just occurred
* DBEDIT() is a compatibility function, it is superseded by the
* TBrowse class and there for not recommended for new applications.
* $EXAMPLES$
* // Browse a file using default values
* USE Test
* DBEDIT()
*
* $STATUS$
* S
* $COMPLIANCE$
* can take a code block value, this is a Harbour
* extension.
* CA-Cl*pper will throw an error if there's no database open, Harbour
* would return .F.
* CA-Cl*pper is buggy and will throw an error if the number of columns
* zero, Harbour would return .F.
* The CA-Cl*pper 5.2 NG state that the return value is NIL, this is
* wrong and should be read logical.
* There is an undocumented result code (3) from the user defined
* function in Clipper (both 87 and 5.x). This is an Append Mode which:
* "split the screen to allow data to be appended in windowed area".
* This mode is not supported by Harbour.
* $FILES$
* Header files are dbedit.ch, inkey.ch
* Library is rtl
* $SEEALSO$
* @...SAY,BROWSE(),TBrowse class,TRANSFORM()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* BROWSE()
* $CATEGORY$
* Data input and output
* $ONELINER$
* Browse a database file
* $SYNTAX$
* BROWSE( [, , , ] ) --> lOk
* $ARGUMENTS$
* coordinate for top row display.
*
* coordinate for left column display.
*
* coordinate for bottom row display.
*
* coordinate for right column display.
* $RETURNS$
* BROWSE() return .F. if there is no database open in this work area,
* else it return .T.
* $DESCRIPTION$
* BROWSE() is a general purpose database browser, without any
* thinking you can browse a file using the following keys:
*
*
* Key Meaning
*
* Left Move one column to the left (previous field)
* Right Move one column to the right (next field)
* Up Move up one row (previous record)
* Down Move down one row (next record)
* Page-Up Move to the previous screen
* Page-Down Move to the next screen
* Ctrl Page-Up Move to the top of the file
* Ctrl Page-Down Move to the end of the file
* Home Move to the leftmost visible column
* End Move to the rightmost visible column
* Ctrl Left Pan one column to the left
* Ctrl Right Pan one column to the right
* Ctrl Home Move to the leftmost column
* Ctrl End Move to the rightmost column
* Esc Terminate BROWSE()
*
* On top of the screen you see a status line with the following
* indication:
*
*
* Record ###/### Current record number / Total number of records.
* There are no records, the file is empty.
* You are in append mode at the bottom of file.
* Current record is deleted.
* You are at the top of file.
*
* You should pass whole four valid coordinate, if less than four
* parameters are passed to BROWSE() the coordinate are default to:
* 1, 0, MAXROW(), MAXCOL().
* $EXAMPLES$
* // this one shows you how to browse around
* USE Around
* BROWSE()
* $STATUS$
* S
* $FILES$
* Library is rtl
* $SEEALSO$
* DBEDIT()*,TBrowse class
* $END$
*/
/* $DOC$
* $FUNCNAME$
* TBrowseDB()
* $CATEGORY$
* TBrowse class
* $ONELINER$
* Create a new TBrowse object to be used with database file
* $SYNTAX$
* TBrowseDB( [], [], [], [] ) --> oBrowse
* $ARGUMENTS$
* coordinate for top row display.
*
* coordinate for left column display.
*
* coordinate for bottom row display.
*
* coordinate for right column display.
* $RETURNS$
* TBrowseDB() return new TBrowse object with the specified coordinate
* and a default :SkipBlock, :GoTopBlock and :GoBottomBlock to browse
* a database file.
* $DESCRIPTION$
* TBrowseDB() is a quick way to create a TBrowse object along with
* the minimal support needed to browse a database. Note that the
* returned TBrowse object contain no TBColumn objects and you need
* to add column for each field by your self.
* $EXAMPLES$
* for a good example, look at the source code for BROWSE() function
* at source/rtl/browse.prg
* $STATUS$
* S
* $COMPLIANCE$
* TBrowseDB() works exactly like CA-Cl*pper's TBrowseDB().
* $FILES$
* Library is rtl
* $SEEALSO$
* BROWSE(),TBColumn class,TBrowse class,TBrowseNew()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* dbSkipper()
* $CATEGORY$
* Database
* $ONELINER$
* Helper function to skip a database
* $SYNTAX$
* dbSkipper( ) --> nSkipped
* $ARGUMENTS$
* 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
* 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 MonthSales
* IF dbSkipper( 100 ) == 100
* ? "Good work! You can party now"
* ELSE
* ? "Too bad, you should really work harder"
* ENDIF
* CLOSE
* $STATUS$
* R
* $COMPLIANCE$
* dbSkipper() is an XBase++ compatibility function and does not exist
* as a standard CA-Cl*pper 5.x function.
* This function is only visible if source/rtl/browdb.prg was compiled
* with the HB_COMPAT_XPP flag.
* $FILES$
* Library is rtl
* $SEEALSO$
* DBSKIP(),SKIP
* $END$
*/
|
c:\harbour\doc\en\clipper.txt |
$Id: clipper.txt 6754 2006-07-14 13:47:17Z rglab $
This document attempts to describe the features separating Harbour from
Clipper.
/* TODO: @FunPointer(), and all other Harbour extensions. */
Harbour Macro Compiler
----------------------
The Harbour Macro Compiler offers 2 additional layers of functionality
controlled by means of HB_SETMACRO()* function, not available in Clipper.
HB_SETMACRO( HB_SM_HARBOUR, TRUE ) will enable macro compilation and
evaluation of complex expressions not supported by Clipper like:
- exp++, exp--, var += exp, (exp), etc..
- Nested codeblocks.
- Expressions longer then 254 characters.
HB_SETMACRO( HB_SM_XBASE, TRUE ) will enable macro compilation and
evaluation of comma separated lists in all contexts where lists are
acceptable by Clipper*, including:
- { &cMacro } // Literal array elements list.
- SomeArray[ &cMacro ] // Array index list.
- SomeFun( &cMacro ) // Arguments list.
- ( &cMacro ) // parenthesized list expression.
*Clipper only supports list macros within codeblocks context.
Both these extra layers are activated by default.
* See also -k Compiler switch.
LIST Command
------------
LIST &cMacro
LIST in clipper [superficially] supports macros of lists expressions.
No error will be produced, and all expressions in the list will be
evaluated, but *only* the *last* expression will be displayed. This is
not documented in either the LIST Command or the Macro Operator
descriptions, but is the de-facto behavior in all Clipper 5.x versions.
Harbour instead will not only evaluate all of the expressions in
such list macro, but will also display all such values. This default
behavior may be disabled with HB_SETMACRO( HB_SM_XBASE, .F. )*
* See also -k Compiler switch.
INIT/EXIT and startup procedures
--------------------------------
In Clipper the startup procedure is always the first procedure/function
of the main module, even if such symbol is an INIT or EXIT symbol. In
such case the program will never execute the "main" symbol. In Harbour
the first *non* INIT/EXIT symbol, will be executed as the main symbol
after all INIT procedures have been executed.
FOR EACH statement
------------------
Harbour has support enumeration loop with the following syntax:
FOR EACH var1 [,var255] IN expr1 [,expr255] [DESCEND]
[EXIT]
[LOOP]
...
NEXT
Note:
-expr can be a string or an array
-enumerator variable 'var' stores a reference to the element of
an array or a string specified by 'expr' thus assigments to the
enumerator changes the value of given array element
-after the loop the controlling variable(s) store the value which
they had before entering the loop
-the enumeraqtor variable supports the following properties
:__enumindex - the loop counter for variable
:__enumbase - the value that is being traversed
:__enumvalue - the value of variable
for example:
a = 'A'
b = 'B'
FOR EACH a,b IN { 1, 2, 3, 4 }, "abcd"
? a, b //prints: 1 a
// 2 b
// 3 c
// 4 d
NEXT
? a, b //prints: A B
// you can use EXIT statement inside the loop
FOR EACH a IN { 1, 2, 3, 4 }
IF( a:__enumindex == 3 )
? a
EXIT
ENDIF
NEXT
arr := { 1, 2, 3 }
str := "abc"
FOR EACH a, b IN arr, str
a *= 2
str := UPPER( str )
NEXT
//now 'arr' stores { 2, 4, 6 }
//howerer 'str' still stores "abc"
Notice the difference:
FOR EACH a IN someValue
? a:__enumindex //prints current value of the index
? (a):__enumindex //sends '__enumindex' message to the current value
NEXT
WITH OBJECT
-----------
Harbour supports the following statement:
WITH OBJECT expression
...
END
Inside this WITH OBJECT/END enclosure you can use the simplified
form of sending messages to the object. You can use the syntax
:message( [params] )
:property
to send messages to the object specified by 'expression'
for example:
WITH OBJECT myobj:a[1]:myitem
:message( 1 )
:value := 9
END
The above code is equivalent to:
myobj:a[1]:myitem:message( 1 )
myobj:a[1]:myitem:value := 9
Inside WITH OBJECT/END you can access (or even assign a new object)
using a special reserved property :__withobject
The runtime error will be generated at the time of message
sending (or property access/assign) if
is not a value of type object.
for example:
CLASS foo
DATA name INIT 'FOO'
ENDCLASS
CLASS bar
DATA name INIT 'BAR'
ENDCLASS
WITH OBJECT foo():new()
? :name //prints 'FOO'
? :__withobject:name //also prints 'FOO'
? :__withobject := bar():new()
? :name //prints 'BAR'
END
|
c:\harbour\doc\en\cmdline.txt |
/*
* $Id: cmdline.txt 9243 2008-08-25 21:36:00Z vszakats $
*/
/* $DOC$
* $FUNCNAME$
* Command line Utility
* $CATEGORY$
* Document
* $ONELINER$
* Compiler Options
* $DESCRIPTION$
* This spec goes for CLIPPERCMD, HARBOURCMD, Harbour compiler and
* #pragma directives in the source code.
*
* The command line always overrides the envvar.
*
* Note that some switches are not accepted in envvar,some others in
* #pragmas.
*
* First the parser should start to step through all the tokens in the
* string separated by whitespace. (or just walk through all argv[])
*
* 1.) If the token begins with "-", it should be treated as a new style
* switch.
*
* One or more switch characters can follow this. The "-" sign inside
* the token will turn off the switch.
*
* If the switch has an argument all the following characters are
* treated as part of the argument.
*
* The "/" sign has no special meaning here.
*
*
* Switch Result option
*
* -wn ( W N )
* -w-n ( !W N )
* -wi/harbour/include/ ( W I=/harbour/include/ )
* -wi/harbour/include/n ( W I=/harbour/include/n )
* -wes0n ( W ES=0 N )
* -wen ( W [invalid switch: e] N )
* -wesn ( W ES=default(0) N )
* -wses ( W S ES=default(0) )
* -wess ( W ES=default(0) S )
* - ( [invalid switch] )
* -w-n-p ( !W !N P )
* -w-n-p- ( !W !N !P )
* -w- -w -w- ( finally: !W )
*
*
* 2.) If the token begins with "/", it should be treated as a compatibility
* style switch.
*
* The parser scans the token for the next "/" sign or EOS and treats
* the resulting string as one switch.
*
* This means that a switch with an argument containing "/" sign has
* some limitations. This may be solved by allowing the usage of quote
* characters. This is mostly a problem on systems which use "/" as
* path separator.
*
* The "-" sign has no special meaning here, it can't be used to
* disable a switch.
*
*
* Switch Result option
*
* /w/n ( W N )
* /wo/n ( [invalid switch: wo] N )
* /ihello/world/ ( I=hello [invalid switch: world] [invalid switch: /] )
* /i"hello/world/"/w ( I=hello/world/ W )
* /ihello\world\ ( I=hello\world\ )
*
*
* 3.) If the token begins with anything else it should be skipped.
*
* The Harbour switches are always case insensitive.
*
* In the Harbour commandline the two style can be used together:
* harbour -wnes2 /gc0/q0 -iC:\hello
*
* Exceptions:
*
* - Handlig of the /CREDIT undocumented switch on Harbour command line
* is unusual, check the current code for this.
*
* - The CLIPPER, HARBOUR and Harbour application command line parsing
* is a different beast, see cmdarg.c for a NOTE.
*
* Notes:
*
* - All occurences where a path is accepted, Harbour should handle the
* quote char to specify path containing space, negative sign, slash,
* or any other chars with special meaning.
*
* /i"C:/hello/"
* -i"C:/hello-n"
* /i"C:/Program Files/"
* -i"C:/Program Files/"
*
*
* Just some examples for the various accepted forms:
* //F20 == /F20 == F20 == F:20 == F20X
* //TMPPATH:C:\hello
* F20//TMPPATH:/temp///F:30000000 NOIDLE
* F0NOIDLEX10
* SQUAWKNOIDLE
*
* "//" should always be used on the command line.
* $SEEALSO$
* Compiler Options
* $END$
*/
|
c:\harbour\doc\en\command.txt |
/*
* $Id: command.txt 4484 2001-09-11 10:15:24Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Brian Hays
* Documentation for the commands
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $COMMANDNAME$
* CLASS
* $CATEGORY$
* OOP Command
* $ONELINER$
* Define a Class for Object Oriented Programming
* $SYNTAX$
* [CREATE] CLASS [ [,] ] [STATIC]
* $ARGUMENTS$
* Name of the class to define. By tradition, Harbour
* classes start with "T" to avoid collisions with user-
* created classes.
*
* The Parent class(es) to use for inheritance.
* Harbour supports Multiple Inheritance.
*
* STATIC This clause causes the class function to be declared
* as a static function. It will therefore not be available outside the current module.
*
* $DESCRIPTION$
* CLASS creates a class from which you can create objects.
* The CLASS command begins the class specification, in which the DATA
* elements (also known as instance variables) and METHODS of the
* class are named. The following scoping commands may also appear.
* They control the default scope of DATA and METHOD commands that follow them.
*
*
* EXPORTED:
* VISIBLE:
* HIDDEN:
* PROTECTED:
*
* The class specification ends with the END CLASS command.
*
* Classes can inherit from multiple , and the chain of
* inheritance can extend to many levels.
*
* A program uses a Class by calling the Class Constructor, usually the
* New() method, to create an object. That object is usually assigned
* to a variable, which is used to access the DATA elements and
* methods.
*
* Harbour's OOP syntax and implementation supports Scoping (Protect, Hidden and Readonly)
* and Delegating, and is largely compatible with Class(y)(tm), TopClass(tm)
* and Visual Objects(tm).
* $EXAMPLES$
* CLASS TBColumn
*
* DATA Block // Code block to retrieve data for the column
* DATA Cargo // User-definable variable
* DATA ColorBlock // Code block that determines color of data items
* DATA ColSep // Column separator character
* DATA DefColor // Array of numeric indexes into the color table
* DATA Footing // Column footing
* DATA FootSep // Footing separator character
* DATA Heading // Column heading
* DATA HeadSep // Heading separator character
* DATA Width // Column display width
* DATA ColPos // Temporary column position on screen
*
* METHOD New() // Constructor
*
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* CLASS is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* HBClass(),Object Oriented Programming,DATA,METHOD
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* DATA
* $CATEGORY$
* OOP Command
* $ONELINER$
* Alternate syntax for VAR: instance variable for the objects.
* $SYNTAX$
* DATA [,] [ AS ] [ INIT ]
* [[EXPORTED | VISIBLE] | [PROTECTED] | [HIDDEN]] [READONLY | RO]
* $ARGUMENTS$
* Name of the DATA
* Optional data type specification from the following:
* Character, Numeric, Date, Logical, Codeblock, Nil.
* Optional initial value when creating a new object.
*
* EXPORTED Specifies that this DATA is accessible to functions and
* methods outside of the class. VISIBLE is a synonym for EXPORTED.
*
* PROTECTED Specifies that this DATA is only accessible to functions and methods within this class and its subclasses.
*
* HIDDEN Specifies that this DATA is only accessible to the
* class where it was defined, and is not inherited by the
* subclasses.
* READONLY Restricts assignment to the variable. If specified with
* the EXPORTED clause, assignment is only permitted from the current
* class and its subclasses. If specified with the PROTECTED clause,
* assignment is only permitted from the current class.
* RO is a synonym for READONLY.
* $DESCRIPTION$
* DATA elements can also be thought of as the "properties" of an
* object. They can be of any data type, including codeblock.
* Once an object has been created, the DATA elements are referenced
* with the colon (:) as in MyObject:Heading := "Last name".
* Usually a class also defines methods to manipulate the DATA.
*
* You can use the "AS " clause to enforce that the DATA is
* maintained as a certain type. Otherwise it will take on the type of
* whatever value is first assigned to it.
*
* Use the "INIT " clause to initialize that DATA to
* whenever a new object is created.
*
* VAR can be a synonym for DATA, or it can use a slightly different
* syntax for compatibility with other dialects.
* $EXAMPLES$
* CLASS TBColumn
*
* DATA Block // Code block to retrieve data for the column
* DATA Cargo // User-definable variable
* DATA ColorBlock // Code block that determines color of data items
* DATA ColSep // Column separator character
* DATA DefColor // Array of numeric indexes into the color table
* DATA Footing // Column footing
* DATA FootSep // Footing separator character
* DATA Heading // Column heading
* DATA HeadSep // Heading separator character
* DATA Width // Column display width
* DATA ColPos // Temporary column position on screen
*
* METHOD New() // Constructor
*
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* DATA is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* Object Oriented Programming,CLASS,METHOD,CLASSDATA,VAR
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* CLASSDATA
* $CATEGORY$
* OOP Command
* $ONELINER$
* Define a CLASSDATA variable for a class (NOT for an Object!)
* $SYNTAX$
* CLASSDATA [,] [ AS ] [ INIT ]
* $ARGUMENTS$
* Name of the DATA
* Optional data type specification from the following:
* Character, Numeric, Date, Logical, Codeblock, Nil
* Optional initial value at program startup
* $DESCRIPTION$
* CLASSDATA variables can also be thought of as the "properties" of an
* entire class. Each CLASSDATA exists only once, no matter how many
* objects are created. A common usage is for a counter that is
* incremented whenever an object is created and decremented when one
* is destroyed, thus monitoring the number of objects in existance
* for this class.
*
* You can use the "AS " clause to enforce that the CLASSDATA is
* maintained as a certain type. Otherwise it will take on the type of
* whatever value is first assigned to it.
* Use the "INIT " clause to initialize that DATA to
* whenever the class is first used.
* $EXAMPLES$
* CLASS TWindow
* DATA hWnd, nOldProc
* CLASSDATA lRegistered AS LOGICAL
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* CLASSDATA is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* Object Oriented Programming,CLASS,METHOD,DATA
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* METHOD
* $CATEGORY$
* OOP Command
* $ONELINER$
* Declare a METHOD for a class in the class header
* $SYNTAX$
* METHOD ( [] ) [ CONSTRUCTOR ]
* METHOD ( [] ) INLINE
* METHOD ( [] ) BLOCK
* METHOD ( [] ) EXTERN ([])
* METHOD ( [] ) SETGET
* METHOD ( [] ) VIRTUAL
* METHOD ( [] ) OPERATOR
* METHOD ( [] ) CLASS
* $ARGUMENTS$
* Name of the method to define
* Optional parameter list
* $DESCRIPTION$
* Methods are "class functions" which do the work of the class.
* All methods must be defined in the class header between the
* CLASS and ENDCLASS commands. If the body of a method is not fully
* defined here, the full body is written below the ENDCLASS command
* using this syntax:
*
* METHOD ( [] ) CLASS
*
* Methods can reference the current object with the keyword "Self:" or
* its shorthand version "::".
*
* CLAUSES:
*
* CONSTRUCTOR Defines a special method Class Constructor method,
* used to create objects. This is usually the
* New() method. Constructors always return the new
* object.
*
* INLINE Fast and easy to code, INLINE lets you define the
* code for the method immediately within the definition
* of the Class. Any methods not declared INLINE or BLOCK
* must be fully defined after the ENDCLASS command.
* The following INLINE receives a parameter
* of Self. If you need to receive more parameters, use
* the BLOCK clause instead.
*
* BLOCK Use this clause when you want to declare fast 'inline'
* methods that need parameters. The first parameter to
* must be Self, as in:
*
* METHOD BLOCK {|Self,,, ...,|...}
*
* EXTERN If an external function does what the method needs,
* use this clause to make an optimized call to that
* function directly.
*
* SETGET For calculated Data. The name of the method can be
* manipulated like a Data element to Set or Get a value.
*
* VIRTUAL Methods that do nothing. Useful for Base classes where
* the child class will define the method's behavior, or
* when you are first creating and testing a Class.
*
* OPERATOR Operator Overloading for classes.
* See example Tests/TestOp.prg for details.
*
* CLASS
* Use this syntax only for defining a full method after
* the ENDCLASS command.
* $EXAMPLES$
* CLASS TWindow
* DATA hWnd, nOldProc
* METHOD New( ) CONSTRUCTOR
* METHOD Capture() INLINE SetCapture( ::hWnd )
* METHOD End() BLOCK { | Self, lEnd | If( lEnd := ::lValid(),;
* ::PostMsg( WM_CLOSE ),), lEnd }
* METHOD EraseBkGnd( hDC )
* METHOD cTitle( cNewTitle ) SETGET
* METHOD Close() VIRTUAL
* ENDCLASS
*
* METHOD New( ) CLASS TWindow
* local nVar, cStr
* ... ...
* ... ...
* RETURN Self
* $TESTS$
* TestOp.prg
* $STATUS$
* R
* $COMPLIANCE$
* METHOD is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* HBClass(),Object Oriented Programming,DATA,CLASS
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* MESSAGE
* $CATEGORY$
* OOP Command
* $ONELINER$
* Route a method call to another Method
* $SYNTAX$
* MESSAGE METHOD ( [] )
* MESSAGE () METHOD ( [] )
* $ARGUMENTS$
* The pseudo-method name to define
* The method to create and call when
* is invoked.
* Optional parameter list for the method
* $DESCRIPTION$
* The MESSAGE command is a seldom-used feature that lets you re-route
* a call to a method with a different name. This can be necessary if
* a method name conflicts with a public function that needs to be
* called from within the class methods.
*
* For example, your app may have a public function called BeginPaint()
* that is used in painting windows. It would also be natural to have a
* Window class method called :BeginPaint() that the application can
* call. But within the class method you would not be able to call the
* public function because internally methods are based on static
* functions (which hide public functions of the same name).
*
* The MESSAGE command lets you create the true method with a different
* name (::xBeginPaint()), yet still allow the ::BeginPaint() syntax
* to call ::xBeginPaint(). This is then free to call the public
* function BeginPaint().
* $EXAMPLES$
* CLASS TWindow
* DATA hWnd, nOldProc
* METHOD New( ) CONSTRUCTOR
* MESSAGE BeginPaint METHOD xBeginPaint()
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* MESSAGE is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* METHOD,DATA,CLASS,Object Oriented Programming
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* ERROR HANDLER
* $CATEGORY$
* OOP Command
* $ONELINER$
* Designate a method as an error handler for the class
* $SYNTAX$
* ERROR HANDLER ( [] )
* $ARGUMENTS$
* Name of the method to define
* Optional parameter list
* $DESCRIPTION$
* ERROR HANDLER names the method that should handle errors for the
* class being defined.
* $EXAMPLES$
* CLASS TWindow
* ERROR HANDLER MyErrHandler()
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* ERROR HANDLER is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* Object Oriented Programming,ON ERROR,CLASS,METHOD,DATA
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* ON ERROR
* $CATEGORY$
* OOP Command
* $ONELINER$
* Designate a method as an error handler for the class
* $SYNTAX$
* ON ERROR ( [] )
* $ARGUMENTS$
* Name of the method to define
* Optional parameter list
* $DESCRIPTION$
* ON ERROR is a synonym for ERROR HANDLER.
* It names the method that should handle errors for the
* class being defined.
* $EXAMPLES$
* CLASS TWindow
* ON ERROR MyErrHandler()
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* ON ERROR is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* Object Oriented Programming,ERROR HANDLER,CLASS,METHOD,DATA
* $END$
*/
/* $DOC$
* $COMMANDNAME$
* ENDCLASS
* $CATEGORY$
* OOP Command
* $ONELINER$
* End the declaration of a class.
* $SYNTAX$
* ENDCLASS
* $DESCRIPTION$
* ENDCLASS marks the end of a class declaration.
* It is usually followed by the class methods that are not INLINE.
* $EXAMPLES$
* CLASS TWindow
* DATA hWnd, nOldProc
* ENDCLASS
* $STATUS$
* R
* $COMPLIANCE$
* ON ERROR is a Harbour extension.
* $PLATFORMS$
* All
* $SEEALSO$
* Object Oriented Programming,CLASS,METHOD,DATA
* $END$
*/
|
c:\harbour\doc\en\compiler.txt |
/*
* $Id: compiler.txt 6672 2006-05-23 11:21:29Z ckedem $
*/
/* $DOC$
* $FUNCNAME$
* Compiler Options
* $CATEGORY$
* Document
* $ONELINER$
* Compiler Options
* $DESCRIPTION$
*
* Invoking the Harbour compiler:
* ==============================
*
* harbour [options]
* or
* harbour [options]
* or
* harbour [options] [options]
*
* The command line options have to be separated by at least one space.
* The option can start with either '/' character or '-' character.
*
* The Harbour command line options:
* =================================
*
* /a automatic memvar declaration
* =================
* This causes all variables declared by PARAMETER, PRIVATE or PUBLIC
* statements to be automatically declared as MEMVAR variables.
*
* /b debug info
* =================
* The compiler generates all information required for debugging
*
* /d[=] #define
* =================
*
* /es[] set exit severity
* =================
*
* /es or /es0 - all warnings are ignored and exit code returned by
* the compiler (accessed by DOS ERRORLEVEL command)
* is equal to 0 if there are no errors in compiled
* source file.
*
* /es1 - any warnings generate a non-zero exit code, but
* output is still created.
*
* /es2 - all warnings are treated as errors and no output
* file is created. The exit code is set to a non-zero
* value.
* /g output type generated is
* =================
*
* /gc[] output type: C source (.c) (default)
* : 0=compact 1=normal 2=verbose (default)
* 3=generate real C code instead of PCODE
* array called by a C wrapper.
*
* /go output type: Platform dependant object module
*
* /gh output type: Harbour Portable Object (.hrb)
*
* /i add #include file search path
* =================
*
* /k enable compatibility mode
* =================
*
* /kc clear all flags (strict Clipper compatibility)
*
* /kh Harbour extensions (default)
*
* /ki HB_INLINE support enabled (default)
*
* /kr use runtime settings for the macro compiler
*
* /ks enable support for strings as array of bytes (default)
*
* /kx other xbase dialects extensions (default)
*
* /kJ disable optimalization of jump and noop pcodes
*
* /k? invoke help information
*
* /l suppress line number information
* =================
*
* The compiler does not generate the source code line numbers in
* the output file. The PROCLINE() function will return 0 for
* modules compiled using this option.
*
* /m compile current module only
* =================
*
* /n no implicit starting procedure
* =================
*
* The compiler does not create a procedure with the same name as
* the compiled file. This means that any declarations placed
* before the first PROCEDURE or FUNCTION statement have file-
* wide scope and can be accessed/used in all functions/procedures
* defined in the compiled source file. All executable statements
* placed at the beginning of the file and before the first
* PROCEDURE/FUNCTION statement are ignored.
*
* /o output file drive and/or path
* =================
*
* /p generate pre-processed output (.ppo) file
* =================
*
* The compiler only creates the file that contains the result of
* pre-processing the source file.
*
* /q quiet
* =================
*
* The compiler does not print any messages during compiling
* (except the copyright info).
*
* /q0 be really quiet and don't display even the copyright info
*
* /r[] request linker to search (or none)
* =================
*
* Currently not supported in Harbour.
*
* /r= sets maximum number of preprocessor iterations
* =================
*
* This set the maximum number of preprocessor iterations
* during processing the source code. If this switch is not
* used then the preprocessor stops after 1024 iterations.
* This value is used to stop processing of infinite loops,
* for example:
* #command ( => (,7
*
* /s syntax check only
* =================
*
* The compiler checks the syntax only. No output file is generated.
*
* /t path for temp file creation
* =================
*
* Currently not used in Harbour (the Harbour compiler does not
* create any temporary files).
*
* /u[] use command definition set in (or none)
* =================
*
* /v variables are assumed M->
* =================
*
* All undeclared or unaliased variables are assumed MEMVAR
* variables (private or public variables). If this switch is not
* used then the scope of such variables is checked at runtime.
*
* /w[] set warning level number (0..4, default 1)
* =================
*
* /w0 - no warnings
*
* /w or /w1 - Clipper compatible warnings
*
* /w2 - some useful warnings missed in Clipper
*
* /w3 - warnings generated for Harbour language extensions
* and also enables strong type checking but only
* warns against declared types, or types which may be
* calculated at compile time
*
* /w4 - Enables warning about suspicious operations, which
* means if you mix undeclared types, or types which
* can not be calculated at compile time,together with
* declared types, a warning will be generated.
*
* /x[] set symbol init function name prefix (for .c only)
* =================
*
* Sets the prefix added to the generated symbol init function name
* (in C output currently). This function is generated
* automatically for every PRG module compiled. This additional
* prefix can be used to suppress problems with duplicated symbols
* during linking an application with some third party libraries.
*
* /y trace lex & yacc activity
* =================
*
* The Harbour compiler uses the FLEX and YACC utilities to parse
* the source code and to generate the required output file. This
* option traces the activity of these utilities.
*
* /z suppress logical shortcutting (.and. & .or.)
* =================
*
* Compilation in batch mode.
* ==========================
*
* @ compile list of modules in
* =================
*
* Not supported yet.
*
* Known incompatibilities between harbour and clipper compilers
* =============================================================
*
* NOTE:
*
* If you want a 100% compatible runtime libraries then
* you have to define HARBOUR_STRICT_CLIPPER_COMPATIBILITY. This
* option should be defined in the file include/hbsetup.h (in fact this
* option is placed in a comment by default - you need to remove the
* /* */ characters only). This change has to be done before invoking
* the make utility.
*
*
* Handling of undeclared variables
* ================================
*
* When a value is assigned to an undeclared variable and the '-v'
* command line option is not used, then the Clipper compiler assumes
* that the variable is a PRIVATE or a PUBLIC variable and generates
* POPM (pop memvar) opcode.
*
* When the value of an undeclared variable is accessed and the '-v'
* command line option is not used, the Clipper compiler generates PUSHV
* (push variable) opcode that determines the type of variable at runtime.
* If a field with the requested name exists in the current workarea then
* its value is used. If there is no field then a PRIVATE or a PUBLIC
* variable is used (if exists).
*
* The Harbour compiler generates an opcode to determine the type of
* variable at runtime (POPVARIABLE or PUSHVARIABLE) in both cases
* (assignment and access).
*
* The difference can be checked by the following code:
*
*
* PROCEDURE MAIN()
* PRIVATE myname
*
* DBCREATE( "TEST", { { "MYNAME", "C", 10, 0} } )
* USE test NEW
* SELECT test
* APPEND BLANK
*
* FIELD->myname := "FIELD"
* MEMVAR->myname := "MEMVAR"
*
* myname := myname + " assigned"
*
* // In Clipper: "FIELD", In Harbour: "FIELD assigned"
* ? FIELD->myname
*
* // In Clipper: "MEMVAR assigned", In Harbour: "MEMVAR"
* ? MEMVAR->myname
*
* USE
*
* RETURN
*
*
* Passing an undeclared variable by the reference
* ===============================================
*
* The Clipper compiler uses the special opcode PUSHP to pass a
* reference to an undeclared variable ( '@' operator ). The type of
* passed variable is checked at runtime (field or memvar). However,
* field variables cannot be passed by reference. This means that
* Clipper checks the memvar variable only and doesn't look for a field.
* This is the reason why the Harbour compiler uses the usual
* PUSHMEMVARREF opcode in such cases. Notice that the runtime behavior
* is the same in Clipper and in Harbour - only the generated opcodes
* are different.
*
*
* Handling of object messages
* ===========================
*
* The HARBOUR_STRICT_CLIPPER_COMPATIBILITY setting determines
* the way chained send messages are handled.
*
* For example, the following code:
*
* a:b( COUNT() ):c += 1
*
* will be handled as:
*
* a:b( COUNT() ):c := a:b( COUNT() ):c + 1
*
* in strict Clipper compatibility mode and
*
* temp := a:b( COUNT() ), temp:c += 1
*
* in non-strict mode.
*
* In practice, Clipper will call the COUNT() function two times:
* the first time before addition and the second one after addition.
* In Harbour, COUNT() will be called only once, before addition.
*
* The Harbour (non-strict) method is:
* 1) faster
* 2) it guarantees that the same instance variable of the same object
* will be changed
*
* (See also: source/compiler/expropt.c)
*
* Initialization of static variables
* ==================================
*
* There is a difference in the initialization of static
* variables that are initialized with a codeblock that refers to
* a local variable. For example:
*
* PROCEDURE TEST()
* LOCAL MyLocalVar
* STATIC MyStaticVar := {|| MyLocalVar }
*
* MyLocalVar :=0
* ? EVAL( MyStaticVar )
*
* RETURN
*
* The above code compiles fine in Clipper, but it generates a
* runtime error Error/BASE 1132 Bound error: array access
* Called form (b)STATICS$(0)
*
* In Harbour this code generates a compile time error:
* Error E0009 Illegal variable (b) initializer: 'MyLocalVar'
*
* Both Clipper and Harbour are handling all local variables used in a
* codeblock in a special way: they are detached from the local stack
* of function/procedure where they are declared. This allows access to
* these variables after the exit from a function/procedure. However,
* all static variables are initialized in a separate procedure
* ('STATICS$' in Clipper and '(_INITSTATICS)' in Harbour) before the
* main procedure and before all INIT procedures. The local variables
* don't exist on the eval stack when static variables are initialized,
* so they cannot be detached.
*
* $END$
*/
|
c:\harbour\doc\en\datetime.txt |
/*
* $Id: datetime.txt 9192 2008-08-19 14:17:51Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Luiz Rafael Culik
* Documentation for: CDOW(),CMONTH(),DATE(),CTOD(),DAY(),DAYS()
* DOW(),DTOS(),DTOC(),ELAPTIME(),MONTH(),SECONDS(),SECS(),TIME(),YEAR()
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* CDOW()
* $CATEGORY$
* Date
* $ONELINER$
* Converts a date to the day of week
* $SYNTAX$
* CDOW() --> cDay
* $ARGUMENTS$
* Any date expression.
* $RETURNS$
* The current day of week.
* $DESCRIPTION$
* This function returns a character string of the day of the week,
* from a date expression passed to it.
* If a NULL date is passed to the function, the value of the function
* will be a NULL byte.
* $EXAMPLES$
* ? CDOW(DATE())
* if CDOW(DATE()+10) =="SUNDAY"
* ? "This is a sunny day."
* Endif
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant.
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DAY(),DOW(),DATE(),CMONTH()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* CMONTH()
* $CATEGORY$
* Date
* $ONELINER$
* Return the name of the month.
* $SYNTAX$
* CMONTH() --> cMonth
* $ARGUMENTS$
* Any date expression.
* $RETURNS$
* The current month name
* $DESCRIPTION$
* This function returns the name of the month (January,February,etc.)
* from a date expression passed to it.
* If a NULL date is passed to the function, the value of the function
* will be a NULL byte.
* $EXAMPLES$
* ? CMONTH(DATE())
* if CMONTH(DATE()+10) =="March"
* ? "Have you done your system BACKUP?"
* Endif
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* CDOW(),DATE(),MONTH(),YEAR(),DOW(),DTOC()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DATE()
* $CATEGORY$
* Date
* $ONELINER$
* Return the Current OS Date
* $SYNTAX$
* DATE() --> dCurDate
* $ARGUMENTS$
* None
* $RETURNS$
* Current system date.
* $DESCRIPTION$
* This function returns the current system date.
* $EXAMPLES$
* ? Date()
* $TESTS$
* ? "Today is ",Day(date())," of ",cMonth(date())," of ",Year(date())
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper Compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* CTOD(),DTOS(),DTOC(),DAY(),MONTH(),CMONTH()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* CTOD()
* $CATEGORY$
* Date
* $ONELINER$
* Converts a character string to a date expression
* $SYNTAX$
* CTOD() --> dDate
* $ARGUMENTS$
* A character date in format 'mm/dd/yy'
* $RETURNS$
* A date expression
* $DESCRIPTION$
* This function converts a date that has been entered as a character
* expression to a date expression. The character expression will be in
* the form "MM/DD/YY" (based on the default value in SET DATE) or in
* the appropriate format specified by the SET DATE TO command. If an
* improper character string is passed to the function, an empty date
* value will be returned.
* $EXAMPLES$
* ? CTOD('12/21/00')
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* SET DATE,DATE(),DTOS()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DAY()
* $CATEGORY$
* Date
* $ONELINER$
* Return the numeric day of the month.
* $SYNTAX$
* DAY() --> nMonth
* $ARGUMENTS$
* Any valid date expression.
* $RETURNS$
* Numeric value of the day of month.
* $DESCRIPTION$
* This function returns the numeric value of the day of month from a
* date.
* $EXAMPLES$
* ? Day(DATE())
* ? Day(DATE()+6325)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* CTOD(),DTOS(),DTOC(),DATE(),MONTH(),CMONTH()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DAYS()
* $CATEGORY$
* Date
* $ONELINER$
* Convert elapsed seconds into days
* $SYNTAX$
* DAYS( ) --> nDay
* $ARGUMENTS$
* The number of seconds
* $RETURNS$
* The number of days
* $DESCRIPTION$
* This function converts seconds to the equivalent number
* of days; 86399 seconds represents one day, 0 seconds being midnight.
* $EXAMPLES$
* ? DAYS(2434234)
* ? "Has been passed ",DAYS(63251),' since midnight'
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* SECONDS(),SECS(),ELAPTIME()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DOW()
* $CATEGORY$
* Date
* $ONELINER$
* Value for the day of week.
* $SYNTAX$
* DOW() --> nDay
* $ARGUMENTS$
* Any valid date expression
* $RETURNS$
* The current day number
* $DESCRIPTION$
* This function returns the number representing the day of the week
* for the date expressed as .
* $EXAMPLES$
* ? DOW(DATE())
* ? DOW(DATE()-6584)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DTOC(),CDOW(),DATE(),DTOS(),DAY()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DTOC()
* $CATEGORY$
* Date
* $ONELINER$
* Date to character conversion
* $SYNTAX$
* DTOC() --> cDate
* $ARGUMENTS$
* Any date
* $RETURNS$
* Character represention of date
* $DESCRIPTION$
* This function converts any date expression (a field or variable)
* expressed as to a character expression in the default
* format "MM/DD/YY". The date format expressed by this function is
* controled in part by the date format specified in the SET DATE
* command
* $EXAMPLES$
* ? DTOC(Date())
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* SET DATE,DATE(),DTOS()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DTOS()
* $CATEGORY$
* Date
* $ONELINER$
* Date to string conversion
* $SYNTAX$
* DTOS() --> cDate
* $ARGUMENTS$
* Any date
* $RETURNS$
* String notation of the date
* $DESCRIPTION$
* This function returns the value of as a character
* string in the format of YYYYMMDD. If the value of is
* an empty date, this function will return eight blank spaces.
* $EXAMPLES$
* ? DTOS(Date())
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DTOC(),DATE(),DTOS()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ELAPTIME()
* $CATEGORY$
* Time
* $ONELINER$
* Calculates elapted time.
* $SYNTAX$
* ELAPTIME(,) --> cDiference
* $ARGUMENTS$
* Start in time as a string format
* End time as a string format
* $RETURNS$
* Difference between the times
* $DESCRIPTION$
* This function returns a string that shows the difference between
* the starting time represented as and the ending time
* as . If the stating time is greater then the ending
* time, the function will assume that the date changed once.
* $EXAMPLES$
* Static cStartTime
* Init Proc Startup
* cStartTime:=Time()
*
* Exit Proc StartExit
* ? "You used this program by",ELAPTIME(cStartTime,Time())
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* SECS(),SECONDS(),TIME(),DAY()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* MONTH()
* $CATEGORY$
* Date
* $ONELINER$
* Converts a date expression to a month value
* $SYNTAX$
* MONTH() --> nMonth
* $ARGUMENTS$
* Any valid date expression
* $RETURNS$
* Corresponding number of the month in the year, ranging from
* 0 to 12
* $DESCRIPTION$
* This function returns a number that represents the month of a given
* date expression . If a NULL date (CTOD('')) is passed to the
* function, the value of the function will be 0.
* $EXAMPLES$
* ? Month(DATE())
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* CDOW(),DOW(),YEAR(),CMONTH()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* SECONDS()
* $CATEGORY$
* Time
* $ONELINER$
* Returns the number of elapsed seconds past midnight.
* $SYNTAX$
* SECONDS() --> nSeconds
* $ARGUMENTS$
* None
* $RETURNS$
* Number of seconds since midnight
* $DESCRIPTION$
* This function returns a numeric value representing the number of
* elapsed seconds based on the current system time.
* The system time is considered to start at 0 (midnight); it continues
* up to 86399 seconds. The value of the return expression is displayed
* in both seconds and hundredths of seconds.
* $EXAMPLES$
* ? Seconds()
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* TIME()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* SECS()
* $CATEGORY$
* Time
* $ONELINER$
* Return the number of seconds from the system date.
* $SYNTAX$
* SECS( ) --> nSeconds
* $ARGUMENTS$
* Character expression in a time string format
* $RETURNS$
* Number of seconds
* $DESCRIPTION$
* This function returns a numeric value that is a number of elapsed
* seconds from midnight based on a time string given as .
* $EXAMPLES$
* ? Secs(Time())
* ? Secs(time()-10)
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* SECONDS(),ELAPTIME(),TIME()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* TIME()
* $CATEGORY$
* Time
* $ONELINER$
* Returns the system time as a string
* $SYNTAX$
* TIME() --> cTime
* $ARGUMENTS$
* None
* $RETURNS$
* Character string representing time
* $DESCRIPTION$
* This function returns the system time represented as a character
* expression in the format of HH:MM:SS
* $EXAMPLES$
* ? Time()
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DATE(),SECONDS()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* YEAR()
* $CATEGORY$
* Date
* $ONELINER$
* Converts the year portion of a date into a numeric value
* $SYNTAX$
* YEAR() --> nYear
* $ARGUMENTS$
* Any valid date expression
* $RETURNS$
* The year portion of the date.
* $DESCRIPTION$
* This function returns the numeric value for the year in .
* This value will always be a four-digit number and is not affected
* by the setting of the SET CENTURY and SET DATE commands. Addition
* ally, an empty date expression passed to this function will yield
* a zero value.
*
* $EXAMPLES$
* ? Year(date())
* ? year(CTOD("01/25/3251"))
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DAY(),MONTH()
* $END$
*/
|
c:\harbour\doc\en\dbdelim.txt |
/*
* $Id: dbdelim.txt 9191 2008-08-19 13:11:22Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2001-2002 David G. Holm
* Documentation for: __dbDelim()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* __dbDelim()
* $CATEGORY$
* Conversion
* $ONELINER$
* Copies the contents of a database to a delimited text file or
* appends the contents of a delimited text file to a database.
* $SYNTAX$
* __dbDelim( , , [], [],
* [], [], [], [], ) --> NIL
* $ARGUMENTS$
* If set to .T., copies records to a delimited file.
* If set to .F., append records from a delimited file.
* The name of the text file to copy to or append from.
* If a file extension is not specified, ".txt" is used by default.
* Either the character to use as the character field
* delimiter (only the first character is used). or "BLANK" (not case
* sensitive), which eliminates the character field delimiters and
* sets the field separator to a single space instead of a comma.
* An aray of field names to limit the processint to. If
* not specified, or if empty, then all fields are processed.
* An optional code block containing a FOR expression that
* will reduce the number of records to be processed.
* An optional code block containing a WHILE expression
* that will reduce the number of records to be processed.
* If present, but nRecord is not present, specifies to
* process this number of records, starting with the current record.
* A value of 0 means to process no records.
* If present, specifies the only record to process. A
* value of 0 means to process no records. Overrides nNext and lRest.
* If lExport is .T., then if set to .T. and there are no
* nRecord, nNext, or bWhile arguments, processes all records from
* current to last.
* $RETURNS$
* NIL
* $DESCRIPTION$
* __dbDelim() copies all or selected contents of a database table
* to an SDF text file or appends all or selected contents of an SDF
* text file to a database table.
* $EXAMPLES$
* // Copy delinquent accounts into a delimited text file.
* USE ACCOUNTS NEW
* COPY TO overdue DELIMITED FOR !EMPTY( accounts->duedate ) ;
* .AND. DATE() - accounts->duedate > 30
* // Import new customer records.
* USE CUSTOMER NEW
* APPEND FROM customer DELIMITED
* $TESTS$
*
* $STATUS$
* S
* $COMPLIANCE$
* __dbDelim() is intended to be fully compliant with CA-Cl*pper's
* function of the same name and is the underlying implementation
* of the APPEND FROM DELIMITED and COPY TO DELIMITED commands.
* $PLATFORMS$
* All
* $FILES$
*
* $SEEALSO$
* __dbSDF(), APPEND FROM, COPY TO
* $END$
*/
|
c:\harbour\doc\en\dbsdf.txt |
/*
* $Id: dbsdf.txt 9191 2008-08-19 13:11:22Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2001-2002 David G. Holm
* Documentation for: __dbSDF()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* __dbSDF()
* $CATEGORY$
* Conversion
* $ONELINER$
* Copies the contents of a database to an SDF text file or
* appends the contents of an SDF text file to a database.
* $SYNTAX$
* __dbSDF( , , [],
* [], [], [], [], ) --> NIL
* $ARGUMENTS$
* If set to .T., copies records to an SDF file.
* If set to .F., append records from an SDF file.
* The name of the text file to copy to or append from.
* If a file extension is not specified, ".txt" is used by default.
* An aray of field names to limit the processint to. If
* not specified, or if empty, then all fields are processed.
* An optional code block containing a FOR expression that
* will reduce the number of records to be processed.
* An optional code block containing a WHILE expression
* that will reduce the number of records to be processed.
* If present, but nRecord is not present, specifies to
* process this number of records, starting with the current record.
* A value of 0 means to process no records.
* If present, specifies the only record to process. A
* value of 0 means to process no records. Overrides nNext and lRest.
* If lExport is .T., then if set to .T. and there are no
* nRecord, nNext, or bWhile arguments, processes all records from
* current to last.
* $RETURNS$
* NIL
* $DESCRIPTION$
* __dbSDF() copies all or selected contents of a database table
* to an SDF text file or appends all or selected contents of an
* SDF text file to a database table.
* $EXAMPLES$
* // Copy delinquent accounts into an SDF text file.
* USE ACCOUNTS NEW
* COPY TO overdue SDF FOR !EMPTY( accounts->duedate ) ;
* .AND. DATE() - accounts->duedate > 30
* // Import new customer records.
* USE CUSTOMER NEW
* APPEND FROM customer SDF
* $TESTS$
*
* $STATUS$
* S
* $COMPLIANCE$
* __dbSDF() is intended to be fully compliant with CA-Cl*pper's
* function of the same name and is the underlying implementation
* of the APPEND FROM SDF and COPY TO SDF commands.
* $PLATFORMS$
* All
* $FILES$
*
* $SEEALSO$
* __dbDelim(), APPEND FROM, COPY TO
* $END$
*/
|
c:\harbour\doc\en\dbstrux.txt |
/*
* $Id: dbstrux.txt 9191 2008-08-19 13:11:22Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Chen Kedem
* Documentation for: __dbCopyStruct(), COPY STRUCTURE, __dbCopyXStruct(),
* COPY STRUCTURE EXTENDED, __dbCreate(), CREATE,
* CREATE FROM, __FLEDIT(), __dbStructFilter()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* __dbCopyStruct()
* $CATEGORY$
* Database
* $ONELINER$
* Create a new database based on current database structure
* $SYNTAX$
* __dbCopyStruct( , [] ) --> NIL
* $ARGUMENTS$
* is the name of the new database file to create. (.dbf)
* is the default extension if none is given.
*
* is an array where each element is a field name.
* Names could be specified as uppercase or lowercase.
* $RETURNS$
* __dbCopyStruct() always return NIL.
* $DESCRIPTION$
* __dbCopyStruct() create a new empty database file with a structure
* that is based on the currently open database in this work-area. If
* is empty, the newly created file would have the same
* structure as the currently open database. Else, the new file would
* contain only fields that exactly match .
*
* __dbCopyStruct() can be use to create a sub-set of the currently
* open database, based on a given field list.
*
* COPY STRUCTURE command is preprocessed into __dbCopyStruct()
* function during compile time.
* $EXAMPLES$
* // Create a new file that contain the same structure
* USE TEST
* __dbCopyStruct( "mycopy.dbf" )
*
* // Create a new file that contain part of the original structure
* LOCAL aList
* USE TEST
* aList := { "NAME" }
* __dbCopyStruct( "onlyname.dbf", aList )
* $STATUS$
* R
* $COMPLIANCE$
* __dbCopyStruct() works exactly like CA-Cl*pper's __dbCopyStruct()
* $PLATFORMS$
* All
* $FILES$
* Library is rdd
* $SEEALSO$
* COPY STRUCTURE,COPY STRUCTURE EXTENDED,DBCREATE(),DBSTRUCT(),__dbCopyXStruct(),__dbCreate(),__dbStructFilter()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* COPY STRUCTURE
* $CATEGORY$
* Command
* $ONELINER$
* Create a new database based on current database structure
* $SYNTAX$
* COPY STRUCTURE TO [FIELDS ]
* $ARGUMENTS$
* TO is the name of the new database file to
* create. (.dbf) is the default extension if none is given. It can be
* specified as a literal file name or as a character expression
* enclosed in parentheses.
*
* FIELDS is an optional list of field names to copy
* from the currently open database in the specified order, the default
* is all fields. Names could be specified as uppercase or lowercase.
* $DESCRIPTION$
* COPY STRUCTURE create a new empty database file with a structure
* that is based on the currently open database in this work-area.
*
* COPY STRUCTURE can be use to create a sub-set of the currently
* open database, based on a given field list.
*
* COPY STRUCTURE command is preprocessed into __dbCopyStruct()
* function during compile time.
* $EXAMPLES$
* // Create a new file that contains the same structure
* USE TEST
* COPY STRUCTURE TO MyCopy
*
* // Create a new file that contains part of the original structure
* USE TEST
* COPY STRUCTURE TO SomePart FIELDS name, address
* $STATUS$
* R
* $COMPLIANCE$
* COPY STRUCTURE works exactly as in CA-Cl*pper
* $PLATFORMS$
* All
* $SEEALSO$
* COPY STRUCTURE EXTENDED,DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbCopyXStruct(),__dbCreate(),__dbStructFilter()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __dbCopyXStruct()
* $CATEGORY$
* Database
* $ONELINER$
* Copy current database structure into a definition file
* $SYNTAX$
* __dbCopyXStruct( ) --> lSuccess
* $ARGUMENTS$
* is the name of target definition file to create. (.dbf)
* is the default extension if none is given.
* $RETURNS$
* __dbCopyXStruct() return (.F.) if no database is USED in the current
* work-area, (.T.) on success, or a run-time error if the file create
* operation had failed.
* $DESCRIPTION$
* __dbCopyXStruct() create a new database named with a
* pre-defined structure (also called "structure extended file"):
*
*
* Field name Type Length Decimals
*
* FIELD_NAME C 10 0
* FIELD_TYPE C 1 0
* FIELD_LEN N 3 0
* FIELD_DEC N 3 0
*
*
* Each record in the new file contains information about one field in
* the original file. CREATE FROM could be used to create a database
* from the structure extended file.
*
* For prehistoric compatibility reasons, Character fields which are
* longer than 255 characters are treated in a special way by writing
* part of the length in the FIELD_DEC according to the following
* formula (this is done internally):
*
*
* FIELD->FIELD_DEC := int( nLength / 256 )
* FIELD->FIELD_LEN := ( nLength % 256 )
*
*
* Later if you want to calculate the length of a field you can use
* the following formula:
*
*
* nLength := IIF( FIELD->FIELD_TYPE == "C", ;
* FIELD->FIELD_DEC * 256 + FIELD->FIELD_LEN, ;
* FIELD->FIELD_LEN )
*
*
* COPY STRUCTURE EXTENDED command is preprocessed into
* __dbCopyXStruct() function during compile time.
* $EXAMPLES$
* // Open a database, then copy its structure to a new file,
* // Open the new file and list all its records
* USE Test
* __dbCopyXStruct( "TestStru" )
* USE TestStru
* LIST
*
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* __dbCopyXStruct() works exactly like CA-Cl*pper's __dbCopyXStruct()
* $PLATFORMS$
* All
* $FILES$
* Library is rdd
* $SEEALSO$
* COPY STRUCTURE,COPY STRUCTURE EXTENDED,CREATE,CREATE FROM,DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbCreate()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* COPY STRUCTURE EXTENDED
* $CATEGORY$
* Command
* $ONELINER$
* Copy current database structure into a definition file
* $SYNTAX$
* COPY STRUCTURE EXTENDED TO
* $ARGUMENTS$
* TO The name of the target definition file to
* create. (.dbf) is the default extension if none is given. It can be
* specified as a literal file name or as a character expression
* enclosed in parentheses.
* $DESCRIPTION$
* COPY STRUCTURE EXTENDED create a new database named with
* a pre-defined structure (also called "structure extended file"):
*
*
* Field name Type Length Decimals
*
* FIELD_NAME C 10 0
* FIELD_TYPE C 1 0
* FIELD_LEN N 3 0
* FIELD_DEC N 3 0
*
*
* Each record in the new file contains information about one field in
* the original file. CREATE FROM could be used to create a database
* from the structure extended file.
*
* For prehistoric compatibility reasons, Character fields which are
* longer than 255 characters are treated in a special way by writing
* part of the length in the FIELD_DEC according to the following
* formula (this is done internally):
*
*
* FIELD->FIELD_DEC := int( nLength / 256 )
* FIELD->FIELD_LEN := ( nLength % 256 )
*
*
* Later if you want to calculate the length of a field you can use
* the following formula:
*
*
* nLength := IIF( FIELD->FIELD_TYPE == "C", ;
* FIELD->FIELD_DEC * 256 + FIELD->FIELD_LEN, ;
* FIELD->FIELD_LEN )
*
*
* COPY STRUCTURE EXTENDED command is preprocessed into
* __dbCopyXStruct() function during compile time.
* $EXAMPLES$
* // Open a database, then copy its structure to a new file,
* // Open the new file and list all its records
* USE Test
* COPY STRUCTURE EXTENDED TO TestStru
* USE TestStru
* LIST
* $STATUS$
* R
* $COMPLIANCE$
* COPY STRUCTURE EXTENDED works exactly as in CA-Cl*pper
* $PLATFORMS$
* All
* $SEEALSO$
* COPY STRUCTURE,CREATE,CREATE FROM,DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbCopyXStruct(),__dbCreate()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __dbCreate()
* $CATEGORY$
* Database
* $ONELINER$
* Create structure extended file or use one to create new file
* $SYNTAX$
* __dbCreate( , [], [], [],
* [] ) --> lUsed
* $ARGUMENTS$
* is the target file name to create and then open. (.dbf)
* is the default extension if none is given.
*
* is an optional structure extended file name from which
* the target file is going to be built. If omitted, a new
* empty structure extended file with the name is created
* and opened in the current work-area.
*
* is RDD name to create target with. If omitted, the
* default RDD is used.
*
* is an optional logical expression, (.T.) opens the target file
* name in the next available unused work-area and makes
* it the current work-area. (.F.) opens the target file in the current
* work-area. Default value is (.F.). The value of is ignored if
* is not specified.
*
* is an optional alias to USE the target file with. If not
* specified, alias is based on the root name of .
* $RETURNS$
* __dbCreate() returns (.T.) if there is database USED in the
* current work-area (this might be the newly selected work-area), or
* (.F.) if there is no database USED. Note that on success a (.T.)
* would be returned, but on failure you probably end up with a
* run-time error and not a (.F.) value.
* $DESCRIPTION$
* __dbCreate() works in two modes depending on the value of :
*
* 1) If is empty or not specified a new empty
* structure extended file with the name is created and
* then opened in the current work-area ( is ignored). The new
* file has the following structure:
*
*
* Field name Type Length Decimals
*
* FIELD_NAME C 10 0
* FIELD_TYPE C 1 0
* FIELD_LEN N 3 0
* FIELD_DEC N 3 0
*
*
* The CREATE command is preprocessed into the __dbCopyStruct() function
* during compile time and uses this mode.
*
* 2) If is specified, it is opened and assumed to
* be a structure extended file where each record contains at least the
* following fields (in no particular order): FIELD_NAME, FIELD_TYPE,
* FIELD_LEN and FIELD_DEC. Any other field is ignored. From this
* information the file is then created and opened in the
* current or new work-area (according to ), if this is a new
* work-area it becomes the current.
*
* For prehistoric compatibility reasons, structure extended file
* Character fields which are longer than 255 characters should be
* treated in a special way by writing part of the length in the
* FIELD_DEC according to the following formula:
*
*
* FIELD->FIELD_DEC := int( nLength / 256 )
* FIELD->FIELD_LEN := ( nLength % 256 )
*
*
* CREATE FROM command is preprocessed into __dbCopyStruct() function
* during compile time and use this mode.
* $EXAMPLES$
* // CREATE a new structure extended file, append some records and
* // then CREATE FROM this file a new database file
*
* __dbCreate( "template" )
* DBAPPEND()
* FIELD->FIELD_NAME := "CHANNEL"
* FIELD->FIELD_TYPE := "N"
* FIELD->FIELD_LEN := 2
* FIELD->FIELD_DEC := 0
* DBAPPEND()
* FIELD->FIELD_NAME := "PROGRAM"
* FIELD->FIELD_TYPE := "C"
* FIELD->FIELD_LEN := 20
* FIELD->FIELD_DEC := 0
* DBAPPEND()
* FIELD->FIELD_NAME := "REVIEW"
* FIELD->FIELD_TYPE := "C" // this field is 1000 char long
* FIELD->FIELD_LEN := 232 // 1000 % 256 = 232
* FIELD->FIELD_DEC := 3 // 1000 / 256 = 3
* DBCLOSEAREA()
* __dbCreate( "TV_Guide", "template" )
* $STATUS$
* R
* $COMPLIANCE$
* __dbCreate() works exactly as in CA-Cl*pper
* $PLATFORMS$
* All
* $FILES$
* Library is rdd
* $SEEALSO$
* COPY STRUCTURE,COPY STRUCTURE EXTENDED,CREATE,CREATE FROM,DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbCopyXStruct()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* CREATE
* $CATEGORY$
* Command
* $ONELINER$
* Create empty structure extended file
* $SYNTAX$
* CREATE [VIA ] [ALIAS ]
* $ARGUMENTS$
* is the target file name to create and then open. (.dbf)
* is the default extension if none is given. It can be specified as
* literal file name or as a character expression enclosed in
* parentheses.
*
* VIA is RDD name to create target with. If omitted,
* the default RDD is used. It can be specified as literal name or as a
* character expression enclosed in parentheses.
*
* ALIAS is an optional alias to USE the target file
* with. If not specified, alias is based on the root name of
* .
* $DESCRIPTION$
* CREATE a new empty structure extended file with the name
* and then open it in the current work-area. The new file has the
* following structure:
*
*
* Field name Type Length Decimals
*
* FIELD_NAME C 10 0
* FIELD_TYPE C 1 0
* FIELD_LEN N 3 0
* FIELD_DEC N 3 0
*
*
* CREATE command is preprocessed into __dbCopyStruct() function during
* compile time and use this mode.
* $EXAMPLES$
* // CREATE a new structure extended file, append some records and
* // then CREATE FROM this file a new database file
*
* CREATE template
* APPEND BLANK
* FIELD->FIELD_NAME := "CHANNEL"
* FIELD->FIELD_TYPE := "N"
* FIELD->FIELD_LEN := 2
* FIELD->FIELD_DEC := 0
* APPEND BLANK
* FIELD->FIELD_NAME := "PROGRAM"
* FIELD->FIELD_TYPE := "C"
* FIELD->FIELD_LEN := 20
* FIELD->FIELD_DEC := 0
* APPEND BLANK
* FIELD->FIELD_NAME := "REVIEW"
* FIELD->FIELD_TYPE := "C" // this field is 1000 char long
* FIELD->FIELD_LEN := 232 // 1000 % 256 = 232
* FIELD->FIELD_DEC := 3 // 1000 / 256 = 3
* CLOSE
* CREATE TV_Guide FROM template
* $STATUS$
* R
* $COMPLIANCE$
* CREATE works exactly as in CA-Cl*pper
* $PLATFORMS$
* All
* $SEEALSO$
* COPY STRUCTURE,COPY STRUCTURE EXTENDED,CREATE FROM,DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbCopyXStruct(),__dbCreate()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* CREATE FROM
* $CATEGORY$
* Command
* $ONELINER$
* Create new database file from a structure extended file
* $SYNTAX$
* CREATE FROM [VIA ] [NEW]
* [ALIAS ]
* $ARGUMENTS$
* is the target file name to create and then open. (.dbf)
* is the default extension if none is given. It can be specified as
* literal file name or as a character expression enclosed in
* parentheses.
*
* FROM is a structure extended file name from
* which the target file is going to be built. It can be
* specified as literal file name or as a character expression enclosed
* in parentheses.
*
* VIA is RDD name to create target with. If omitted,
* the default RDD is used. It can be specified as literal name or as a
* character expression enclosed in parentheses.
*
* NEW open the target file name in the next
* available unused work-area and making it the current work-area. If
* omitted open the target file in current work-area.
*
* ALIAS is an optional alias to USE the target file
* with. If not specified, alias is based on the root name of
* .
* $DESCRIPTION$
* CREATE FROM open a structure extended file where each
* record contain at least the following fields (in no particular
* order): FIELD_NAME, FIELD_TYPE, FIELD_LEN and FIELD_DEC. Any other
* field is ignored. From this information the file is
* then created and opened in the current or new work-area (according to
* the NEW clause), if this is a new work-area it becomes the current.
*
* For prehistoric compatibility reasons, structure extended file
* Character fields which are longer than 255 characters should be
* treated in a special way by writing part of the length in the
* FIELD_DEC according to the following formula:
*
*
* FIELD->FIELD_DEC := int( nLength / 256 )
* FIELD->FIELD_LEN := ( nLength % 256 )
*
*
* CREATE FROM command is preprocessed into __dbCopyStruct() function
* during compile time and uses this mode.
* $EXAMPLES$
* See example in the CREATE command
* $STATUS$
* R
* $COMPLIANCE$
* CREATE FROM works exactly as in CA-Cl*pper
* $PLATFORMS$
* All
* $SEEALSO$
* COPY STRUCTURE,COPY STRUCTURE EXTENDED,CREATE,DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbCopyXStruct(),__dbCreate()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __FLEDIT()*
* $CATEGORY$
* Database
* $ONELINER$
* Filter a database structure array
* $SYNTAX$
* __FLEDIT( , [] ) --> aStructFiltered
* $ARGUMENTS$
* is a multidimensional array with database fields
* structure, which is usually the output from DBSTRUCT(), where each
* array element has the following structure:
*
*
* Position Description dbstruct.ch
*
* 1 cFieldName DBS_NAME
* 2 cFieldType DBS_TYPE
* 3 nFieldLength DBS_LEN
* 4 nDecimals DBS_DEC
*
*
* is an array where each element is a field name.
* Names could be specified as uppercase or lowercase.
* $RETURNS$
* __FLEDIT() return a new multidimensional array where each element is
* in the same structure as the original , but the array is
* built according to the list of fields in . If
* is empty, __FLEDIT() return reference to the original
* array.
* $DESCRIPTION$
* __FLEDIT() can be use to create a sub-set of a database structure,
* based on a given field list.
*
* Note that field names in MUST be specified in uppercase
* or else no match would found.
*
* SET EXACT has no effect on the return value.
*
* __FLEDIT() is a compatibility function and it is synonym for
* __dbStructFilter() which does exactly the same.
* $EXAMPLES$
* LOCAL aStruct, aList, aRet
* aStruct := { { "CODE", "N", 4, 0 }, ;
* { "NAME", "C", 10, 0 }, ;
* { "PHONE", "C", 13, 0 }, ;
* { "IQ", "N", 3, 0 } }
* aList := { "IQ", "NAME" }
* aRet := __FLEDIT( aStruct, aList )
* // { { "IQ", "N", 3, 0 }, { "NAME", "C", 10, 0 } }
*
* aRet := __FLEDIT( aStruct, {} )
* ? aRet == aStruct // .T.
*
* aList := { "iq", "NOTEXIST" }
* aRet := __FLEDIT( aStruct, aList )
* // { { "IQ", "N", 3, 0 } }
*
* aList := { "NOTEXIST" }
* aRet := __FLEDIT( aStruct, aList ) // {}
*
*
* // Create a new file that contain part of the original structure
* LOCAL aStruct, aList, aRet
* USE TEST
* aStruct := DBSTRUCT()
* aList := { "NAME" }
* DBCREATE( "onlyname.dbf", __FLEDIT( aStruct, aList ) )
* $STATUS$
* R
* $COMPLIANCE$
* CA-Cl*pper has internal undocumented function named __FLEDIT(),
* in Harbour we name it __dbStructFilter(). The new name gives a better
* description of what this function does. In Harbour __FLEDIT() simply
* calls __dbStructFilter() and therefor the later is the recommended
* function to use.
*
* This function is only visible if source/rdd/dbstrux.prg was compiled
* with the HB_C52_UNDOC flag.
* $PLATFORMS$
* All
* $FILES$
* Header file is dbstruct.ch
* Library is rdd
* $SEEALSO$
* DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__dbStructFilter()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __dbStructFilter()
* $CATEGORY$
* Database
* $ONELINER$
* Filter a database structure array
* $SYNTAX$
* __dbStructFilter( , [] ) --> aStructFiltered
* $ARGUMENTS$
* is a multidimensional array with database fields
* structure, which is usually the output from DBSTRUCT(), where each
* array element has the following structure:
*
*
* Position Description dbstruct.ch
*
* 1 cFieldName DBS_NAME
* 2 cFieldType DBS_TYPE
* 3 nFieldLength DBS_LEN
* 4 nDecimals DBS_DEC
*
*
* is an array where each element is a field name.
* Names could be specified as uppercase or lowercase.
* $RETURNS$
* __dbStructFilter() return a new multidimensional array where each
* element is in the same structure as the original , but the
* array is built according to the list of fields in . If
* is empty, __dbStructFilter() return reference to the
* original array.
* $DESCRIPTION$
* __dbStructFilter() can be use to create a sub-set of a database
* structure, based on a given field list.
*
* Note that field names in MUST be specified in uppercase
* or else no match would be found.
*
* SET EXACT has no effect on the return value.
* $EXAMPLES$
* LOCAL aStruct, aList, aRet
* aStruct := { { "CODE", "N", 4, 0 }, ;
* { "NAME", "C", 10, 0 }, ;
* { "PHONE", "C", 13, 0 }, ;
* { "IQ", "N", 3, 0 } }
* aList := { "IQ", "NAME" }
* aRet := __dbStructFilter( aStruct, aList )
* // { { "IQ", "N", 3, 0 }, { "NAME", "C", 10, 0 } }
*
* aRet := __dbStructFilter( aStruct, {} )
* ? aRet == aStruct // .T.
*
* aList := { "iq", "NOTEXIST" }
* aRet := __dbStructFilter( aStruct, aList )
* // { { "IQ", "N", 3, 0 } }
*
* aList := { "NOTEXIST" }
* aRet := __dbStructFilter( aStruct, aList ) // {}
*
*
* // Create a new file that contain part of the original structure
* LOCAL aStruct, aList, aRet
* USE TEST
* aStruct := DBSTRUCT()
* aList := { "NAME" }
* DBCREATE( "onlyname.dbf", __dbStructFilter( aStruct, aList ) )
* $STATUS$
* R
* $COMPLIANCE$
* __dbStructFilter() is a Harbour extension. CA-Cl*pper has an internal
* undocumented function named __FLEDIT() that does exactly the same
* thing. The new name gives a better description of what this function does.
* $PLATFORMS$
* All
* $FILES$
* Header file is dbstruct.ch
* Library is rdd
* $SEEALSO$
* DBCREATE(),DBSTRUCT(),__dbCopyStruct(),__FLEDIT()*
* $END$
*/
|
c:\harbour\doc\en\dir.txt |
/*
* $Id: dir.txt 9243 2008-08-25 21:36:00Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999 Chen Kedem
* Documentation for: __DIR(), DIR, ADIR()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* __Dir()*
* $CATEGORY$
* File management
* $ONELINER$
* Display listings of files
* $SYNTAX$
* __Dir( [] ) --> NIL
* $ARGUMENTS$
* File mask to include in the function return. It could
* contain path and standard wildcard characters as supported by your
* OS (like * and ?). If contains no path, then SET DEFAULT
* path is used to display files in the mask.
* $RETURNS$
* __Dir() always returns NIL.
* $DESCRIPTION$
* If no is given, __Dir() displays information about all
* *.dbf in the SET DEFAULT path. This information contains: file name,
* number of records, last update date and the size of each file.
*
* If is given, __Dir() list all files that match the mask
* with the following details: Name, Extension, Size, Date.
*
* DIR command is preprocessed into __Dir() function during compile
* time.
*
* __Dir() is a compatibility function, it is superseded by DIRECTORY()
* which return all the information in a multidimensional array.
* $EXAMPLES$
* __Dir() // information for all DBF files in current directory
*
* __Dir( "*.dbf" ) // list all DBF file in current directory
*
* // list all PRG files in Harbour Run-Time library
* // for DOS compatible operating systems
* __Dir( "C:\harbour\source\rtl\*.prg" )
*
* // list all files in the public section on a Unix like machine
* __Dir( "/pub" )
* $STATUS$
* R
* $COMPLIANCE$
* DBF information: CA-Cl*pper displays 8.3 file names, Harbour displays
* the first 15 characters of a long file name if available.
*
* File listing: To format file names displayed we use something like:
* PadR( Name, 8 ) + " " + PadR( Ext, 3 )
* CA-Cl*pper use 8.3 file name, with Harbour it would probably cut
* long file names to feet this template.
* $FILES$
* Library is rtl
* $SEEALSO$
* ADIR(),DIRECTORY(),SET DEFAULT,DIR
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DIR
* $CATEGORY$
* Command
* $ONELINER$
* Display listings of files
* $SYNTAX$
* DIR []
* $ARGUMENTS$
* File mask to include in the function return. It could
* contain path and standard wildcard characters as supported by your
* OS (like * and ?). If contains no path, then SET DEFAULT
* path is used to display files in the mask.
* $DESCRIPTION$
* If no is given, __Dir() display information about all
* *.dbf in the SET DEFAULT path, this information contain: file name,
* number of records, last update date and the size of each file.
*
* If is given, __Dir() list all files that match the mask
* with the following details: Name, Extension, Size, Date.
*
* DIR command is preprocessed into __Dir() function during compile
* time.
*
* __Dir() is a compatibility function, it is superseded by DIRECTORY()
* which returns all the information in a multidimensional array.
* $EXAMPLES$
* DIR // information for all DBF files in current directory
*
* dir "*.dbf" // list all DBF file in current directory
*
* // list all PRG files in Harbour Run-Time library
* // for DOS compatible operating systems
* Dir "C:\harbour\source\rtl\*.prg"
*
* // list all files in the public section on a Unix like machine
* Dir "/pub"
* $STATUS$
* R
* $COMPLIANCE$
* DBF information: CA-Cl*pper displays 8.3 file names, Harbour displays
* the first 15 characters of a long file name if available.
*
* File listing: To format file names displayed we use something like:
* PadR( Name, 8 ) + " " + PadR( Ext, 3 )
* CA-Cl*pper use 8.3 file name, with Harbour it would probably cut
* long file names to feet this template.
* $SEEALSO$
* ADIR(),DIRECTORY(),SET DEFAULT,__DIR()*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ADIR()
* $CATEGORY$
* Array
* $ONELINER$
* Fill pre-defined arrays with file/directory information
* $SYNTAX$
* ADIR( [], [], [], [],
* [], [] ) --> nDirEnries
* $ARGUMENTS$
* File mask to include in the function return. It could
* contain path and standard wildcard characters as supported by your
* OS (like * and ?). If you omit or if contains
* no path, then the path from SET DEFAULT is used.
*
* Array to fill with file name of files that meet .
* Each element is a Character string and include the file name and
* extension without the path. The name is the long file name as
* reported by the OS and not necessarily the 8.3 uppercase name.
*
* Array to fill with file size of files that meet .
* Each element is a Numeric integer for the file size in Bytes.
* Directories are always zero in size.
*
* Array to fill with file last modification date of files that
* meet . Each element is of type Date.
*
* Array to fill with file last modification time of files that
* meet . Each element is a Character string in the format
* HH:mm:ss.
*
* Array to fill with attribute of files that meet .
* Each element is a Character string, see DIRECTORY() for information
* about attribute values. If you pass array to , the function
* is going to return files with normal, hidden, system and directory
* attributes. If is not specified or with type other than
* Array, only files with normal attribute would return.
* $RETURNS$
* ADIR() return the number of file entries that meet
* $DESCRIPTION$
* ADIR() return the number of files and/or directories that match
* a specified skeleton, it also fill a series of given arrays with
* the name, size, date, time and attribute of those files. The passed
* arrays should pre-initialized to the proper size, see example below.
* In order to include hidden, system or directories must be
* specified.
*
* ADIR() is a compatibility function, it is superseded by DIRECTORY()
* which returns all the information in a multidimensional array.
* $EXAMPLES$
* LOCAL aName, aSize, aDate, aTime, aAttr, nLen, i
* nLen := ADIR( "*.jpg" ) // Number of JPG files in this directory
* IF nLen > 0
* aName := Array( nLen ) // make room to store the information
* aSize := Array( nLen )
* aDate := Array( nLen )
* aTime := Array( nLen )
* aAttr := Array( nLen )
* FOR i = 1 TO nLen
* ? aName[i], aSize[i], aDate[i], aTime[i], aAttr[i]
* NEXT
* ELSE
* ? "This directory is clean from smut"
* ENDIF
* $STATUS$
* R
* $COMPLIANCE$
* is going to be fill with long file name and not necessarily
* the 8.3 uppercase name.
* $FILES$
* Library is rtl
* $SEEALSO$
* ARRAY(),DIRECTORY(),SET DEFAULT
* $END$
*/
|
c:\harbour\doc\en\diskspac.txt |
/*
* $Id: diskspac.txt 9192 2008-08-19 14:17:51Z vszakats $
*/
/*
* The following are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Paul Tucker
* Documentation for: DISKSPACE() and related functions
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* DISKSPACE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Get the amount of space available on a disk
* $SYNTAX$
* DISKSPACE( [] ) --> nDiskbytes
* $ARGUMENTS$
* The number of the drive you are requesting info on where 1 = A,
* 2 = B, etc. For 0 or no parameter, DiskSpace will operate on the current
* drive. The default is 0
* $RETURNS$
* The number of bytes on the requested disk that match the
* requested type.
* $DESCRIPTION$
* By default, this function will return the number of bytes of
* free space on the current drive that is available to the user
* requesting the information.
*
* If information is requested on a disk that is not available, a runtime
* error 2018 will be raised.
* $EXAMPLES$
* ? "You can use : " +Str( DiskSpace() ) + " bytes " +;
* Note: See tests\tstdspac.prg for another example
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* Dos,Win32,OS/2
* $FILES$
* Library is rtl
* Header is fileio.ch
* $END$
*/
/* $DOC$
* $FUNCNAME$
* HB_DISKSPACE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Get the amount of space available on a disk
* $SYNTAX$
* HB_DISKSPACE( [] [, ] ) --> nDiskbytes
* $ARGUMENTS$
* The drive letter you are requesting info on. The default
* is A:
* The type of space being requested. The default is HB_DISK_AVAIL.
* $RETURNS$
* The number of bytes on the requested disk that match the
* requested type.
* $DESCRIPTION$
* By default, this function will return the number of bytes of
* free space on the current drive that is available to the user
* requesting the information.
*
* There are 4 types of information available:
*
* HB_FS_AVAIL The amount of space available to the user making the
* request. This value could be less than HB_FS_FREE if
* disk quotas are supported by the O/S in use at runtime,
* and disk quotas are in effect. Otherwise, the value
* will be equal to that returned for HB_FS_FREE.
* HB_FS_FREE The actual amount of free diskspace on the drive.
* HB_FS_USED The number of bytes in use on the disk.
* HB_FS_TOTAL The total amount of space allocated for the user if
* disk quotas are in effect, otherwise, the actual size
* of the drive.
*
* If information is requested on a disk that is not available, a runtime
* error 2018 will be raised.
* $EXAMPLES$
* ? "You can use : " + Str( HB_DiskSpace() ) + " bytes " +;
* "Out of a total of " + Str( HB_DiskSpace( "C:", HB_FS_TOTAL ) )
*
* Note: See tests\tstdspac.prg for another example
* $STATUS$
* R
* $COMPLIANCE$
* CA-Cl*pper will return an integer value which limits its usefulness to
* drives less than 2 gigabytes. The Harbour version will return a
* floating point value with 0 decimals if the disk is > 2 gigabytes.
* is a Harbour extension.
* $PLATFORMS$
* Dos,Win32,OS/2,Unix
* $FILES$
* Library is rtl
* Header is fileio.ch
* $END$
*/
|
c:\harbour\doc\en\error.txt |
/*
* $Id: error.txt 9191 2008-08-19 13:11:22Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999 Chen Kedem
* Documentation for: ERRORSYS()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* ERRORSYS()
* $CATEGORY$
* Error recovery
* $ONELINER$
* Install default error handler
* $SYNTAX$
* ERRORSYS() --> NIL
* $ARGUMENTS$
* None.
* $RETURNS$
* ERRORSYS() always return NIL.
* $DESCRIPTION$
* ERRORSYS() is called upon startup by Harbour and install the default
* error handler. Normally you should not call this function directly,
* instead use ERRORBLOCK() to install your own error handler.
* $STATUS$
* R
* $COMPLIANCE$
* ERRORSYS() works exactly like CA-Cl*pper's ERRORSYS().
* $FILES$
* Library is rtl
* $SEEALSO$
* ERRORBLOCK(),Error class
* $END$
*/
|
c:\harbour\doc\en\eval.txt |
/*
* $Id: eval.txt 9192 2008-08-19 14:17:51Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Luiz Rafael Culik
* Documentation for: EVAL()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* EVAL()
* $CATEGORY$
* Code Block
* $ONELINER$
* Evaluate a code block
* $SYNTAX$
* EVAL( [, [,...]]) --> xExpression
* $ARGUMENTS$
* Code block expression to be evaluated
*
* Argument to be passed to the code block expression
*
* Argument list to be passed to the code block expression
* $RETURNS$
* The result of the evaluated code block
* $DESCRIPTION$
* This function evaluates the code bloc expressed as and
* returns its evaluated value. If their are multiple expressions within
* the code block, the last expression will be value of this function.
*
* If the code block requires parameters to be passed to it,they are
* specified in the parameter list and following. Each parameter
* is separated by a comma within the expression list.
* $EXAMPLES$
* FUNC MAIN
* LOCAL sbBlock := {|| NIL }
* ? Eval( 1 )
* ? Eval( @sbBlock )
*
* ? Eval( {|p1| p1 },"A","B")
* ? Eval( {|p1,p2| p1+p2 },"A","B")
* ? Eval( {|p1,p2,p3| p1 },"A","B")
* Return Nil
* $TESTS$
* See examples
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $PLATFORMS$
* All
* $FILES$
* Library is vm
* $SEEALSO$
* AEVAL(),DBEVAL()
* $END$
*/
|
c:\harbour\doc\en\file.txt |
/*
* $Id: file.txt 9243 2008-08-25 21:36:00Z vszakats $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 2000 Chen Kedem
* Documentation for: __TYPEFILE(), TYPE
*
* Copyright 2000 Luiz Rafael Culik
* Documentation for: FOPEN(), FCLOSE(), FWRITE(), FSEEK(), FREAD(), FILE(),
* FREADSTR(), FRENAME(), FERROR(), RENAME, ERASE, CURDIR(),
* DIRMAKE(), DIRCHANGE(), ISDISK(), DIRREMOVE(), DISKCHANGE(),
* DIRCHANGE()
*
* Copyright 2000 David G. Holm
* Documentation for: HB_FEOF()
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* FOPEN()
* $CATEGORY$
* Low Level
* $ONELINER$
* Open a file.
* $SYNTAX$
* FOPEN( , [] ) --> nHandle
* $ARGUMENTS$
* Name of file to open.
*
* Dos file open mode.
* $RETURNS$
* A file handle.
* $DESCRIPTION$
* This function opens a file expressed as and returns a
* file handle to be used with other low-level file functions. The
* value of represents the status of the file to be opened;
* the default value is 0. The file open modes are as follows:
*
* nMode fileio.ch Meaning
*
* 0 FO_READ Read only
* 1 FO_WRITE Write only
* 2 FO_READWRITE Read/write
* 16 FO_EXCLUSIVE Exclusive read only
* 32 FO_DENYWRITE Prevent others from writing
* 48 FO_DENYREAD Deny read only
* 64 FO_DENYNONE Not deny, Let to others Read / Write
* 64 FO_SHARED same as FO_DENYNONE
*
* If there is an error in opening a file, a -1 will be returned by
* the function. Files handles may be in the range of 0 to 65535. The
* status of the SET DEFAULT TO and SET PATH TO commands has no effect
* on this function. Directory names and paths must be specified along
* with the file that is to be opened.
*
* If an error has occured, see the returns values from FERROR() for
* possible reasons for the error.
* $EXAMPLES$
*
* IF (nH:=FOPEN('x.txt',66) < 0
* ? 'File can't be opened'
* ENDIF
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is rtl
* Header is fileio.ch
* $SEEALSO$
* FCREATE(),FERROR(),FCLOSE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FCREATE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Creates a file.
* $SYNTAX$
* FCREATE( , [] ) --> nHandle
* $ARGUMENTS$
* is the name of the file to create.
*
* Numeric code for the file attributes.
* $RETURNS$
* Numeric file handle to be used in other operations.
* $DESCRIPTION$
* This function creates a new file with a filename of . The
* default value of is 0 and is used to set the
* attribute byte for the file being created by this function.
* The return value will be a file handle that is associated
* with the new file. This number will be between zero to 65,535,
* inclusive. If an error occurs, the return value of this function
* will be -1.
*
* If the file already exists, the existing file will be
* truncated to a file length of 0 bytes.
* If specified, the following table shows the value for
* and their related meaning to the file being created by
* this function.
*
*
* fileio.ch Meaning
*
* 0 FC_NORMAL Normal/Default,Read/Write
* 1 FC_READONLY Read-only file attribute is set
* 2 FC_HIDDEN Hidden,Excluded from normal DIR search
* 4 FC_SYSTEM Create,Excluded from normal DIR search
*
* $EXAMPLES$
* IF (nh:=FCREATE("test.txt") <0
* ? "Cannot create file"
* ENDIF
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant.
* $FILES$
* Library is rtl
* Header is fileio.ch
* $SEEALSO$
* FCLOSE(),FOPEN(),FWRITE(),FREAD(),FERROR()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FREAD()
* $CATEGORY$
* Low Level
* $ONELINER$
* Reads a specified number of bytes from a file.
* $SYNTAX$
* FREAD( , @, ) --> nBytes
* $ARGUMENTS$
* Dos file handle
* Character expression passed by reference.
* Number of bytes to read.
* $RETURNS$
* the number of bytes successfully read from the file.
*
* $DESCRIPTION$
* This function reads the characters from a file whose file handle
* is into a character memory variable expressed as .
* The function returns the number of bytes successfully read into
* .
* The value of is obtained from either a call to the FOPEN()
* or the FCREATE() function.
* The expression is passed by reference and must be defined
* before this function is called. It also must be at least the same
* length as .
* is the number of bytes to read, starting at the current
* file pointer position. If this function is successful in reading
* the characters from the file, the length of or the number
* of bytes specified in will be the value returned. The current
* file pointer advances the number of bytes read with each successive
* read. The return value is the number of bytes successfully read
* from the file. If a 0 is returned, or if the number of
* bytes read matches neither the length of nor the specified
* value in an end-of-file condition has been reached.
* $EXAMPLES$
* cBuffer:=SPACE(500)
* IF (nH:=FOPEN('x.txt'))>0
* FREAD(nH,@cBuffer,500)
* ? cbuffer
* ENDIF
* FCLOSE(nH)
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant, but also extends the possible
* buffer size to strings greater than 65K (depending on platform).
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2W(),FERROR(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FWRITE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Writes characters to a file.
* $SYNTAX$
* FWRITE( , , [] ) --> nBytesWritten
* $ARGUMENTS$
* DOS file handle number.
* Character expression to be written.
* The number of bytes to write.
* $RETURNS$
* the number of bytes successfully written.
* $DESCRIPTION$
* This function writes the contents of to the file designated
* by its file handle . If used, is the number of
* bytes in to write.
* The returned value is the number of bytes successfully written to the
* DOS file. If the returned value is 0, an error has occurred (unless
* this is intended). A successful write occurs when the number returned
* by FWRITE() is equal to either LEN( ) or .
* The value of is the string or variable to be written to the
* open DOS file .
* The value of is the number of bytes to write out to the file.
* The disk write begins with the current file position in . If
* this variable is not used, the entire contents of is written
* to the file.
* To truncate a file, a call of FWRITE( nHandle, "", 0 ) is needed.
* $EXAMPLES$
* nHandle := FCREATE( "x.txt" )
* FOR X := 1 TO 10
* FWRITE( nHandle, STR( x ) )
* NEXT
* FCLOSE( nHandle )
* $STATUS$
* R
* $COMPLIANCE$
* This function is not CA-Cl*pper compatile since
* it can writes strings greather the 64K
* $FILES$
* Library is rtl
* $SEEALSO$
* FCLOSE(), FCREATE(), FERROR(), FOPEN(), I2BIN(), L2BIN()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FERROR()
* $CATEGORY$
* Low Level
* $ONELINER$
* Reports the error status of low-level file functions
* $SYNTAX$
* FERROR() -->
* $RETURNS$
* Value of the DOS error last encountered by a
* low-level file function.
*
* FERROR() Return Values
*
*
* Error Meaning
*
* 0 Successful
* 2 File not found
* 3 Path not found
* 4 Too many files open
* 5 Access denied
* 6 Invalid handle
* 8 Insufficient memory
* 15 Invalid drive specified
* 19 Attempted to write to a write-protected disk
* 21 Drive not ready
* 23 Data CRC error
* 29 Write fault
* 30 Read fault
* 32 Sharing violation
* 33 Lock Violation
*
* $DESCRIPTION$
* After every low-level file function,this function will return
* a value that provides additional informationon the status of
* the last low-level file functions's performance. If the FERROR()
* function returns a 0, no error was detected. Below is a table
* of possibles values returned by the FERROR() function.
* $EXAMPLES$
* #include "fileio.ch"
* //
* nHandle := FCREATE( "temp.txt", FC_NORMAL )
* IF FERROR() != 0
* ? "Cannot create file, DOS error ", FERROR()
* ENDIF
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compatible
* $FILES$
* Library is rtl
* $SEEALSO$
* FCLOSE(),FERASE(),FOPEN(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FCLOSE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Closes an open file
* $SYNTAX$
* FCLOSE( ) -->
* $ARGUMENTS$
* DOS file handle
* $RETURNS$
* Logical TRUE (.T.) or FALSE (.F.)
* $DESCRIPTION$
* This function closes an open file with a dos file handle
* of and writes the associated DOS buffer to the
* disk. The value is derived from the FCREATE()
* or FOPEN() function.
* $EXAMPLES$
* nHandle:=FOPEN('x.txt')
* ? FSEEK(nHandle, 0, 2)
* FCLOSE(nHandle)
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is rtl
* $SEEALSO$
* FOPEN(),FCREATE(),FREAD(),FWRITE(),FERROR()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FERASE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Erase a file from disk
* $SYNTAX$
* FERASE( ) --> nSuccess
* $ARGUMENTS$
* Name of file to erase.
* $RETURNS$
* 0 if successful, -1 if not
* $DESCRIPTION$
* This function deletes the file specified in from the disk.
* No extensions are assumed. The drive and path my be included in
* ; neither the SET DEFAULT not the SET PATH command controls
* the performance of this function. If the drive or path is not used,
* the function will look for the file only on the currently selected
* direcytory on the logged drive.
*
* If the function is able to successfully delete the file from the
* disk, the value of the function will be 0; otherwise a -1 will
* be returned. If not successfu, aditional information may be
* obtained by calling the FERROR() function.
*
* Note: Any file to be removed by FERASE() must still be closed.
*
* $EXAMPLES$
* IF FERASE("test.txt")==0
* ? "File successfully erased"
* ELSE
* ? "File can not be deleted"
* ENDIF
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper Compatible
* $FILES$
* Library is rtl
* $SEEALSO$
* FERROR(),FRENAME()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FRENAME()
* $CATEGORY$
* File management
* $ONELINER$
* Renames a file
* $SYNTAX$
* FRENAME( , ) --> nSuccess
* $ARGUMENTS$
* Old filenarne to he changed
* New filename
* $RETURNS$
* If sucessful, a 0 will he returned otherwise,
* a -1 will be returned.
* $DESCRIPTION$
* This function renames the specified file to .
* A filename and/or directory name may be specified for either para-
* meter. However, if a path is supplied as part of and
* this path is different from either the path specified in
* or (if none is used) the current drive and directory, the function
* will not execute successfully.
* Neither parameter is subject to the control of the SET PATH TO or
* SET DEFAULT TO commands. In attempting to locate the file to be
* renamed, this function will search the default drive and directory
* or the drive and path specified in . It will not search
* directories named by the SET PATH TO and SET DEFAULT TO commands
* or by the DOS PATH statement.
* If the file specified in exists or the file is open,
* the function will be unable to rename the file. If the function
* is unable to complete its operation,it will return a value of -1.
* If it is able to rename the file, the return value for the function
* will be 0. A call to FERROR() function will give additional infor-
* mation about any error found.
* $EXAMPLES$
* nResult := FRENAME( "x.txt", "x1.txt" )
* IF nResult < 0
* ? "File could not be renamed."
* ENDIF
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant
* $FILES$
* Library is rtl
* $SEEALSO$
* ERASE,FERASE(),FERROR(),FILE(),RENAME
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FSEEK()
* $CATEGORY$
* Low Level
* $ONELINER$
* Positions the file pointer in a file.
* $SYNTAX$
* FSEEK( , , [] ) --> nPosition
* $ARGUMENTS$
* DOS file handle.
* The number of bytes to move.
* The relative position in the file.
* $RETURNS$
* the current position relative to begin-of-file
* $DESCRIPTION$
* This function sets the file pointer in the file whose DOS file
* handle is and moves the file pointer by bytes
* from the file position designated by . The returned value
* is the relative position of the file pointer to the beginning-of-file
* marker once the operation has been completed.
* is the file handle number. It is obtained from the FOPEN()
* or FCREATE() function.
* The value of is the number of bytes to move the file pointer
* from the position determined by . The value of may
* be a negative number, suggesting backward movement.
* The value of designates the starting point from which the
* file pointer should he moved, as shown in the following table:
*
* fileio.ch File position
*
* 0 FS_SET Beginning of file
* 1 FS_RELATIVE Current file pointer position
* 2 FS_END End of file
*
* If a value is not provided for , it defaults to 0 and
* moves the file pointer from the beginning of the file.
* $EXAMPLES$
* // here is a function that read one text line from an open file
*
* // nH = file handle obtained from FOPEN()
* // cB = a string buffer passed-by-reference to hold the result
* // nMaxLine = maximum number of bytes to read
*
* #define EOL HB_OSNEWLINE()
* FUNCTION FREADln( nH, cB, nMaxLine )
* LOCAL cLine, nSavePos, nEol, nNumRead
* cLine := space( nMaxLine )
* cB := ''
* nSavePos := FSEEK( nH, 0, FS_RELATIVE )
* nNumRead := FREAD( nH, @cLine, nMaxLine )
* IF ( nEol := AT( EOL, substr( cLine, 1, nNumRead ) ) ) == 0
* cB := cLine
* ELSE
* cB := SUBSTR( cLine, 1, nEol - 1 )
* FSEEK( nH, nSavePos + nEol + 1, FS_SET )
* ENDIF
* RETURN nNumRead != 0
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper compliant.
* $FILES$
* Library is rtl
* Header is fileio.ch
* $SEEALSO$
* FCREATE(),FERROR(),FOPEN(),FREAD(),FREADSTR(),FWRITE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FILE()
* $CATEGORY$
* File management
* $ONELINER$
* Tests for the existence of file(s)
* $SYNTAX$
* FILE( ) --> lExists
* $ARGUMENTS$
* Dos Skeleton or file name to find.
* $RETURNS$
* a logical true (.T.) if the file exists or logical
* false (.F.).
* $DESCRIPTION$
* This function return a logical true (.T.) if the given filename
* exist.
* Dos skeletons symbols may be used in the filename in ,
* as may the drive and/or path name. If a path is not explicity
* specified, FILE() will look for the file in the SET DEFAULT path,
* then in each SET PATH path, until the file is found or there are
* no more paths to search. The DOS PATH is never searched and the
* current drive/directory is only searched if SET DEFAULT is blank.
* $EXAMPLES$
* ? file('C:\harbour\doc\compiler.txt")
* ? file('C:/harbour/doc/subcodes.txt")
*
* $STATUS$
* S (wild card support is missing)
* $COMPLIANCE$
* This function is CA-Cl*pper compatible.
* $FILES$
* Library is rtl
* $SEEALSO$
* SET DEFAULT,SET PATH,SET()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* FREADSTR()
* $CATEGORY$
* Low Level
* $ONELINER$
* Reads a string from a file.
* $SYNTAX$
* FREADSTR(, ) --> cString
* $ARGUMENTS$
* DOS file handle number.
*
* Number of bytes to read.
* $RETURNS$
* an characted expression
* $DESCRIPTION$
* This function returns a character string of bytes from a
* file whose DOS file handle is .
* The value of the file handle is obtained from either the
* FOPEN() or FCREATE() functions.
* The value of is the number of bytes to read from the file.
* The returned string will be the number of characters specified in
* or the number of bytes read before an end-of-file charac-
* ter (ASCII 26) is found.
* NOTE This function is similar to the FREAD() function, except that
* it will not read binary characters that may he required as part of
* a header of a file construct. Characters Such as CHR(0) and CHR(26)
* may keep this function from performing its intended operation. In this
* event, the FREAD() function should he used in place of the FREADSTR()
* function.
* $EXAMPLES$
* IF ( nH := FOPEN("x.txt") ) > 0
* cStr := Freadstr(nH,100)
* ? cStr
* ENDIF
* FCLOSE(nH)
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is not CA-Cl*pper compliant since may read
* strings greather the 65K depending of platform.
* $FILES$
* Library is rtl
* $SEEALSO$
* BIN2I(),BIN2L(),BIN2W(),FERROR(),FREAD(),FSEEK()
* $END$
*/
/* HARBOUR COMMANDS */
/* $DOC$
* $FUNCNAME$
* RENAME
* $CATEGORY$
* Command
* $ONELINER$
* Changes the name of a specified file
* $SYNTAX$
* RENAME TO
* $ARGUMENTS$
* Old filename
* New Filename
* $DESCRIPTION$
* This command changes the name of to . Both
* and must include a file extension. This command
* if not affected by the SET PATH TO or SET DEFAULT TO commands;drive
* and directoy designaters must be specified if either file is in a
* directory other then the default drive and directory.
*
* If id currently open or if it previously exists, this
* command will not perform the desired operation.
* $EXAMPLES$
* RENAME C:\autoexec.bat TO C:\autoexec.old
*
* $STATUS$
* R
* $COMPLIANCE$
* This command is CA-Cl*pper compatible
* $FILES$
* Library is rtl
* $SEEALSO$
* CURDIR(),ERASE,FILE(),FERASE(),FRENAME()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ERASE
* $CATEGORY$
* Command
* $ONELINER$
* Remove a file from disk
* $SYNTAX$
* ERASE
* $ARGUMENTS$
* Name of file to remove
* $DESCRIPTION$
* This command removes a file from the disk. The use of a drive,directo-
* ry, and wild-card skeleton operator is allowed for the root of the
* filename. The file extension is required. The SET DEFAULT and SET PATH
* commands do not affect this command.
* The file must be considered closed by the operating system before it
* may be deleted.
* $EXAMPLES$
* ERASE C:\autoexec.bat
* ERASE C:/temp/read.txt
*
* $STATUS$
* R
* $COMPLIANCE$
* This command is CA-Cl*pper compatible
* $SEEALSO$
* CURDIR(), FILE(), FERASE(), DELETE FILE
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DELETE FILE
* $CATEGORY$
* Command
* $ONELINER$
* Remove a file from disk
* $SYNTAX$
* DELETE FILE
* $ARGUMENTS$
* Name of file to remove
* $DESCRIPTION$
* This command removes a file from the disk. The use of a drive,directo-
* ry,and wild-card skeleton operator is allowed for the root of the
* filename. The file extension is required. The SET DEFAULT and SET PATH
* commands do not affect this command.
* The file must be considered closed by the operating system before it
* may be deleted.
* $EXAMPLES$
* ERASE C:\autoexec.bat
* ERASE C:/temp/read.txt
*
* $STATUS$
* R
* $COMPLIANCE$
* This command is CA-Cl*pper compatible
* $SEEALSO$
* CURDIR(), FILE(), FERASE(), ERASE
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __TYPEFILE()
* $CATEGORY$
* Data input and output
* $ONELINER$
* Show the content of a file on the console and/or printer
* $SYNTAX$
* __TYPEFILE( , [] ) --> NIL
* $ARGUMENTS$
* is a name of the file to display. If the file have an
* extension, it must be specified (there is no default value).
*
* is an optional logical value that specifies whether the
* output should go only to the screen (.F.) or to both the screen and
* printer (.T.), the default is (.F.).
* $RETURNS$
* __TYPEFILE() always return NIL.
* $DESCRIPTION$
* __TYPEFILE() function type the content of a text file on the screen
* with an option to send this information also to the printer. The
* file is displayed as is without any headings or formating.
*
* If contain no path, __TYPEFILE() try to find the file first
* in the SET DEFAULT directory and then in search all of the SET PATH
* directories. If can not be found a run-time error occur.
*
* Use SET CONSOLE OFF to suppress screen output.
* You can pause the output using Ctrl-S, press any key to resume.
*
* __TYPEFILE() function is used in the preprocessing of the TYPE
* command.
* $EXAMPLES$
* The following examples assume a file name mytext.dat exist in all
* specified paths, a run-time error would displayed if it does not
*
* // display mytext.dat file on screen
* __TYPEFILE( "mytext.dat" )
*
* // display mytext.dat file on screen and printer
* __TYPEFILE( "mytext.dat", .T. )
*
* // display mytext.dat file on printer only
* SET CONSOLE OFF
* __TYPEFILE( "mytext.dat", .T. )
* SET CONSOLE ON
*
* $STATUS$
* R
* $COMPLIANCE$
* __TYPEFILE() works exactly like CA-Cl*pper's __TYPEFILE()
* $FILES$
* Library is rtl
* $SEEALSO$
* COPY FILE,SET DEFAULT,SET PATH,SET PRINTER,TYPE
* $END$
*/
/* $DOC$
* $FUNCNAME$
* TYPE
* $CATEGORY$
* Command
* $ONELINER$
* Show the content of a file on the console, printer or file
* $SYNTAX$
* TYPE [TO PRINTER] [TO FILE ]
* $ARGUMENTS$
* is a name of the file to display. If the file have an
* extension, it must be specified (there is no default value).
* It can be specified as literal file name or as a character
* expression enclosed in parentheses.
*
* TO PRINTER is an optional keyword that specifies that the output
* should go to both the screen and printer.
*
* TO FILE copy the source also to a file. If no
* extension is given (.txt) is added to the output file name.
* can be specified as literal file name or as a character
* expression enclosed in parentheses.
* $DESCRIPTION$
* TYPE command type the content of a text file on the screen
* with an option to send this information also to the printer or to
* an alternate file. The file is displayed as is without any headings
* or formating.
*
* If contain no path, TYPE try to find the file first in the
* SET DEFAULT directory and then in search all of the SET PATH
* directories. If can not be found a run-time error occur.
*
* If contain no path it is created in the SET DEFAULT
* directory.
*
* Use SET CONSOLE OFF to suppress screen output.
* You can pause the output using Ctrl-S, press any key to resume.
* $EXAMPLES$
* The following examples assume a file name mytext.dat exist in all
* specified paths, a run-time error would displayed if it does not
*
* // display mytext.dat file on screen
* TYPE mytext.dat
*
* // display mytext.dat file on screen and printer
* TYPE mytext.dat TO PRINTER
*
* // display mytext.dat file on printer only
* SET CONSOLE OFF
* TYPE mytext.dat TO PRINTER
* SET CONSOLE ON
*
* // display mytext.dat file on screen and into a file myreport.txt
* TYPE mytext.dat TO FILE MyReport
*
* $STATUS$
* R
* $COMPLIANCE$
* TYPE works exactly like CA-Cl*pper's TYPE
* $SEEALSO$
* COPY FILE,SET DEFAULT,SET PATH,SET PRINTER,__TYPEFILE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* CURDIR()
* $CATEGORY$
* Low Level
* $ONELINER$
* Returns the current OS directory name.
* $SYNTAX$
* CURDIR( [] ) --> cPath
* $ARGUMENTS$
* OS drive letter
* $RETURNS$
* Name of directory
* $DESCRIPTION$
* This function yields the name of the current OS directory on a
* specified drive. If is not speficied, the currently logged
* drive will be used.
* This function should not return the leading and trailing
* (back)slashes.
* If an error has been detected by the function, or the current OS
* directory is the root, the value of the function will be a NULL
* byte.
* $EXAMPLES$
* ? Curdir()
*
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper Compatible
* $PLATFORMS$
* ALL
* $FILES$
* Library is rtl
* $SEEALSO$
* FILE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* COPY FILE
* $CATEGORY$
* Command
* $ONELINER$
* Copies a file.
* $SYNTAX$
* COPY FILE TO
* $ARGUMENTS$
* Filename of source file
* Filename of target file
* $DESCRIPTION$
* This command makes an exact copy of and names it .
* Both files must have the file extension included; the drive and the
* directory names must also be specified if they are different from
* the default drive and/or director. also can refer to a OS
* device (e.g. LPT1). This command does not obsert the SET PATH TO or
* SET DEFAULT TO settings.
* $EXAMPLES$
* COPY FILE C:\harbour\tests\adirtest.prg TO C:\temp\adirtest.prg
* COPY FILE C:\harbour\utils\hbdoc\gennf.prg TO LPT1
* $STATUS$
* R
* $COMPLIANCE$
* This command is CA-Cl*pper compliant
* $SEEALSO$
* ERASE,RENAME,FRENAME(),FERASE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* HB_FEOF()
* $CATEGORY$
* Low Level
* $ONELINER$
* Check for end-of-file.
* $SYNTAX$
* HB_FEOF( ) --> lIsEof
* $ARGUMENTS$
* The handle of an open file.
* $RETURNS$
* .T. if the file handle is at end-of-file, otherwise .F.
* $DESCRIPTION$
* This function checks an open file handle to see if it is at EOF.
* If the file handle is missing, not numeric, or not open, then this
* function returns .T. and sets the value returned by FERROR() to -1
* (FS_ERROR) or a C-compiler dependent errno value (EBADF or EINVAL).
* $EXAMPLES$
* nH := FOPEN( "file.txt" )
* ? FREADSTR( nH, 80 )
* IF HB_FEOF( nH )
* ? "End-of-file reached."
* ELSE
* ? FREADSTR( nH, 80 )
* ENDIF
* $STATUS$
* R
* $COMPLIANCE$
* This function is a Harbour extension
* $FILES$
* Library is rtl
* $SEEALSO$
* FERROR()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DIRREMOVE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Attempt to remove an directory
* $SYNTAX$
* DIRCHANGE( ) --> nError
* $ARGUMENTS$
* The name of the directory you want to remove.
* $RETURNS$
* 0 if directory was successfully removed, otherwise
* the number of the last error.
* $DESCRIPTION$
* This function attempt to remove the specified directory in
* If this function fail, the it will return the last OS error code number.
* See FERROR() function for the description of the error.
* $EXAMPLES$
* cDir:= ".\backup"
* if DIRREMOVE( cDir ) == 0
* ? "Remove of directory", cDir, "was successfull"
* endif
* $TESTS$
* See examples
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper 5.3 compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* MAKEDIR(), DIRCHANGE(), ISDISK(), DISKCHANGE(), DISKNAME(), FERROR()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* DIRCHANGE()
* $CATEGORY$
* Low Level
* $ONELINER$
* Changes the directory
* $SYNTAX$
* DIRCHANGE( ) --> nError
* $ARGUMENTS$
* The name of the directory you want do change into.
* $RETURNS$
* 0 if directory was successfully changed, otherwise
* the number of the last error.
* $DESCRIPTION$
* This function attempt to change the current directory to the one
* specidied in . If this function fail, the it will return
* the last OS error code number. See FERROR() function for the
* description of the error.
* $EXAMPLES$
* if DIRCHANGE( "\temp" ) == 0
* ? "Change to diretory was successfull"
* endif
* $TESTS$
* See examples
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper 5.3 compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* MAKEDIR(), DIRREMOVE(), ISDISK(), DISKCHANGE(), DISKNAME(), FERROR()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* MAKEDIR()
* $CATEGORY$
* Low Level
* $ONELINER$
* Create a new directory
* $SYNTAX$
* MAKEDIR( ) --> nError
* $ARGUMENTS$
* The name of the directory you want to create.
* $RETURNS$
* 0 if directory was successfully created, otherwise
* the number of the last error.
* $DESCRIPTION$
* This function attempt to create a new directory with the name contained
* in . If this function fail, the it will return the last OS
* error code number. See FERROR() function for the description of the
* error
* $EXAMPLES$
* cDir := "temp"
* If MAKEDIR( cDir ) == 0
* ? "Directory ", cDir, " successfully created
* Endif
* $TESTS$
* See examples
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper 5.3 compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DIRCHANGE(), DIRREMOVE(), ISDISK(), DISKCHANGE(), DISKNAME(), FERROR()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ISDISK()
* $CATEGORY$
* Low Level
* $ONELINER$
* Verify if a drive is ready
* $SYNTAX$
* ISDISK( ) --> lSuccess
* $ARGUMENTS$
* An valid Drive letter
* $RETURNS$
* .T. is the drive is ready, otherwise .F.
* $DESCRIPTION$
* This function attempts to access a drive. If the access to the drive
* was successfull, it will return true (.T.), otherwise false(.F.). This
* function is usefull for backup function, so you can determine if the
* drive that will recieve the backup data is ready or not.
* $EXAMPLES$
* IF ISDISK( "A" )
* ? "Drive is ready "
* Endif
* $TESTS$
* See Examples
* $STATUS$
* R
* $COMPLIANCE$
* This function is CA-Cl*pper 5.3 compliant
* $PLATFORMS$
* All
* $FILES$
* Library is rtl
* $SEEALSO$
* DIRCHANGE(), MAKEDIR(), DIRREMOVE(), DISKCHANGE(), DISKNAME()
* $END$
*/
|
c:\harbour\doc\en\garbage.txt |
/*
* $Id: garbage.txt 9252 2008-08-26 11:33:03Z vszakats $
*/
/* $DOC$
* $FUNCNAME$
* The Garbage Collector
* $CATEGORY$
* Document
* $ONELINER$
* Readme for Harbour Garbage Collect Feature
* $DESCRIPTION$
* The garbage collector uses the following logic:
* - first collect all memory allocations that can cause garbage;
* - next scan all variables if these memory blocks are still referenced.
*
* Notice that only arrays, objects and codeblocks are collected because
* these are the only datatypes that can cause self-references (a[1]:=a)
* or circular references (a[1]:=b; b[1]:=c; c[1]:=a) that cannot be
* properly deallocated by simple reference counting.
*
* Since all variables in harbour are stored inside some available tables
* (the eval stack, memvars table and array of static variables) then checking
* if the reference is still alive is quite easy and doesn't require any
* special treatment during memory allocation. Additionaly the garbage
* collector is scanning some internal data used by harbour objects
* implementation that also stores some values that can contain memory
* references. These data are used to initialize class instance variables
* and are stored in class shared variables.
*
* In special cases when the value of a harbour variable is stored internally
* in some static area (at C or assembler level), the garbage collector will
* be not able to scan such values since it doesn't know their location. This
* could cause some memory blocks to be released prematurely. To prevent the
* premature deallocation of such memory blocks the static data have to store
* a pointer to the value created with hb_itemNew() function.
* Example:
* static HB_ITEM s_item; // this item can be released by the GC
*
* static PHB_ITEM pItem; // this item will be maintained correctly
* pItem = hb_itemNew( hb_param(1, IT_BLOCK) );
*
* However, scanning of all variables can be a time consuming operation. It
* requires that all allocated arrays have to be traversed through all their
* elements to find more arrays. Also all codeblocks are scanned for detached
* local variables they are referencing. For this reason, looking for unreferenced
* memory blocks is performed during the idle states.
*
* The idle state is a state when there is no real application code
* executed. For example, the user code is stopped for 0.1 of a second
* during INKEY(0.1) - Harbour is checking the keyboard only
* during this time. It leaves however quite enough time for
* many other background tasks. One such background task can be looking
* for unreferenced memory blocks.
*
* Allocating memory
* -----------------
*
* The garbage collector collects memory blocks allocated with hb_gcAlloc()
* function calls. Memory allocated by hb_gcAlloc() should be released with
* hb_gcFree() function.
*
* The garbage collecting
* ----------------------
*
* During scanning of unreferenced memory the GC is using a mark & sweep
* algorithm. This is done in three steps:
*
* 1) mark all memory blocks allocated by the GC with unused flag;
*
* 2) sweep (scan) all known places and clear unused flag for memory
* blocks that are referenced there;
*
* 3) finalize collecting by deallocation of all memory blocks that are
* still marked as unused and that are not locked.
*
* To speed things up, the mark step is simplified by swapping the meaning
* of the unused flag. After deallocation of unused blocks all still alive
* memory blocks are marked with the same 'used' flag so we can reverse
* the meaning of this flag to 'unused' state in the next collecting.
* All new or unlocked memory blocks are automatically marked as 'unused'
* using the current flag, which assures that all memory blocks are marked
* with the same flag before the sweep step will start.
* See hb_gcCollectAll() and hb_gcItemRef()
*
* Calling the garbage collector from harbour code
* -----------------------------------------------
*
* The garbage collector can be called directly from the harbour code.
* This is usefull in situations where there is no idle states available
* or the application is working in the loop with no user interaction
* and there is many memory allocations.
* See HB_GCALL() for explanation of how to call this function from your
* harbour code.
* $SEEALSO$
* hb_gcAlloc(),hb_gcFree(),hb_gcCollectAll(),hb_gcItemRef(),HB_GCALL(),HB_IDLESTATE()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_gcAlloc()
* $CATEGORY$
* The garbage collector
* $ONELINER$
* Allocates memory that will be collected by the garbage collector.
* $SYNTAX$
* #include
* void *hb_gcAlloc( ULONG ulSize,
* HB_GARBAGE_FUNC_PTR pCleanupFunc );
* $ARGUMENTS$
* Requested size of memory block
*
* Pointer to HB_GARBAGE_FUNC function that will be called
* directly before releasing the garbage memory block or NULL. This
* function should release all other memory allocated and stored inside
* the memory block. For example, it releases all items stored inside
* the array. The functions receives a single parameter: the pointer
* to memory allocated by hb_gcAlloc().
* $RETURNS$
* The pointer to allocated memory or it generates an internal
* unrecoverable error.
* $DESCRIPTION$
* hb_gcAlloc() is used to allocate the memory that will be tracked
* by the garbage collector. It allows to properly release memory
* in case of self-referencing or cross-referencing harbour level
* variables.
* Memory allocated with this function should be released with
* hb_gcFree() function or it will be automatically deallocated
* by the GC if it is not locked or if it is not referenced by some
* harbour level variable.
* $EXAMPLES$
* See source/vm/arrays.c
* $STATUS$
* C
* $COMPLIANCE$
* This function is a Harbour extension
* $PLATFORMS$
* All
* $FILES$
* source/vm/garbage.c
* $SEEALSO$
* hb_gcFree()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_gcFree()
* $CATEGORY$
* The garbage collector
* $ONELINER$
* Releases the memory that was allocated with hb_gcAlloc().
* $SYNTAX$
* void hb_gcFree( void *pMemoryPtr );
* $ARGUMENTS$
* The pointer to memory for release. This memory
* pointer have to be allocated with hb_gcAlloc() function.
* $RETURNS$
* Nothing.
* $DESCRIPTION$
* hb_gcFree() is used to deallocate the memory that was
* allocated with the hb_gcAlloc() function.
* $EXAMPLES$
* See source/vm/arrays.c
* $STATUS$
* C
* $COMPLIANCE$
* This function is a Harbour extension
* $PLATFORMS$
* All
* $FILES$
* source/vm/garbage.c
* $SEEALSO$
* hb_gcAlloc()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_gcCollectAll()
* $CATEGORY$
* The garbage collector
* $ONELINER$
* Scans all memory blocks and releases the garbage memory.
* $SYNTAX$
* void hb_gcCollectAll( void );
* $ARGUMENTS$
* None.
* $RETURNS$
* Nothing.
* $DESCRIPTION$
* This function scans the eval stack, the memvars table, the array
* of static variables and table of created classes for referenced
* memory blocks. After scanning all unused memory blocks and blocks
* that are not locked are released.
* $STATUS$
* C
* $COMPLIANCE$
* This function is a Harbour extension
* $PLATFORMS$
* All
* $FILES$
* source/vm/garbage.c
* $SEEALSO$
* hb_gcAlloc(),hb_gcFree()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_gcItemRef()
* $CATEGORY$
* The garbage collector
* $ONELINER$
* Marks the memory to prevent deallocation by the garbage collector.
* $SYNTAX$
* void hb_gcItemRef( PHB_ITEM pItem );
* $ARGUMENTS$
* The pointer to item structure that will be scanned. The
* passed item can be of any datatype although arrays, objects
* and codeblocks are scanned only. Other datatypes don't require
* locking so they are simply ignored.
* $RETURNS$
* Nothing.
* $DESCRIPTION$
* The garbage collector uses hb_gcItemRef() function during
* scanning of referenced memory pointers. This function checks the
* type of passed item and scans recursively all other memory blocks
* referenced by this item if it is an array, an object or a codeblock.
*
* NOTE: This function is reserved for the garbage collector only. It
* cannot be called from the user code - calling it can cause
* unpredicted results (memory blocks referenced by the
* passed item can be released prematurely during the closest
* garbage collection).
* $STATUS$
* C
* $COMPLIANCE$
* This function is a Harbour extension
* $PLATFORMS$
* All
* $FILES$
* source/vm/garbage.c
* $SEEALSO$
* hb_gcAlloc(),hb_gcFree()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* HB_GCALL()
* $CATEGORY$
* The garbage collector
* $ONELINER$
* Scans the memory and releases all garbage memory blocks.
* $SYNTAX$
* HB_GCALL()
* $ARGUMENTS$
* None
* $RETURNS$
* NIL
* $DESCRIPTION$
* This function releases all memory blocks that are considered
* as the garbage.
* $STATUS$
* Harbour
* $COMPLIANCE$
* This function is a Harbour extension
* $PLATFORMS$
* All
* $FILES$
* source/vm/garbage.c
* $SEEALSO$
* hb_gcCollectAll()
* $END$
*/
|
c:\harbour\doc\en\gnulice.txt |
/*
* $Id: gnulice.txt 2667 2000-04-23 03:12:06Z vszel $
*/
/* $DOC$
* $FUNCNAME$
* GNU License
* $CATEGORY$
* Document
* $ONELINER$
* Gnu License File Part 1
* $DESCRIPTION$
*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991
* Copyright (C) 1989, 1991 Free Software Foundation, Inc.
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*
* Preamble
*
* The licenses for most software are designed to take away your
* freedom to share and change it. By contrast, the GNU General Public
* License is intended to guarantee your freedom to share and change
* free software--to make sure the software is free for all its users.
* This General Public License applies to most of the Free Software
* Foundation's software and to any other program whose authors commit
* to using it. (Some other Free Software Foundation software is
* covered by the GNU Library General Public License instead.)
* You can apply it to your programs, too.
*
* When we speak of free software, we are referring to freedom, not
* price. Our General Public Licenses are designed to make sure that
* you have the freedom to distribute copies of free software (and
* charge for this service if you wish), that you receive source code
* or can get it if you want it, that you can change the software or
* use pieces of it in new free programs; and that you know you can do
* these things.
*
* To protect your rights, we need to make restrictions that forbid
* anyone to deny you these rights or to ask you to surrender the
* rights. These restrictions translate to certain responsibilities
* for you if you distribute copies of the software, or if you modify
* it.
*
* For example, if you distribute copies of such a program, whether
* gratis or for a fee, you must give the recipients all the rights
* that you have. You must make sure that they, too, receive or can
* get the source code. And you must show them these terms so they
* know their rights.
*
* We protect your rights with two steps: (1) copyright the software,
* and (2) offer you this license which gives you legal permission to
* copy, distribute and/or vmodify the software.
*
* Also, for each author's protection and ours, we want to make
* certain that everyone understands that there is no warranty for
* this free software. If the software is modified by someone else and
* passed on, we want its recipients to know that what they have is
* not the original, so that any problems introduced by others will
* not reflect on the original authors' reputations.
*
* Finally, any free program is threatened constantly by software
* patents. We wish to avoid the danger that redistributors of a free
* program will individually obtain patent licenses, in effect making
* the program proprietary. To prevent this, we have made it clear
* that any patent must be licensed for everyone's free use or not
* licensed at all.
*
* The precise terms and conditions for copying, distribution and
* modification follow.
*
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. This License applies to any program or other work which contains
* a notice placed by the copyright holder saying it may be
* distributed under the terms of this General Public License. The
* "Program", below, refers to any such program or work, and a "work
* based on the Program" means either the Program or any derivative
* work under copyright law: that is to say, a work containing the
* Program or a portion of it, either verbatim or with modifications
* and/or translated into another language. (Hereinafter, translation
* is included without limitation in the term "modification".) Each
* licensee is addressed as "you". Activities other than copying,
* distribution and modification are not covered by this License; they
* are outside its scope. The act of running the Program is not
* restricted, and the output from the Program is covered only if its
* contents constitute a work based on the Program (independent of
* having been made by running the Program). Whether that is true
* depends on what the Program does.
*
* 1. You may copy and distribute verbatim copies of the Program's
* source code as you receive it, in any medium, provided that you
* conspicuously and appropriately publish on each copy an appropriate
* copyright notice and disclaimer of warranty; keep intact all the
* notices that refer to this License and to the absence of any
* warranty; and give any other recipients of the Program a copy of
* this License along with the Program. You may charge a fee for the
* physical act of transferring a copy, and you may at your option
* offer warranty protection in exchange for a fee.
*
* 2. You may modify your copy or copies of the Program or any portion
* of it, thus forming a work based on the Program, and copy and
* distribute such modifications or work under the terms of Section 1
* above, provided that you also meet all of these conditions:
*
* a) You must cause the modified files to carry prominent notices
* stating that you changed the files and the date of any change.
*
* b) You must cause any work that you distribute or publish, that
* in whole or in part contains or is derived from the Program or
* any part thereof, to be licensed as a whole at no charge to all
* third parties under the terms of this License.
*
* c) If the modified program normally reads commands interactively
* when run, you must cause it, when started running for such
* interactive use in the most ordinary way, to print or display an
* announcement including an appropriate copyright notice and a
* notice that there is no warranty (or else, saying that you
* provide a warranty) and that users may redistribute the program
* under these conditions, and telling the user how to view a copy
* of this License. (Exception: if the Program itself is interactive
* but does not normally print such an announcement, your work based
* on the Program is not required to print an announcement.)
*
* These requirements apply to the modified work as a whole. If
* identifiable sections of that work are not derived from the
* Program, and can be reasonably considered independent and separate
* works in themselves, then this License, and its terms, do not apply
* to those sections when you distribute them as separate works. But
* when you distribute the same sections as part of a whole which is a
* work based on the Program, the distribution of the whole must be on
* the terms of this License, whose permissions for other licensees
* extend to the entire whole, and thus to each and every part
* regardless of who wrote it.
*
* Thus, it is not the intent of this section to claim rights or
* contest your rights to work written entirely by you; rather, the
* intent is to exercise the right to control the distribution of
* derivative or collective works based on the Program.
*
* In addition, mere aggregation of another work not based on the
* Program with the Program (or with a work based on the Program) on a
* volume of a storage or distribution medium does not bring the other
* work under the scope of this License.
*
* 3. You may copy and distribute the Program (or a work based on it,
* under Section 2) in object code or executable form under the terms
* of Sections 1 and 2 above provided that you also do one of the
* following:
*
* a) Accompany it with the complete corresponding machine-readable
* source code, which must be distributed under the terms of
* Sections 1 and 2 above on a medium customarily used for software
* interchange; or,
*
* b) Accompany it with a written offer, valid for at least three
* years, to give any third party, for a charge no more than your
* cost of physically performing source distribution, a complete
* machine-readable copy of the corresponding source code, to be
* distributed under the terms of Sections 1 and 2 above on a medium
* customarily used for software interchange; or,
*
* c) Accompany it with the information you received as to the offer
* to distribute corresponding source code. (This alternative is
* allowed only for noncommercial distribution and only if you
* received the program in object code or executable form with such
* an offer, in accord with Subsection b above.)
*
* The source code for a work means the preferred form of the work for
* making modifications to it. For an executable work, complete source
* code means all the source code for all modules it contains, plus
* any associated interface definition files, plus the scripts used to
* control compilation and installation of the executable. However, as
* a special exception, the source code distributed need not include
* anything that is normally distributed (in either source or binary
* form) with the major components (compiler, kernel, and so on) of
* the operating system on which the executable runs, unless that
* component itself accompanies the executable.
*
* If distribution of executable or object code is made by offering
* access to copy from a designated place, then offering equivalent
* access to copy the source code from the same place counts as
* distribution of the source code, even though third parties are not
* compelled to copy the source along with the object code.
*
* 4. You may not copy, modify, sublicense, or distribute the Program
* except as expressly provided under this License. Any attempt
* otherwise to copy, modify, sublicense or distribute the Program is
* void, and will automatically terminate your rights under this
* License. However, parties who have received copies, or rights, from
* you under this License will not have their licenses terminated so
* long as such parties remain in full compliance.
*
* 5. You are not required to accept this License, since you have not
* signed it. However, nothing else grants you permission to modify or
* distribute the Program or its derivative works. These actions are
* prohibited by law if you do not accept this License. Therefore, by
* modifying or distributing the Program (or any work based on the
* Program), you indicate your acceptance of this License to do so,
* and all its terms and conditions for copying, distributing or
* modifying the Program or works based on it.
*
* 6. Each time you redistribute the Program (or any work based on the
* Program), the recipient automatically receives a license from the
* original licensor to copy, distribute or modify the Program subject
* to these terms and conditions. You may not impose any further
* restrictions on the recipients' exercise of the rights granted
* herein. You are not responsible for enforcing compliance by third
* parties to this License.
*
* $SEEALSO$
* GNU License Part 2
* $END$
*/
/*
* $DOC$
* $FUNCNAME$
* GNU License Part 2
* $CATEGORY$
* Document
* $ONELINER$
* Gnu License File Part 2
* $DESCRIPTION$
*
* 7. If, as a consequence of a court judgment or allegation of patent
* infringement or for any other reason (not limited to patent
* issues), conditions are imposed on you (whether by court order,
* agreement or otherwise) that contradict the conditions of this
* License, they do not excuse you from the conditions of this
* License. If you cannot distribute so as to satisfy simultaneously
* your obligations under this License and any other pertinent
* obligations, then as a consequence you may not distribute the
* Program at all. For example, if a patent license would not permit
* royalty-free redistribution of the Program by all those who receive
* copies directly or indirectly through you, then the only way you
* could satisfy both it and this License would be to refrain entirely
* from distribution of the Program.
*
* If any portion of this section is held invalid or unenforceable
* under any particular circumstance, the balance of the section is
* intended to apply and the section as a whole is intended to apply
* in other circumstances.
*
* It is not the purpose of this section to induce you to infringe any
* patents or other property right claims or to contest validity of
* any such claims; this section has the sole purpose of protecting
* the integrity of the free software distribution system, which is
* implemented by public license practices. Many people have made
* generous contributions to the wide range of software distributed
* through that system in reliance on consistent application of that
* system; it is up to the author/donor to decide if he or she is
* willing to distribute software through any other system and a
* licensee cannot impose that choice.
*
* This section is intended to make thoroughly clear what is believed
* to be a consequence of the rest of this License.
*
* 8. If the distribution and/or use of the Program is restricted in
* certain countries either by patents or by copyrighted interfaces,
* the original copyright holder who places the Program under this
* License may add an explicit geographical distribution limitation
* excluding those countries, so that distribution is permitted only
* in or among countries not thus excluded. In such case, this License
* incorporates the limitation as if written in the body of this
* License.
*
* 9. The Free Software Foundation may publish revised and/or new
* versions of the General Public License from time to time. Such new
* versions will be similar in spirit to the present version, but may
* differ in detail to address new problems or concerns.
*
* Each version is given a distinguishing version number. If the
* Program specifies a version number of this License which applies to
* it and "any later version", you have the option of following the
* terms and conditions either of that version or of any later version
* published by the Free Software Foundation. If the Program does not
* specify a version number of this License, you may choose any
* version ever published by the Free Software Foundation.
*
* 10. If you wish to incorporate parts of the Program into other free
* programs whose distribution conditions are different, write to the
* author to ask for permission. For software which is copyrighted by
* the Free Software Foundation, write to the Free Software
* Foundation; we sometimes make exceptions for this. Our decision
* will be guided by the two goals of preserving the free status of
* all derivatives of our free software and of promoting the sharing
* and reuse of software generally.
*
* NO WARRANTY
* 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
* WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
* LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
* AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
* OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
* PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
* DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
* OR CORRECTION.
*
* 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
* WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
* MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
* LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
* INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
* INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
* DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
* OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
* OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* END OF TERMS AND CONDITIONS
*
*
* Appendix: How to Apply These Terms to Your New Programs
*
* If you develop a new program, and you want it to be of the greatest
* possible use to the public, the best way to achieve this is to make
* it free software which everyone can redistribute and change under
* these terms.
*
* To do so, attach the following notices to the program. It is safest
* to attach them to the start of each source file to most effectively
* convey the exclusion of warranty; and each file should have at
* least the "copyright" line and a pointer to where the full notice
* is found:
*
*
* Copyright (C) yyyy
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Also add information on how to contact you by electronic and paper
* mail. If the program is interactive, make it output a short notice
* like this when it starts in an interactive mode:
*
* Gnomovision version 69, Copyright (C) year name of author
* Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
* type `show w'. This is free software, and you are welcome
* to redistribute it under certain conditions; type `show c'
* for details.
*
* The hypothetical commands `show w' and `show c' should show the
* appropriate parts of the General Public License. Of course, the
* commands you use may be called something other than `show w' and
* `show c'; they could even be mouse-clicks or menu items--whatever
* suits your program.
*
* You should also get your employer (if you work as a programmer) or
* your school, if any, to sign a "copyright disclaimer" for the
* program, if necessary. Here is a sample; alter the names:
*
* Yoyodyne, Inc., hereby disclaims all copyright interest in the
* program `Gnomovision' (which makes passes at compilers) written by
* James Hacker.
*
* signature of Ty Coon, 1 April 1989
* Ty Coon, President of Vice
*
* This General Public License does not permit incorporating your
* program into proprietary programs. If your program is a subroutine
* library, you may consider it more useful to permit linking
* proprietary applications with the library. If this is what you want
* to do, use the GNU Library General Public License instead of this
* License.
*
*
* FSF & GNU inquiries & questions to gnu@gnu.org.
* Copyright notice above.
*
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111, USA
* Updated: 3 Jan 2000 rms
*
* $SEEALSO$
* License,GNU License
* $END$
*/
|
c:\harbour\doc\en\gtslang.txt |
/*
* $Id: gtslang.txt 4171 2001-07-10 16:35:53Z dholm $
*/
Gt Slang driver
A gt Slang driver for Harbour (gtsln) is based on a S-Lang library written
by John E. Davis. It was developed using Slang version 1.41, although prior
versions of Slang up to 1.22 should also work, but they are not recomended
because of some bugs they have.
The main OS it is developed to be used on is Linux. Slang was ported to
other OSes so it should be possible to use it on other systems too. I've
also successfully compiled and testd gtsln under DOS but I don't think it
makes any sense to use it on that system instead of gtdos, due to its
limitations and incompatibilities with Clipper (see below), so I removed DOS
support.
A gt Slang driver is a second driver which can be used on Unix based OSes.
The first one is a gt driver based on a curses library (gtcrs). Due to the
fact that curses is a standard library on Unix like systems, gtcrs should
be considerd as a primary gt driver for such OSes.
Compiling a gt slang driver ...
--------------------------------
The driver should be automaticly compiled when you build Harbour from
sourcees, regardless of what gt driver you've chosen by setting HB_GT_LIB.
Succesfull compilation requires Slang library and Slang header files
properly installed on your system. The driver expects Slang header files
to be placed in /slang/ directory on Linux based
systems ( this usualy means /usr/include/slang on most of them ) and
on other systems (which is usually /usr/include).
To build programs (by using a bld.sh script from Harbour sources), which
will use a gtsln, you need to :
- have a Slang library and header files properly installed
- set an environment variable HB_GT_LIB to gtsln
- modify bld.sh by adding -lslang to a link command
Generally you always need to add -lgtsln -lslang to your link libraries to
build programs which are supposed to use a gt slang driver.
Internationalization
----------------------
I made an attempt to support national characters handling, but I am not
sure if it is done in a proper way. The implementation supports only one
byte encoding, thus Korean and other two bytes encodings are not allowed.
It assumes national characters are placed in an upper 128 bytes of ASCII
table from a normal character set. "Normal" means not "alternate character
set" here, because "alternate character set" is generally used to display
graphics characters. It also assumes national characters can be entered
for example by pressing an ALTR key and a particular key on a keyboard to
get a desired national character. If this is impossible on some terminals
due to their lack of posibilities, an alternate method which uses Dead
keys, is implemented. To be able to see and to enter national characters
one should :
- have a proper font table loaded
- optionaly have a software installed to allow enter national characters
in whatever way they should be entered
- have an environment variable HRBNATIONCHARS properly set (see below)
- optionaly have a HRBNATIONDEADKEY defined (see below)
An environment variable HRBNATIONCHARS should contain a list of character
pairs. A first character from each pair sholud be a character from a lower
128 bytes of ASCII table, which should be pressed after a Dead Key was
pressed, to get a desired national character. The second character is a
national character itself. Those pairs should be defined even if a Dead
key is not used (because a terminal supports other method of entering
national characters - for example ALTR+letter).
If a terminal does not support entering national characters by using an
ALT key (or the other similar) an environment variable HRBNATIONDEADKEY
can be defined. It should contain a character which should be pressed
*before* a particular key on a keyboard is pressed to get a desired
national character.
The reason I am using HRBNATIONCHARS envvar is simple. I want to give a
better graphics chars support when the same code is ocupied by a nation
char and by a graphics char. Because on terminals there are usually two
glyph's character sets (normal and alternate) knowing nation's characters
codes, I can switch to normal character set when a nation character code
is encountered, while still being in an alternate character set for other
characters. This way I can draw boxes properly using box drawing commands
even though characters for box drawing occupy the same code a nation chars
occupy. So commands like :
@ Y1, X1 TO Y2, X2 [ DOUBLE ]
@ Y1, X1, Y2, X2 BOX ""
should write boxes well. However commands like :
@ Y, X SAY CHR( )
will draw a nation char when it occupies the same code as
occupies. I don't know a better solution in this
case. Any ideas are welcome.
This implementation works better than it would ever work in DOS where
there is no way to do such tricks (because there is only one glyph's
character set without VGA tricks).
Using environment variables gives a configuration fexibility to Harbour
programs for different users and different code pages. To change a code
page one should only change HRBNATIONCHARS var (if a Dead key is used)
and this can be done from a script which runs a Harbour program.
Let's see an example.
Suppose one national language has three national characters : '¡ÆÊ' which
correspond to 'ACE' in a lower 128 bytes ASCII table. 'Corresponding' means
that to get a '¡' nation char one has to press a special keyboard modifier
(like ALT+R for example) plus an 'A' char.
HRBNATIONCHARS should be defined as :
HRBNATIONCHARS=A¡CÆEÊ
where A¡ is a first pair, CÆ is a second pair and so on
Suppose also we are working on a terminal which does not allow to enter
national characters by pressing ALTR+A, ALTR+C, ALTR+E. Because we like
a character '`' (\140 in octal), we arbitrary choose it as a Dead key.
So we define HRBNATIONDEADKEY as :
HRBNATIONDEADKEY=\`
or in other way :
HRBNATIONDEADKEY=`echo -ne '\140`'
Now we can enter ¡ by pressing ` and then A, Æ by pressing ` and then C,
and so on. To get '`' character we need to double press `.
Limitations, incomatibilities with Clipper, errors ...
--------------------------------------------------------
The driver is rather limited in comparison to other Harbour gt drivers and
has many incompatibilities with Clipper. Some of those limitations and in-
compatibilities are caused by an Unix behavior, others are caused by a Slang
implementation. There are also some caused by a gt layer design. Not to
mention that there are probably some caused by my lack of knowledge.
Here is a (probably not complete) list of them :
- a driver allows only 128 combinations of FgBg colors. It means you can
use 16 colors for Fg, and only 8 colors for Bg.
- you can't get intensity/blinking background mode working (this is in
fact the previous problem, just worded differently)
- you can't display characters with values below 32 (control characters).
It is a very important limitation because you can't use many usefull
chars which you used under Clipper. This is an OS limitation which
Slang also inherits
- displaying chars above 128 widely depends on terminal posibilities.
Because of this on xterm I set all frame chars to a single frame
(this means - double and mixed frames are shown as a single frame).
You should not expect to see chars above 128 shown properly in all
cases.
- a screen is automaticly cleared on program's startup (you can't inherit
it from a system) and a cursor is set at 0,0
- when you run external programs a screen is restored after execution so
there is no possibility to interact with screen handling between two
programs
- you can't expect cursor hiding and cursor style changing to work at
all. Although on a textmode Linux console it works, this is a Linux
textmode hack only and it is hardcoded. For example on xterm only
cursor hiding works well.
- it is not guaranteed that programs which use DispBegin() and DispEnd()
will work well in all cases, although generally it should work
- a screen size change does not work at all. This is a big problem on
an xterm where you can change a window's size at your request. Doing
this confuses a Harbour program
- Clipper programs which utilized PC hardware specifications about screen
construction (an array of char+attr) (for example to make quick shadow
on a screen) can't run properly. There is no hardware emulation at all
- Tone() support currently works for Linux console only.
- keyboard handling is VERY LIMITED. Generally you should not expect
ALT+key, CTRL+F and CTRL+ combinations to work at all
although they work on a textmode Linux console. This is a very big
problem and at least any solution should be developed to emulate this.
One attempt is a Dead key workaround I've implemented for national
characters and a Meta key to simulate Alt key. By default as a Meta
key I've chosen ESC key pressed once (like in most Linux programs).
- abort key is CTRL+\ not CTRL+BREAK on Unixes
- to get an ESC key you have to press ESC twice. This is an issue
related to OS behavior where ESC begins a control sequence
- currently there is no mouse support. This is a TODO item
- Out() functions do not work well. This is caused by a design of
a gt layer where writing directly to stdout is done outside Slang,
so Slang can't maintain screen changes properly.
- redirecting Out() to a file results in writing control chars
which were supposed to initialize a terminal, to that file
- monochrome displaying support is currently broken
Terminfo database ...
-----------------------
Slang gt driver is based on a terminfo database so it is very important to
have it properly set. Most problems are related to a broken terminfo file.
I don't have general advice about that. You are supposed to help yourself.
The only thing you should know is that you must not have sequences for F11
and F12 function keys set in a terminfo file if you want to use SHFT+F
and CTRL+F keys (of course they all should be defined there).
Why use gt slang driver ...
-----------------------------
Well, personaly I find only two reasons. When Clipper compatibility and
current limitations are not a problem, gtsln is a little bit faster than
gtcrs and my experiences show that sometimes it works a little bit better
than gtcrs on real terminals (tested on wy60 where gtcrs did not handle
the keyboard well).
TODO
------
- keyboard emulation on terminals with lack of posibilities
- support for mouse on Linux text console and on xterm
- fix a problem with redirecting output to a file or a pipe
- find a way to inherit screen from a system at startup
(is it possible at all ?)
- sound support on Linux using native sound system (Alsa ?)
- support for sound on other systems than Linux
- fix working on monochorme terminals
- add a PC video card hardware emulation
Marek Paliwoda
PS.
I want to appologize for any english errors
and any technical errors in this text.
|
c:\harbour\doc\en\harbext.txt |
/*
* $Id: harbext.txt 4484 2001-09-11 10:15:24Z vszakats $
*/
/* $DOC$
* $FUNCNAME$
* Harbour Extensions
* $CATEGORY$
* Document
* $ONELINER$
* Harbour Extensions
* $DESCRIPTION$
*Language extensions:
*--------------------
*
** Class generation and management.
*
* Clipper only allowed creation of objects from a few standard
* classes.
*
* In Harbour, you can create your own classes--complete with
* Methods, Instance Variables, Class Variables and Inheritance.
* Entire applications can be designed and coded in Object Oriented
* style.
*
** @()
*
* Returns the pointer (address) to a function.
*
* The returned value is not useful to application-level programming, but
* is used at a low level to implement object oriented coding.
* (Internally, a class method is a static function and there is no
* symbol for it, so it is accessed via its address).
*
** Class HBGetList
*
* Object oriented support for GetLists management.
*
** ProcName() support for class Method names.
*
* Class Methods can be retrieved from the call stack.
*
** Memory() has new return values.
*
* See hbmemory.ch
*
** Transform() --> new function in format string
*
* @0 Make a zero padded string out of the number.
*
** SToD() --> dDate
*
* New function that converts a yyyymmdd string to a Date value.
*
** Optional Compile Time STRONG TYPE declaration (and compile time TYPE
* MISMATCH warnings)
*
* Example: LOCAL/STATIC Var AS ...
*
** The Harbour debugger provides new interesting classes:
*
* - Class TDbWindow could be the foundation for a generic multiplatform
*
* - Class TForm
*
* - Class TDbMenu implement both pulldown and popup menus.
*
*RTL enhanced functionality:
*---------------------------
*
*- Directory( , , )
*
* The 3rd parameter is a Harbour (optional) parameter and indicates that on
* those platforms that support long filenames, that you wish to receive what
* would be considered the dos equivalant 8.3 name.
* Could affect Adir() and Dir if they were modified to take advantage
* of it - currently, they will return long names if the os supports it.
*
*- HB_DiskSpace( , )
*
* The second parameter is a Harbour (optional) parameter and indicates the
* type of diskinfo being requested. See en/diskspac.txt for info.
*
* $END$
*/
|
c:\harbour\doc\en\hb_api.txt |
/*
* $Id: hb_api.txt 3900 2001-04-01 13:40:49Z april $
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999 Antonio Linares
* Header file for the Extend API, Array API, misc API and base declarations
*
* See doc/license.txt for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* hb_parc()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a string parameter
* $SYNTAX$
* C Prototype
*
* #include
* hb_parc( int iParam, ... ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parclen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a string parameter length
* $SYNTAX$
* C Prototype
*
* #include
* hb_parclen( int iParam, ... ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parcsiz()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a by-reference string parameter length, including terminator
* $SYNTAX$
* C Prototype
*
* #include
* hb_parcsiz( int iParam, ... ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_pards()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a date as a string yyyymmdd
* $SYNTAX$
* C Prototype
*
* #include
* hb_pards( int iParam, ... ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_pardsbuff()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a date as a string yyyymmdd
* $SYNTAX$
* C Prototype
*
* #include
* hb_pardsbuff( char * szDate, int iParam, ... ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parinfa()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve length or element type of an array parameter
* $SYNTAX$
* C Prototype
*
* #include
* hb_parinfa( int iParamNum, ULONG uiArrayIndex ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parinfo()
* $CATEGORY$
* Extend API
* $ONELINER$
* Determine the param count or data type
* $SYNTAX$
* C Prototype
*
* #include
* hb_parinfo( int iParam ) --> ( int )iResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a logical parameter as an int
* $SYNTAX$
* C Prototype
*
* #include
* hb_parl( int iParam, ... ) --> ( int )iResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parnd()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a numeric parameter as a double
* $SYNTAX$
* C Prototype
*
* #include
* hb_parnd( int iParam, ... ) --> ( double )dResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parni()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a numeric parameter as a integer
* $SYNTAX$
* C Prototype
*
* #include
* hb_parni( int iParam, ... ) --> ( int )iResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_parnl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a numeric parameter as a long
* $SYNTAX$
* C Prototype
*
* #include
* hb_parnl( int iParam, ... ) --> ( long )lResult
* $ARGUMENTS$
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_param()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve a direct pointer to an item parameter
* $SYNTAX$
* C Prototype
*
* #include
* hb_param( int iParam, int iMask ) --> ( PHB_ITEM ) pResult
* $ARGUMENTS$
* The 1-based parameter to retrieve.
*
*
* $RETURNS$
* hb_param() returns a direct pointer to an item on the eval stack.
*
* $DESCRIPTION$
* This item will be removed (set to NIL) after a function cleanup,
* so if the item needs to survive the current function (e.g. copied
* to a static) you should use hb_itemParam instead.
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
* hb_itemParam()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_pcount()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns the number of supplied parameters
* $SYNTAX$
* C Prototype
*
* #include
* hb_pcount( void ) --> ( int )iResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_pcount() --> ( ( int ) hb_stack.pBase->item.asSymbol.paramcnt )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_ret()
* $CATEGORY$
* Extend API
* $ONELINER$
* Post a NIL return value
* $SYNTAX$
* C Prototype
*
* #include
* hb_ret( void ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_ret() --> hb_itemClear( &hb_stack.Return )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retc()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a string
* $SYNTAX$
* C Prototype
*
* #include
* hb_retc( char * szText ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retc( szText ) --> hb_itemPutC( &hb_stack.Return, szText )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retclen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a string with a specific length
* $SYNTAX$
* C Prototype
*
* #include
* hb_retclen( char * szText, ULONG ulLen ) --> void
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retclen( szText, ulLen ) --> hb_itemPutCL( &hb_stack.Return, szText, ulLen )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retds()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a date, must use yyyymmdd format
* $SYNTAX$
* C Prototype
*
* #include
* hb_retds( char * szDate ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retds( szDate ) --> hb_itemPutDS( &hb_stack.Return, szDate )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retd()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a date
* $SYNTAX$
* C Prototype
*
* #include
* hb_retd( long lYear, long lMonth, long lDay ) --> void
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retd( lYear, lMonth, lDay ) --> hb_itemPutD( &hb_stack.Return, lYear, lMonth, lDay )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retdl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a long value as a julian date
* $SYNTAX$
* C Prototype
*
* #include
* hb_retdl( long lJulian ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retdl( lJulian ) --> hb_itemPutDL( &hb_stack.Return, lJulian )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a logical integer
* $SYNTAX$
* C Prototype
*
* #include
* hb_retl( int iTrueFalse ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retl( iLogical ) --> hb_itemPutL( &hb_stack.Return, iLogical ? TRUE : FALSE )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retnd()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a double
* $SYNTAX$
* C Prototype
*
* #include
* hb_retnd( double dNumber ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retnd( dNumber ) --> hb_itemPutND( &hb_stack.Return, dNumber )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retni()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a integer number
* $SYNTAX$
* C Prototype
*
* #include
* hb_retni( int iNumber ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retni( iNumber ) --> hb_itemPutNI( &hb_stack.Return, iNumber )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retnl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a long number
* $SYNTAX$
* C Prototype
*
* #include
* hb_retnl( long lNumber ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retnl( lNumber ) --> hb_itemPutNL( &hb_stack.Return, lNumber )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retnlen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a double, with specific width and decimals
* $SYNTAX$
* C Prototype
*
* #include
* hb_retnlen( double dNumber, int iWidth, int iDec ) --> void
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retnlen( dNumber, iWidth, iDec ) --> hb_itemPutNLen( &hb_stack.Return, dNumber, iWidth, iDec )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retndlen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a double, with specific width and decimals
* $SYNTAX$
* C Prototype
*
* #include
* hb_retndlen( double dNumber, int iWidth, int iDec ) --> void
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retndlen( dNumber, iWidth, iDec ) --> hb_itemPutNDLen( &hb_stack.Return, dNumber, iWidth, iDec )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retnilen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a integer number, with specific width
* $SYNTAX$
* C Prototype
*
* #include
* hb_retnilen( int iNumber, int iWidth ) --> void
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retnilen( iNumber, iWidth ) --> hb_itemPutNILen( &hb_stack.Return, iNumber, iWidth )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_retnllen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a long number, with specific width
* $SYNTAX$
* C Prototype
*
* #include
* hb_retnllen( long lNumber, int iWidth ) --> void
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_retnllen( lNumber, iWidth ) --> hb_itemPutNLLen( &hb_stack.Return, lNumber, iWidth )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_reta()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns an array with a specific length
* $SYNTAX$
* C Prototype
*
* #include
* hb_reta( ULONG ulLen ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
* Note that when HB_API_MACROS is defined, this function is replaced with
* a macro: hb_reta( ulLen ) --> hb_arrayNew( &hb_stack.Return, ulLen )
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_storc()
* $CATEGORY$
* Extend API
* $ONELINER$
* Stores a szString on a variable by reference
* $SYNTAX$
* C Prototype
*
* #include
* hb_storc( char * szText, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_storclen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Stores a fixed length string on a variable by reference
* $SYNTAX$
* C Prototype
*
* #include
* hb_storclen( char * szText, ULONG ulLength, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_stords()
* $CATEGORY$
* Extend API
* $ONELINER$
* SzDate must have yyyymmdd format
* $SYNTAX$
* C Prototype
*
* #include
* hb_stords( char * szDate, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_storl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Stores a logical integer on a variable by reference
* $SYNTAX$
* C Prototype
*
* #include
* hb_storl( int iLogical, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_storni()
* $CATEGORY$
* Extend API
* $ONELINER$
* Stores an integer on a variable by reference
* $SYNTAX$
* C Prototype
*
* #include
* hb_storni( int iValue, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_stornl()
* $CATEGORY$
* Extend API
* $ONELINER$
* Stores a long on a variable by reference
* $SYNTAX$
* C Prototype
*
* #include
* hb_stornl( long lValue, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_stornd()
* $CATEGORY$
* Extend API
* $ONELINER$
* Stores a double on a variable by reference
* $SYNTAX$
* C Prototype
*
* #include
* hb_stornd( double dValue, int iParam, ... ) --> void
* $ARGUMENTS$
*
*
*
*
* <...>
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xinit()
* $CATEGORY$
* Extend API
* $ONELINER$
* Initialize fixed memory subsystem
* $SYNTAX$
* C Prototype
*
* #include
* hb_xinit( void ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xexit()
* $CATEGORY$
* Extend API
* $ONELINER$
* Deinitialize fixed memory subsystem
* $SYNTAX$
* C Prototype
*
* #include
* hb_xexit( void ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xalloc()
* $CATEGORY$
* Extend API
* $ONELINER$
* Allocates memory, returns NULL on failure
* $SYNTAX$
* C Prototype
*
* #include
* hb_xalloc( ULONG ulSize ) --> ( void * )pResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xgrab()
* $CATEGORY$
* Extend API
* $ONELINER$
* Allocates memory, exits on failure
* $SYNTAX$
* C Prototype
*
* #include
* hb_xgrab( ULONG ulSize ) --> ( void * )pResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xfree()
* $CATEGORY$
* Extend API
* $ONELINER$
* Frees memory
* $SYNTAX$
* C Prototype
*
* #include
* hb_xfree( void * pMem ) --> void
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xrealloc()
* $CATEGORY$
* Extend API
* $ONELINER$
* Reallocates memory
* $SYNTAX$
* C Prototype
*
* #include
* hb_xrealloc( void * pMem, ULONG ulSize ) --> ( void * )pResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xsize()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns the size of an allocated memory block
* $SYNTAX$
* C Prototype
*
* #include
* hb_xsize( void * pMem ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xquery()
* $CATEGORY$
* Extend API
* $ONELINER$
* Query different types of memory information
* $SYNTAX$
* C Prototype
*
* #include
* hb_xquery( USHORT uiMode ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xmemcpy()
* $CATEGORY$
* Extend API
* $ONELINER$
* Copy more than memcpy() can
* $SYNTAX$
* C Prototype
*
* #include
* hb_xmemcpy( void * pDestArg, void * pSourceArg, ULONG ulLen ) --> ( void * )pResult
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* If UINT_MAX is defined as ULONG_MAX then this function is replaced
* by a macro replacement to memcpy()
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_xmemset()
* $CATEGORY$
* Extend API
* $ONELINER$
* Set more than memset() can
* $SYNTAX$
* C Prototype
*
* #include
* hb_xmemset( void * pDestArg, int iFill, ULONG ulLen ) --> ( void * )pResult
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
* If UINT_MAX is defined as ULONG_MAX then this function is replaced
* by a macro replacement to memset()
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayNew()
* $CATEGORY$
* Extend API
* $ONELINER$
* Creates a new array
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayLen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrives the array len
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayLen( PHB_ITEM pArray ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayIsObject()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrives if the array is an object
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayIsObject( PHB_ITEM pArray ) --> ( BOOL )bResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayAdd()
* $CATEGORY$
* Extend API
* $ONELINER$
* Add a new item to the end of an array item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayIns()
* $CATEGORY$
* Extend API
* $ONELINER$
* Insert a nil item into an array, without changing the length
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayDel()
* $CATEGORY$
* Extend API
* $ONELINER$
* Delete an array item, without changing length
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arraySize()
* $CATEGORY$
* Extend API
* $ONELINER$
* Sets the array total length
* $SYNTAX$
* C Prototype
*
* #include
* hb_arraySize( PHB_ITEM pArray, ULONG ulLen ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayLast()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieve last item in an array
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayRelease()
* $CATEGORY$
* Extend API
* $ONELINER$
* Releases an array - don't call it - use ItemRelease() !!!
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayRelease( PHB_ITEM pArray ) --> ( BOOL )bResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arraySet()
* $CATEGORY$
* Extend API
* $ONELINER$
* Sets an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGet()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves an item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetItemPtr()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns pointer to specified element of the array
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetItemPtr( PHB_ITEM pArray, ULONG ulIndex ) --> ( PHB_ITEM )pResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayCopyC()
* $CATEGORY$
* Extend API
* $ONELINER$
* Copy a string into an array item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayCopyC( PHB_ITEM pArray, ULONG ulIndex, char * szBuffer, ULONG ulLen ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetC()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the string contained on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetC( PHB_ITEM pArray, ULONG ulIndex ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetCPtr()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the string pointer on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetCPtr( PHB_ITEM pArray, ULONG ulIndex ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetCLen()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the string length contained on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetCLen( PHB_ITEM pArray, ULONG ulIndex ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetL()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the logical value contained on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetL( PHB_ITEM pArray, ULONG ulIndex ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetNI()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the int value contained on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetNI( PHB_ITEM pArray, ULONG ulIndex ) --> ( int )iResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetNL()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the long numeric value contained on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetNL( PHB_ITEM pArray, ULONG ulIndex ) --> ( long )lResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetND()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the double value contained on an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetND( PHB_ITEM pArray, ULONG ulIndex ) --> ( double )dResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetDS()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the date value contained in an array element
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetDS( PHB_ITEM pArray, ULONG ulIndex, char * szDate ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetDL()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the date value contained in an array element, as a long integer
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetDL( PHB_ITEM pArray, ULONG ulIndex ) --> ( long )lResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayGetType()
* $CATEGORY$
* Extend API
* $ONELINER$
* Retrieves the type of an array item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex ) --> ( USHORT )usResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayFill()
* $CATEGORY$
* Extend API
* $ONELINER$
* Fill an array with a given item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * pulCount ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayScan()
* $CATEGORY$
* Extend API
* $ONELINER$
* Scan an array for a given item, or until code-block item returns TRUE
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * pulCount ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayEval()
* $CATEGORY$
* Extend API
* $ONELINER$
* Execute a code-block for every element of an array item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, ULONG * pulStart, ULONG * pulCount ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayCopy()
* $CATEGORY$
* Extend API
* $ONELINER$
* Copy items from one array to another
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG * pulStart, ULONG * pulCount, ULONG * pulTarget ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arrayClone()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a duplicate of an existing array, including all nested items
* $SYNTAX$
* C Prototype
*
* #include
* hb_arrayClone( PHB_ITEM pArray ) --> ( PHB_ITEM )pResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_arraySort()
* $CATEGORY$
* Extend API
* $ONELINER$
* Sorts an array item
* $SYNTAX$
* C Prototype
*
* #include
* hb_arraySort( PHB_ITEM pArray, ULONG * pulStart, ULONG * pulCount, PHB_ITEM pBlock ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_stricmp()
* $CATEGORY$
* Extend API
* $ONELINER$
* Compare two strings without regards to case
* $SYNTAX$
* C Prototype
*
* #include
* hb_stricmp( const char * s1, const char * s2 ) --> ( int )iResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strnicmp()
* $CATEGORY$
* Extend API
* $ONELINER$
* Compare two string without regards to case, limited by length
* $SYNTAX$
* C Prototype
*
* #include
* hb_strnicmp( const char * s1, const char * s2, ULONG ulLen ) --> ( int )iResult
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strupr()
* $CATEGORY$
* Extend API
* $ONELINER$
* Convert a string in-place to upper-case
* $SYNTAX$
* C Prototype
*
* #include
* hb_strupr( char * pszText ) --> ( char * )pszResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strdup()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns a pointer to a newly allocated copy of the source string
* $SYNTAX$
* C Prototype
*
* #include
* hb_strdup( const char * pszText ) --> ( char * )pszResult
* $ARGUMENTS$
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strMatchRegExp()
* $CATEGORY$
* Extend API
* $ONELINER$
* Compare two strings using a regular expression pattern
* $SYNTAX$
* C Prototype
*
* #include
* hb_strMatchRegExp( const char * szString, const char * szMask ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strEmpty()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns whether a string contains only white space
* $SYNTAX$
* C Prototype
*
* #include
* hb_strEmpty( const char * szText, ULONG ulLen ) --> ( BOOL )bResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strDescend()
* $CATEGORY$
* Extend API
* $ONELINER$
* Copy a string to a buffer, inverting each character
* $SYNTAX$
* C Prototype
*
* #include
* hb_strDescend( char * szStringTo, const char * szStringFrom, ULONG ulLen ) --> void
* $ARGUMENTS$
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strAt()
* $CATEGORY$
* Extend API
* $ONELINER$
* Returns an index to a sub-string within another string
* $SYNTAX$
* C Prototype
*
* #include
* hb_strAt( const char * szSub, ULONG ulSubLen, const char * szText, ULONG ulLen ) --> ( ULONG )ulResult
* $ARGUMENTS$
*
*
*
*
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strUpper()
* $CATEGORY$
* Extend API
* $ONELINER$
* Convert an existing string buffer to upper case
* $SYNTAX$
* C Prototype
*
* #include
* hb_strUpper( char * szText, ULONG ulLen ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strLower()
* $CATEGORY$
* Extend API
* $ONELINER$
* Convert an existing string buffer to lower case
* $SYNTAX$
* C Prototype
*
* #include
* hb_strLower( char * szText, ULONG ulLen ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
* $RETURNS$
*
* $DESCRIPTION$
*
* $EXAMPLES$
*
* $STATUS$
* R
* $COMPLIANCE$
* Compliance is not applicable to API calls.
* $FILES$
* Library is vm
* $PLATFORMS$
* All
* $SEEALSO$
*
* $END$
*/
/* $DOC$
* $FUNCNAME$
* hb_strncpyUpper()
* $CATEGORY$
* Extend API
* $ONELINER$
* Copy an existing string buffer to another buffer, as upper case
* $SYNTAX$
* C Prototype
*
* #include
* hb_strncpyUpper( char * pDest, const char * pSource, ULONG ulLen ) --> ( char * )pszResult
* $ARGUMENTS$
*
*
*
*
* |