*** empty log message ***
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,8 @@
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ACHOICE()
|
||||
* $CATEGORY$
|
||||
* Array
|
||||
*
|
||||
* $ONELINER$
|
||||
* Allows selection of an element from an array
|
||||
@@ -34,11 +36,11 @@
|
||||
* [<nWindowRow>]) --> nPosition
|
||||
*
|
||||
* $ARGUMENTS$
|
||||
* nTop - topmost row used to display array (default 0)
|
||||
* nLeft - leftmost row used to display array (default 0)
|
||||
* nBottom - bottommost row used to display array (default MAXROW())
|
||||
* nRight - rightmost row used to display array (default MAXCOL())
|
||||
* acMenuItems - the character array of items from which to select
|
||||
* nTop - topmost row used to display array (default 0)
|
||||
* nLeft - leftmost row used to display array (default 0)
|
||||
* nBottom - bottommost row used to display array (default MAXROW())
|
||||
* nRight - rightmost row used to display array (default MAXCOL())
|
||||
* acMenuItems - the character array of items from which to select
|
||||
* alSelectableItems - an array of items, either logical or character,
|
||||
* which is used to determine if a particular item
|
||||
* may be selected. If the type of a given item is
|
||||
@@ -57,16 +59,16 @@
|
||||
* When it is called, it will be supplied with the
|
||||
* parameters: nMode, nCurElement, and nRowPos.
|
||||
* Default NIL.
|
||||
* bUserBlock - a codeblock to be called which may
|
||||
* bUserBlock - a codeblock to be called which may
|
||||
* effect special processing of keystrokes. It
|
||||
* should be specified in the form
|
||||
* {|nMode, nCurElemenet, nRowPos| ;
|
||||
* MyFunc(nMode, nCurElemenet, nRowPos) }.
|
||||
* Default NIL.
|
||||
* nInitialItem - the number of the element to be highlighted as
|
||||
* nInitialItem - the number of the element to be highlighted as
|
||||
* the current item when the array is initally
|
||||
* displayed. 1 origin. Default 1.
|
||||
* nWindowRow - the number of the window row on which the initial
|
||||
* nWindowRow - the number of the window row on which the initial
|
||||
* item is to be displayed. 0 origin. Default 0.
|
||||
*
|
||||
* $RETURNS$
|
||||
@@ -89,8 +91,7 @@
|
||||
* ENDIF
|
||||
*
|
||||
* $SEEALSO$
|
||||
* ACHOICE() - as supplied in Clipper
|
||||
*
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ADIR()*
|
||||
* ADIR()
|
||||
* $CATEGORY$
|
||||
* Array
|
||||
* $ONELINER$
|
||||
@@ -117,8 +117,9 @@
|
||||
* $COMPLIANCE$
|
||||
* <aName> is going to be fill with long file name and not necessarily
|
||||
* the 8.3 uppercase name.
|
||||
*
|
||||
* $SEEALSO$
|
||||
* ARRAY(), DIRECTORY(), SET DEFAULT
|
||||
* ARRAY() DIRECTORY() 'SET DEFAULT'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ STATIC s_lNoAlert := NIL
|
||||
*
|
||||
* <nDelay> is an Harbour extension.
|
||||
* $SEEALSO$
|
||||
* @...PROMPT, MENU TO, STDOUT(), __NONOALERT()
|
||||
* 'comm.ngo:@...PROMPT' 'comm.ngo:MENU TO' STDOUT() __NONOALERT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -786,6 +786,63 @@ static void hb_arrayNewRagged( PHB_ITEM pArray, int iDimension )
|
||||
hb_arrayNewRagged( hb_arrayGetItemPtr( pArray, ulElements-- ), iDimension );
|
||||
}
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ARRAY()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Create an uninitialized array of specified length
|
||||
* $SYNTAX$
|
||||
* ARRAY(<nElements> [, <nElements>...]) --> aArray
|
||||
* $ARGUMENTS$
|
||||
<nElements> is the number of elements in the specified dimension.
|
||||
The maximum number of elements in a dimension is 4096. Arrays in
|
||||
HARBOUR can have an unlimited number of dimensions.
|
||||
*
|
||||
* $RETURNS$
|
||||
* ARRAY() returns an array of specified dimensions.
|
||||
* $DESCRIPTION$
|
||||
ARRAY() is an array function that returns an uninitialized array with
|
||||
the specified number of elements and dimensions. If more than one
|
||||
<nElements> argument is specified, a multidimensional array is created
|
||||
with the number of dimensions equal to the number of <nElements>
|
||||
arguments specified. Any <nElements> that is itself an array creates a
|
||||
nested array.
|
||||
|
||||
In HARBOUR, there are several ways to create an array. You can
|
||||
declare an array using a declaration statement such as LOCAL or STATIC;
|
||||
you can create an array using a PRIVATE or PUBLIC statement; you can
|
||||
assign a literal array to an existing variable; or you can use the
|
||||
ARRAY() function. ARRAY() has the advantage that it can create arrays
|
||||
within expressions or code blocks.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
*
|
||||
This example creates a one-dimensional array of five elements
|
||||
using the ARRAY() function, and then shows the equivalent action by
|
||||
assigning a literal array of NIL values:
|
||||
|
||||
aArray := ARRAY(5)
|
||||
aArray := { NIL, NIL, NIL, NIL, NIL }
|
||||
|
||||
This example shows three different statements which create the
|
||||
same multidimensional array:
|
||||
|
||||
aArray := ARRAY(3, 2)
|
||||
aArray := { {NIL, NIL}, {NIL, NIL}, {NIL, NIL} }
|
||||
aArray := { ARRAY(2), ARRAY(2), ARRAY(2) }
|
||||
|
||||
This example creates a nested, multidimensional array:
|
||||
|
||||
aArray := ARRAY(3, {NIL,NIL})
|
||||
|
||||
* $SEEALSO$
|
||||
* AADD() ADEL() AFILL() AINS()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ARRAY( void )
|
||||
{
|
||||
@@ -816,6 +873,65 @@ HARBOUR HB_ARRAY( void )
|
||||
hb_arrayNewRagged( &hb_stack.Return, 1 );
|
||||
}
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* AADD()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Add a new element to the end of an array
|
||||
* $SYNTAX$
|
||||
* AADD(<aTarget>, <expValue>) --> Value
|
||||
* $ARGUMENTS$
|
||||
*
|
||||
* <aTarget> is the array to add a new element to.
|
||||
*
|
||||
* <expValue> is the value assigned to the new element.
|
||||
*
|
||||
* $RETURNS$
|
||||
*
|
||||
* AADD() evaluates <expValue> and returns its value. If <expValue> is not
|
||||
* specified, AADD() returns NIL.
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
AADD() is an array function that increases the actual length of the
|
||||
target array by one. The newly created array element is assigned the
|
||||
value specified by <expValue>.
|
||||
|
||||
AADD() is used to dynamically grow an array. It is useful for building
|
||||
dynamic lists or queues. A good example of this is the GetList array
|
||||
used by the GET system to hold Get objects. After a READ or CLEAR GETS,
|
||||
GetList becomes an empty array. Each time you execute an @...GET
|
||||
command, the GET system uses AADD() to add a new element to the end of
|
||||
the GetList array, and then assigns a new Get object to the new element.
|
||||
|
||||
AADD() is similar to ASIZE() but only adds one element at a time;
|
||||
ASIZE() can grow or shrink an array to a specified size. AADD(),
|
||||
however, has the advantage that it can assign a value to the new
|
||||
element, while ASIZE() cannot. AADD() may also seem similar to AINS(),
|
||||
but they are different: AINS() moves elements within an array, but it
|
||||
does not change the array's length.
|
||||
|
||||
Note: If <expValue> is another array, the new element in the target
|
||||
array will contain a reference to the array specified by <expValue>.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
These examples demonstrate the effects of multiple invocations
|
||||
of AADD() to an array:
|
||||
|
||||
aArray := {} // Result: aArray is an empty array
|
||||
AADD(aArray, 5) // Result: aArray is { 5 }
|
||||
AADD(aArray, 10) // Result: aArray is { 5, 10 }
|
||||
AADD(aArray, { 12, 10 }) // Result: aArray is
|
||||
// { 5, 10, { 12, 10 } }
|
||||
*
|
||||
* $SEEALSO$
|
||||
* AINS()
|
||||
* ASIZE()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_AADD( void )
|
||||
{
|
||||
@@ -844,6 +960,54 @@ HARBOUR HB_AADD( void )
|
||||
|
||||
/* NOTE: CA-Cl*pper 5.3 and older will return NIL on bad parameter, 5.3a,b
|
||||
will throw a runtime error. [vszel] */
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ASIZE()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Grow or shrink an array
|
||||
* $SYNTAX$
|
||||
* ASIZE(<aTarget>, <nLength>) --> aTarget
|
||||
* $ARGUMENTS$
|
||||
<aTarget> is the array to grow or shrink.
|
||||
|
||||
<nLength> is the new size of the array.
|
||||
*
|
||||
* $RETURNS$
|
||||
* ASIZE() returns a reference to the target array, <aTarget>.
|
||||
* $DESCRIPTION$
|
||||
ASIZE() is an array function that changes the actual length of the
|
||||
<aTarget> array. The array is shortened or lengthened to match the
|
||||
specified length. If the array is shortened, elements at the end of the
|
||||
array are lost. If the array is lengthened, new elements are added to
|
||||
the end of the array and assigned NIL.
|
||||
|
||||
ASIZE() is similar to AADD() which adds a single new element to the end
|
||||
of an array and optionally assigns a new value at the same time. Note
|
||||
that ASIZE() is different from AINS() and ADEL(), which do not actually
|
||||
change the array's length.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE These examples demonstrate adding new elements and deleting
|
||||
existing elements:
|
||||
|
||||
aArray := { 1 } // Result: aArray is { 1 }
|
||||
ASIZE(aArray, 3) // Result: aArray is { 1, NIL, NIL }
|
||||
ASIZE(aArray, 1) // Result: aArray is { 1 }
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* AADD() ADEL() AFILL() AINS()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ASIZE( void )
|
||||
{
|
||||
@@ -862,6 +1026,46 @@ HARBOUR HB_ASIZE( void )
|
||||
hb_errRT_BASE( EG_ARG, 2023, NULL, "ASIZE" );
|
||||
#endif
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ATAIL()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Return the highest numbered element of an array
|
||||
* $SYNTAX$
|
||||
* ATAIL(<aArray>) --> Element
|
||||
* $ARGUMENTS$
|
||||
* <aArray> is the array.
|
||||
* $RETURNS$
|
||||
ATAIL() returns either a value or a reference to an array or object.
|
||||
The array is not changed.
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
ATAIL() is an array function that returns the highest numbered element
|
||||
of an array. It can be used in applications as shorthand for
|
||||
<aArray>[LEN(<aArray>)] when you need to obtain the last element of an
|
||||
array.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE The following example creates a literal array and returns that
|
||||
last element of the array:
|
||||
|
||||
aArray := {"a", "b", "c", "d"}
|
||||
? ATAIL(aArray) // Result: d
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ATAIL( void )
|
||||
{
|
||||
@@ -870,6 +1074,60 @@ HARBOUR HB_ATAIL( void )
|
||||
if( pArray )
|
||||
hb_arrayLast( pArray, &hb_stack.Return );
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* AINS()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Insert a NIL element into an array
|
||||
* $SYNTAX$
|
||||
* AINS(<aTarget>, <nPosition>) --> aTarget
|
||||
* $ARGUMENTS$
|
||||
<aTarget> is the array into which a new element will be inserted.
|
||||
|
||||
<nPosition> is the position at which the new element will be
|
||||
inserted.
|
||||
*
|
||||
* $RETURNS$
|
||||
* AINS() returns a reference to the target array, <aTarget>.
|
||||
* $DESCRIPTION$
|
||||
AINS() is an array function that inserts a new element into a specified
|
||||
array. The newly inserted element is NIL data type until a new value is
|
||||
assigned to it. After the insertion, the last element in the array is
|
||||
discarded, and all elements after the new element are shifted down one
|
||||
position.
|
||||
|
||||
Warning! AINS() must be used carefully with multidimensional
|
||||
arrays. Multidimensional arrays in HARBOUR are implemented by
|
||||
nesting arrays within other arrays. Using AINS() in a multidimensional
|
||||
array discards the last element in the specified target array which, if
|
||||
it is an array element, will cause one or more dimensions to be lost.
|
||||
To insert a new dimension into an array, first add a new element to the
|
||||
end of the array using AADD() or ASIZE() before using AINS().
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE This example demonstrates the effect of using AINS() on an
|
||||
array:
|
||||
|
||||
LOCAL aArray
|
||||
aArray := { 1, 2, 3 } // Result: aArray is
|
||||
// now { 1, 2, 3 }
|
||||
AINS(aArray, 2) // Result: aArray is
|
||||
// now { 1, NIL, 2 }
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* AADD() ACOPY() ADEL() AEVAL() AFILL() ASIZE()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_AINS( void )
|
||||
{
|
||||
@@ -883,6 +1141,57 @@ HARBOUR HB_AINS( void )
|
||||
hb_itemReturn( pArray ); /* AIns() returns the array itself */
|
||||
}
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ADEL()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Delete an array element
|
||||
* $SYNTAX$
|
||||
* ADEL(<aTarget>, <nPosition>) --> aTarget
|
||||
* $ARGUMENTS$
|
||||
<aTarget> is the array to delete an element from.
|
||||
|
||||
<nPosition> is the position of the target array element to delete.
|
||||
*
|
||||
* $RETURNS$
|
||||
* ADEL() returns a reference to the target array, <aTarget>.
|
||||
* $DESCRIPTION$
|
||||
ADEL() is an array function that deletes an element from an array. The
|
||||
contents of the specified array element is lost, and all elements from
|
||||
that position to the end of the array are shifted up one element. The
|
||||
last element in the array becomes NIL.
|
||||
|
||||
Warning! HARBOUR implements multidimensional arrays by nesting
|
||||
arrays within other arrays. If the <aTarget> array is a
|
||||
multidimensional array, ADEL() can delete an entire subarray specified
|
||||
by <nPosition>, causing <aTarget> to describe an array with a different
|
||||
structure than the original.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE This example creates a constant array of three elements, and
|
||||
then deletes the second element. The third element is moved up one
|
||||
position, and the new third element is assigned a NIL:
|
||||
|
||||
LOCAL aArray
|
||||
aArray := { 1, 2, 3 } // Result: aArray is
|
||||
// now { 1, 2, 3 }
|
||||
ADEL(aArray, 2) // Result: aArray is
|
||||
// now { 1, 3, NIL }
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* ACOPY() AINS() AFILL()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ADEL( void )
|
||||
{
|
||||
@@ -896,6 +1205,68 @@ HARBOUR HB_ADEL( void )
|
||||
hb_itemReturn( pArray ); /* ADel() returns the array itself */
|
||||
}
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* AFILL()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Fill an array with a specified value
|
||||
* $SYNTAX$
|
||||
AFILL(<aTarget>, <expValue>,
|
||||
[<nStart>], [<nCount>]) --> aTarget
|
||||
*
|
||||
* $ARGUMENTS$
|
||||
<aTarget> is the array to fill.
|
||||
|
||||
<expValue> is the value to place in each array element. It can be
|
||||
an expression of any valid data type.
|
||||
|
||||
<nStart> is the position of the first element to fill. If this
|
||||
argument is omitted, the default value is one.
|
||||
|
||||
<nCount> is the number of elements to fill starting with element
|
||||
<nStart>. If this argument is omitted, elements are filled from the
|
||||
starting element position to the end of the array.
|
||||
*
|
||||
* $RETURNS$
|
||||
* AFILL() returns a reference to <aTarget>.
|
||||
* $DESCRIPTION$
|
||||
AFILL() is an array function that fills the specified array with a
|
||||
single value of any data type (including an array, code block, or NIL)
|
||||
by assigning <expValue> to each array element in the specified range.
|
||||
|
||||
Warning! AFILL() cannot be used to fill multidimensional arrays.
|
||||
HARBOUR implements multidimensional arrays by nesting arrays within
|
||||
other arrays. Using AFILL() with a multidimensional array will
|
||||
overwrite subarrays used for the other dimensions of the array.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE This example, creates a three-element array. The array is
|
||||
then filled with the logical value, (.F.). Finally, elements in
|
||||
positions two and three are assigned the new value of true (.T.):
|
||||
|
||||
LOCAL aLogic[3]
|
||||
// Result: aLogic is { NIL, NIL, NIL }
|
||||
|
||||
AFILL(aLogic, .F.)
|
||||
// Result: aLogic is { .F., .F., .F. }
|
||||
|
||||
AFILL(aLogic, .T., 2, 2)
|
||||
// Result: aLogic is { .F., .T., .T. }
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* AADD() AEVAL() DBSTRUCT() DIRECTORY()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_AFILL( void )
|
||||
{
|
||||
@@ -919,6 +1290,110 @@ HARBOUR HB_AFILL( void )
|
||||
hb_itemReturn( pArray ); /* AFill() returns the array itself */
|
||||
}
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ASCAN()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Scan an array for a value or until a block returns true (.T.)
|
||||
* $SYNTAX$
|
||||
ASCAN(<aTarget>, <expSearch>,
|
||||
[<nStart>], [<nCount>]) --> nStoppedAt
|
||||
*
|
||||
* $ARGUMENTS$
|
||||
<aTarget> is the array to scan.
|
||||
|
||||
<expSearch> is either a simple value to scan for, or a code block.
|
||||
If <expSearch> is a simple value it can be character, date, logical, or
|
||||
numeric type.
|
||||
|
||||
<nStart> is the starting element of the scan. If this argument is
|
||||
not specified, the default starting position is one.
|
||||
|
||||
<nCount> is the number of elements to scan from the starting
|
||||
position. If this argument is not specified, all elements from the
|
||||
starting element to the end of the array are scanned.
|
||||
*
|
||||
* $RETURNS$
|
||||
ASCAN() returns a numeric value representing the array position of the
|
||||
last element scanned. If <expSearch> is a simple value, ASCAN() returns
|
||||
the position of the first matching element, or zero if a match is not
|
||||
found. If <expSearch> is a code block, ASCAN() returns the position of
|
||||
the element where the block returned true (.T.).
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
ASCAN() is an array function that scans an array for a specified value
|
||||
and operates like SEEK when searching for a simple value. The
|
||||
<expSearch> value is compared to the target array element beginning with
|
||||
the leftmost character in the target element and proceeding until there
|
||||
are no more characters left in <expSearch>. If there is no match,
|
||||
ASCAN() proceeds to the next element in the array.
|
||||
|
||||
Since ASCAN() uses the equal operator (=) for comparisons, it is
|
||||
sensitive to the status of EXACT. If EXACT is ON, the target array
|
||||
element must be exactly equal to the result of <expSearch> to match.
|
||||
|
||||
If the <expSearch> argument is a code block, ASCAN() scans the <aTarget>
|
||||
array executing the block for each element accessed. As each element is
|
||||
encountered, ASCAN() passes the element's value as an argument to the
|
||||
code block, and then performs an EVAL() on the block. The scanning
|
||||
operation stops when the code block returns true (.T.), or ASCAN()
|
||||
reaches the last element in the array.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE This example demonstrates scanning a three-element array using
|
||||
simple values and a code block as search criteria. The code block
|
||||
criteria shows how to perform a case-insensitive search:
|
||||
|
||||
aArray := { "Tom", "Mary", "Sue" }
|
||||
? ASCAN(aArray, "Mary") // Result: 2
|
||||
? ASCAN(aArray, "mary") // Result: 0
|
||||
//
|
||||
? ASCAN(aArray, { |x| UPPER(x) ;
|
||||
== "MARY" }) // Result: 2
|
||||
|
||||
^CFE This example demonstrates scanning for multiple instances of a
|
||||
search argument after a match is found:
|
||||
|
||||
LOCAL aArray := { "Tom", "Mary", "Sue",;
|
||||
"Mary" }, nStart := 1
|
||||
//
|
||||
// Get last array element position
|
||||
nAtEnd := LEN(aArray)
|
||||
DO WHILE (nPos := ASCAN(aArray, "Mary", ;
|
||||
nStart)) > 0
|
||||
? nPos, aArray[nPos]
|
||||
//
|
||||
// Get new starting position and test
|
||||
// boundary condition
|
||||
IF (nStart := ++nPos) > nAtEnd
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
^CFE This example scans a two dimensional array using a code block.
|
||||
Note that the parameter aVal in the code block is an array:
|
||||
|
||||
LOCAL aArr:={}
|
||||
CLS
|
||||
AADD(aArr,{"one","two"})
|
||||
AADD(aArr,{"three","four"})
|
||||
AADD(aArr,{"five","six"})
|
||||
? ASCAN(aArr, {|aVal| aVal[2] == "four"}) // Returns 2
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* EVAL() AEVAL()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ASCAN( void )
|
||||
{
|
||||
@@ -938,6 +1413,62 @@ HARBOUR HB_ASCAN( void )
|
||||
else
|
||||
hb_retnl( 0 );
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* AEVAL()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Execute a code block for each element in an array
|
||||
* $SYNTAX$
|
||||
AEVAL(<aArray>, <bBlock>,
|
||||
[<nStart>], [<nCount>]) --> aArray
|
||||
*
|
||||
* $ARGUMENTS$
|
||||
<aArray> is the array to traverse.
|
||||
|
||||
<bBlock> is a code block to execute for each element encountered.
|
||||
|
||||
<nStart> is the starting element. If not specified, the default is
|
||||
element one.
|
||||
|
||||
<nCount> is the number of elements to process from <nStart>. If not
|
||||
specified, the default is all elements to the end of the array.
|
||||
*
|
||||
* $RETURNS$
|
||||
AEVAL() returns a reference to <aArray>.
|
||||
*
|
||||
* $DESCRIPTION$
|
||||
AEVAL() is an array function that evaluates a code block once for each
|
||||
element of an array, passing the element value and the element index as
|
||||
block parameters. The return value of the block is ignored. All
|
||||
elements in <aArray> are processed unless either the <nStart> or the
|
||||
<nCount> argument is specified.
|
||||
|
||||
AEVAL() makes no assumptions about the contents of the array elements it
|
||||
is passing to the block. It is assumed that the supplied block knows
|
||||
what type of data will be in each element.
|
||||
|
||||
AEVAL() is similar to DBEVAL() which applies a block to each record of a
|
||||
database file. Like DBEVAL(), AEVAL() can be used as a primitive for
|
||||
the construction of iteration commands for both simple and complex array
|
||||
structures.
|
||||
|
||||
*
|
||||
* $EXAMPLES$
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_AEVAL( void )
|
||||
{
|
||||
@@ -959,6 +1490,70 @@ HARBOUR HB_AEVAL( void )
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2017, NULL, "AEVAL" );
|
||||
}
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ACOPY()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Copy elements from one array to another
|
||||
* $SYNTAX$
|
||||
ACOPY(<aSource>, <aTarget>,
|
||||
[<nStart>], [<nCount>], [<nTargetPos>]) --> aTarget
|
||||
*
|
||||
* $ARGUMENTS$
|
||||
<aSource> is the array to copy elements from.
|
||||
|
||||
<aTarget> is the array to copy elements to.
|
||||
|
||||
<nStart> is the starting element position in the <aSource> array.
|
||||
If not specified, the default value is one.
|
||||
|
||||
<nCount> is the number of elements to copy from the <aSource> array
|
||||
beginning at the <nStart> position. If <nCount> is not specified, all
|
||||
elements in <aSource> beginning with the starting element are copied.
|
||||
|
||||
<nTargetPos> is the starting element position in the <aTarget> array
|
||||
to receive elements from <aSource>. If not specified, the default value
|
||||
is one.
|
||||
*
|
||||
* $RETURNS$
|
||||
* ACOPY() returns a reference to the target array, <aTarget>.
|
||||
* $DESCRIPTION$
|
||||
ACOPY() is an array function that copies elements from the <aSource>
|
||||
array to the <aTarget> array. The <aTarget> array must already exist
|
||||
and be large enough to hold the copied elements. If the <aSource> array
|
||||
has more elements, some elements will not be copied.
|
||||
|
||||
ACOPY() copies values of all data types including NIL and code blocks.
|
||||
If an element of the <aSource> array is a subarray, the corresponding
|
||||
element in the <aTarget> array will contain a reference to the subarray.
|
||||
Thus, ACOPY() will not create a complete duplicate of a multidimensional
|
||||
array. To do this, use the ACLONE() function.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE This example creates two arrays, each filled with a value.
|
||||
The first two elements from the source array are then copied into the
|
||||
target array:
|
||||
|
||||
LOCAL nCount := 2, nStart := 1, aOne, aTwo
|
||||
aOne := { 1, 1, 1 }
|
||||
aTwo := { 2, 2, 2 }
|
||||
ACOPY(aOne, aTwo, nStart, nCount)
|
||||
// Result: aTwo is now { 1, 1, 2 }
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* ACLONE() ADEL() AEVAL() AFILL() AINS() ASORT()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ACOPY( void )
|
||||
{
|
||||
@@ -987,6 +1582,50 @@ HARBOUR HB_ACOPY( void )
|
||||
|
||||
/* NOTE: Clipper will return NIL if the parameter is not an array. [vszel] */
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ACLONE()
|
||||
* $CATEGORY$
|
||||
* ARRAY
|
||||
* $ONELINER$
|
||||
* Duplicate a nested or multidimensional array
|
||||
* $SYNTAX$
|
||||
* ACLONE(<aSource>) --> aDuplicate
|
||||
* $ARGUMENTS$
|
||||
* <aSource> is the array to duplicate.
|
||||
* $RETURNS$
|
||||
* ACLONE() returns a duplicate of <aSource>.
|
||||
* $DESCRIPTION$
|
||||
ACLONE() is an array function that creates a complete duplicate of the
|
||||
<aSource> array. If <aSource> contains subarrays, ACLONE() creates
|
||||
matching subarrays and fills them with copies of the values in the
|
||||
<aSource> subarrays. ACLONE() is similar to ACOPY(), but ACOPY() does
|
||||
not duplicate nested arrays.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
^CFE This example creates an array then duplicates it using
|
||||
ACLONE(). The first array is then altered, but the duplicate copy is
|
||||
unaffected:
|
||||
|
||||
LOCAL aOne, aTwo
|
||||
aOne := { 1, 2, 3 } // Result: aOne is {1, 2, 3}
|
||||
aTwo := ACLONE(aOne) // Result: aTwo is {1, 2, 3}
|
||||
aOne[1] := 99 // Result: aOne is {99, 2, 3}
|
||||
// aTwo is still {1, 2, 3}
|
||||
*
|
||||
* $TESTS$
|
||||
*
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* ACOPY() ADEL() AINS() ASIZE()
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_ACLONE( void )
|
||||
{
|
||||
PHB_ITEM pSrcArray = hb_param( 1, IT_ARRAY );
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
* Clipper. But this is block calling frequency and order differs from
|
||||
* Clipper anyway, since they use different sorting algorithm.
|
||||
* $SEEALSO$
|
||||
* ASCAN(), EVAL(), SORT
|
||||
* ASCAN() EVAL() SORT
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* BREAK
|
||||
* BREAK()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Error recovery
|
||||
* $ONELINER$
|
||||
* Exits from a BEGIN SEQUENCE block
|
||||
* $SYNTAX$
|
||||
@@ -61,7 +61,7 @@
|
||||
* $COMPLIANCE$
|
||||
* BREAK() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* BEGIN SEQUENCE
|
||||
* 'BEGIN SEQUENCE'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
* $COMPLIANCE$
|
||||
* TBrowseDB() works exactly like CA-Clipper's TBrowseDB().
|
||||
* $SEEALSO$
|
||||
* BROWSE(), TBColumn class, TBrowse class, TBrowseNew()
|
||||
* BROWSE() 'TBColumn class' 'TBrowse class' TBrowseNew()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -105,7 +105,7 @@ FUNCTION TBrowseDB( nTop, nLeft, nBottom, nRight )
|
||||
* $FUNCNAME$
|
||||
* dbSkipper()
|
||||
* $CATEGORY$
|
||||
* Databases
|
||||
* Data base
|
||||
* $ONELINER$
|
||||
* Helper function to skip a database
|
||||
* $SYNTAX$
|
||||
@@ -139,7 +139,7 @@ FUNCTION TBrowseDB( nTop, nLeft, nBottom, nRight )
|
||||
* This function is only visible if source/rtl/browdb.prg was compiled
|
||||
* with the HB_COMPAT_XPP flag.
|
||||
* $SEEALSO$
|
||||
* DBSKIP(), SKIP
|
||||
* DBSKIP() SKIP
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* DBEDIT(), TBrowse class
|
||||
* DBEDIT()* 'TBrowse class'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ char * hb_consoleGetNewLine( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_OSNewLine
|
||||
* HB_OSNEWLINE()
|
||||
* $CATEGORY$
|
||||
* Operating System Specific
|
||||
* $ONELINER$
|
||||
@@ -215,7 +215,7 @@ char * hb_consoleGetNewLine( void )
|
||||
* $COMPLIANCE$
|
||||
* This is an add-on Operating System Tool function.
|
||||
* $SEEALSO$
|
||||
* OS(), OUTSTD(), OUTERR()
|
||||
* dos.ngo:OS() OUTSTD() OUTERR()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -1158,7 +1158,7 @@ HARBOUR HB___ACCEPTSTR( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* hb_ColorIndex
|
||||
* hb_ColorIndex()
|
||||
* $CATEGORY$
|
||||
* GT
|
||||
* $ONELINER$
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
* $FILES$
|
||||
* Header files are dbedit.ch, inkey.ch
|
||||
* $SEEALSO$
|
||||
* @...SAY, BROWSE(), TBrowse class, TRANSFORM()
|
||||
* '@...SAY' BROWSE() 'TBrowse class' TRANSFORM()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* DESCEND
|
||||
* DESCEND()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Conversion
|
||||
* $ONELINER$
|
||||
* Inverts an expression of string, logical, date or numeric type.
|
||||
* $SYNTAX$
|
||||
@@ -60,7 +60,7 @@
|
||||
* $COMPLIANCE$
|
||||
* DESCEND() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* INDEX, SEEK
|
||||
* 'INDEX' 'SEEK'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* DEVOUTPICT
|
||||
* DEVOUTPICT()
|
||||
* $CATEGORY$
|
||||
* Terminal
|
||||
* $ONELINER$
|
||||
@@ -63,8 +63,8 @@
|
||||
* $RETURNS$
|
||||
* NIL
|
||||
* $DESCRIPTION$
|
||||
* Outputs any expression using a picture transformation instead of using
|
||||
* the default transformation for the type of expression.
|
||||
* Outputs any expression using a picture transformation instead of
|
||||
* using the default transformation for the type of expression.
|
||||
* $EXAMPLES$
|
||||
* // Output a negative dollar amount using debit notation.
|
||||
* DEVOUTPICT( -1.25, "@D$ 99,999.99 )
|
||||
@@ -78,7 +78,7 @@
|
||||
* DEVOUTPICT() is mostly CA-Clipper compliant. Any differences are due
|
||||
* to enhancements in the Harbour TRANSFORM() over CA-Clipper.
|
||||
* $SEEALSO$
|
||||
* DEVOUT(), TRANSFORM().
|
||||
* DEVOUT() TRANSFORM()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -49,15 +49,66 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __Dir()* (DIR command)
|
||||
* __Dir()*
|
||||
* $CATEGORY$
|
||||
* File management
|
||||
* $ONELINER$
|
||||
* Display listings of files
|
||||
* $SYNTAX$
|
||||
* __Dir( [<cFileMask>] ) --> NIL
|
||||
* $ARGUMENTS$
|
||||
* <cFileMask> File mask to include in the function return. It could
|
||||
* contain path and standard wildcard characters as supported by your
|
||||
* OS (like * and ?). If <cFileMask> contain no path, then SET DEFAULT
|
||||
* path is used to display files in the mask.
|
||||
* $RETURNS$
|
||||
* __Dir() always returns NIL.
|
||||
* $DESCRIPTION$
|
||||
* If no <cFileMask> 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.
|
||||
*
|
||||
* or
|
||||
* If <cFileMask> 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" )
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* DBF information: CA-Clipper display 8.3 file names, Harbour display
|
||||
* 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-Clipper use 8.3 file name, with Harbour it would probably cut
|
||||
* long file names to feet this template.
|
||||
* $SEEALSO$
|
||||
* array.ngo:ADIR() DIRECTORY() 'SET DEFAULT'
|
||||
* $END$
|
||||
*/
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* DIR
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Display listings of files
|
||||
* $SYNTAX$
|
||||
*
|
||||
* DIR [<cFileMask>]
|
||||
* $ARGUMENTS$
|
||||
@@ -102,7 +153,7 @@
|
||||
* CA-Clipper use 8.3 file name, with Harbour it would probably cut
|
||||
* long file names to feet this template.
|
||||
* $SEEALSO$
|
||||
* ADIR(), DIRECTORY(), SET DEFAULT
|
||||
* array.ngo:ADIR() DIRECTORY() 'SET DEFAULT'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* EMPTY
|
||||
* EMPTY()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Conversion
|
||||
* $ONELINER$
|
||||
* Checks if the passed argument is empty.
|
||||
* $SYNTAX$
|
||||
@@ -66,7 +66,7 @@
|
||||
* $COMPLIANCE$
|
||||
* EMPTY() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* LEN
|
||||
* LEN()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@
|
||||
#define VER_PLATFORM_WIN32_WINDOWS 1
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && defined(_WINDOWS_) && ! defined(VER_PLATFORM_WIN32_CE)
|
||||
#define VER_PLATFORM_WIN32_CE 3
|
||||
#endif
|
||||
|
||||
#include "extend.h"
|
||||
#include "errorapi.h"
|
||||
#include "hbver.h"
|
||||
@@ -90,6 +94,30 @@
|
||||
#define INT_86 int86
|
||||
#endif
|
||||
#endif
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* OS()
|
||||
* $ONELINER$
|
||||
* Return the current operating system
|
||||
* $SYNTAX$
|
||||
* OS() -> <cOperatinSystem>
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ARGUMENTS$
|
||||
*
|
||||
* $RETURNS$
|
||||
<cOperatinSystem> -> The Current operating system
|
||||
* $DESCRIPTION$
|
||||
This function will return the current operating system
|
||||
* $EXAMPLES$
|
||||
* ? OS()
|
||||
*
|
||||
* $FILES$
|
||||
* source/rtl/environ.c
|
||||
* Run an external program
|
||||
* $SEEALSO$
|
||||
* $END$
|
||||
*/
|
||||
|
||||
HARBOUR HB_OS( void )
|
||||
{
|
||||
@@ -136,13 +164,18 @@ HARBOUR HB_OS( void )
|
||||
/* TODO: add MSVC support but MSVC cannot detect any OS except Windows! */
|
||||
#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||
|
||||
#if defined(_WINDOWS_) || defined(WINNT)
|
||||
#if defined(_WINDOWS_) || defined(WINNT) || defined(__BORLANDC__)
|
||||
|
||||
/* NOTE: Support for determining the window version by Luiz Rafael Culik
|
||||
Culik@sl.conex.net
|
||||
/* NOTE:
|
||||
Support for determining the window version by Luiz Rafael Culik
|
||||
Culik@sl.conex.net
|
||||
|
||||
Support for determining many windows flavours by Jose Lalin
|
||||
dezac@corevia.com
|
||||
*/
|
||||
|
||||
OSVERSIONINFO osVer; /* for GetVersionEx() */
|
||||
LONG lVersion;
|
||||
|
||||
osVer.dwOSVersionInfoSize = sizeof( osVer );
|
||||
|
||||
@@ -153,23 +186,98 @@ HARBOUR HB_OS( void )
|
||||
case VER_PLATFORM_WIN32_WINDOWS:
|
||||
hb_osmajor = osVer.dwMajorVersion;
|
||||
hb_osminor = osVer.dwMinorVersion;
|
||||
hb_osletter = osVer.dwBuildNumber;
|
||||
hb_os = "Windows 95/98";
|
||||
hb_osletter = LOWORD(osVer.dwBuildNumber);
|
||||
|
||||
if( hb_osmajor == 4 && hb_osminor == 0 && hb_osletter == 950 )
|
||||
hb_os = "Windows 95";
|
||||
else if( hb_osmajor == 4 && hb_osminor > 0 &&
|
||||
hb_osletter > 950 && hb_osletter <= 1080 )
|
||||
hb_os = "Windows 95 SP1";
|
||||
else if( hb_osmajor == 4 && hb_osminor < 10 &&
|
||||
hb_osletter > 1080 )
|
||||
hb_os = "Windows 95 OSR2"; /* Formerly: "Windows 95 SP2" */
|
||||
else if( hb_osmajor == 4 && hb_osminor == 10 &&
|
||||
hb_osletter == 1998 )
|
||||
hb_os = "Windows 98";
|
||||
else if( hb_osmajor == 4 && hb_osminor == 10 &&
|
||||
hb_osletter > 1998 && hb_osletter < 2183 )
|
||||
hb_os = "Windows 98 SP1";
|
||||
else if( hb_osmajor > 4 && hb_osletter >= 2183 )
|
||||
hb_os = "Windows 98 SE";
|
||||
else
|
||||
hb_os = "Windows";
|
||||
|
||||
/* TODO: Can you fix it, please ?
|
||||
strcat( hb_os, osVer.szCSDVersion );
|
||||
|
||||
I don't know why in each call this code returns:
|
||||
- Windows 95 OSR2 B ...
|
||||
- Windows 95 OSR2 B B ...
|
||||
- Windows 95 OSR2 B B B ...
|
||||
|
||||
Add this info in the NT section too.
|
||||
*/
|
||||
break;
|
||||
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
hb_osmajor = osVer.dwMajorVersion;
|
||||
hb_osminor = osVer.dwMinorVersion;
|
||||
hb_osletter = osVer.dwBuildNumber;
|
||||
hb_os = "Windows NT";
|
||||
hb_osletter = LOWORD(osVer.dwBuildNumber);
|
||||
|
||||
if( hb_osmajor == 3 && hb_osminor == 10 )
|
||||
hb_os = "Windows NT 3.1";
|
||||
else if( hb_osmajor == 3 && hb_osminor == 50 )
|
||||
hb_os = "Windows NT 3.5";
|
||||
else if( hb_osmajor == 3 && hb_osminor == 51 )
|
||||
hb_os = "Windows NT 3.51";
|
||||
else if( hb_osmajor == 4 )
|
||||
hb_os = "Windows NT 4";
|
||||
else if( hb_osmajor == 5 )
|
||||
hb_os = "Windows 2000";
|
||||
else
|
||||
hb_os = "Windows NT";
|
||||
|
||||
/* TODO: szCSDVersion should contain the service pack installed
|
||||
if( osVer.szCSDVersion )
|
||||
{
|
||||
int i = 0;
|
||||
WORD wServicePack;
|
||||
char szBuffer[ 128 ];
|
||||
|
||||
while( osVer.szCSDVersion[ i ] != '\0' && !isdigit( osVer.szCSDVersion[ i ] ) )
|
||||
i++;
|
||||
wServicePack = (WORD)( atoi( &osVer.szCSDVersion[ i ] ) );
|
||||
|
||||
sprintf( szBuffer, "%s %i", hb_os, wServicePack );
|
||||
strcopy( hb_os, szBuffer );
|
||||
}
|
||||
*/
|
||||
/* TODO: Add support for:
|
||||
* NT Stand Alone Server
|
||||
* NT Enterprise Edition
|
||||
* NT Terminal Server
|
||||
* NT Primary Domain Controller
|
||||
* NT Backup Domain Controller
|
||||
|
||||
It can be done with:
|
||||
RegOpenKey( "System\CurrentControlSet\Control\ProductOptions", ... )
|
||||
RegQueryValueEx( "ProductType", ..., szBuffer )
|
||||
*/
|
||||
break;
|
||||
|
||||
case VER_PLATFORM_WIN32s:
|
||||
hb_osmajor = osVer.dwMajorVersion;
|
||||
hb_osminor = osVer.dwMinorVersion;
|
||||
hb_osletter = osVer.dwBuildNumber;
|
||||
hb_osletter = LOWORD(osVer.dwBuildNumber);
|
||||
hb_os = "Windows 32s";
|
||||
break;
|
||||
|
||||
case VER_PLATFORM_WIN32_CE:
|
||||
hb_osmajor = osVer.dwMajorVersion;
|
||||
hb_osminor = osVer.dwMinorVersion;
|
||||
hb_osletter = LOWORD(osVer.dwBuildNumber);
|
||||
hb_os = "Windows CE";
|
||||
break;
|
||||
}
|
||||
cformat = "%s %d.%02d.%04d";
|
||||
}
|
||||
@@ -279,12 +387,15 @@ HARBOUR HB_OS( void )
|
||||
|
||||
#define HB_VERSION_BUFFER_LEN 80
|
||||
|
||||
/* Support for determining some compiler version/revision by Jose Lalin
|
||||
dezac@corevia.com
|
||||
*/
|
||||
|
||||
char * hb_version( USHORT uiMode )
|
||||
{
|
||||
char * pszVersion;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_version(%hu)", uiMode));
|
||||
/* HB_TRACE(("hb_version(%hu)", uiMode)); */
|
||||
|
||||
pszVersion = ( char * ) hb_xgrab( HB_VERSION_BUFFER_LEN );
|
||||
|
||||
@@ -457,9 +568,12 @@ HARBOUR HB_GETE( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __RUN
|
||||
* __RUN()
|
||||
* $SYNTAX$
|
||||
* __RUN( <cCommand> )
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
*
|
||||
* $ARGUMENTS$
|
||||
* <cCommand> Command to execute
|
||||
* $DESCRIPTION$
|
||||
@@ -486,4 +600,3 @@ HARBOUR HB___RUN( void )
|
||||
hb_errRT_BASE_Ext1( EG_UNSUPPORTED, 9999, NULL, "__RUN", 0, EF_CANDEFAULT );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
* $COMPLIANCE$
|
||||
* ERRORSYS() works exactly like CA-Clipper's ERRORSYS().
|
||||
* $SEEALSO$
|
||||
* ERRORBLOCK(), Error class
|
||||
* ERRORBLOCK() 'Error class'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
* $FUNCNAME$
|
||||
* FIELDBLOCK()
|
||||
* $CATEGORY$
|
||||
* Code block manipulation / Databases
|
||||
* Code Block
|
||||
* $ONELINER$
|
||||
* Return a code block that sets/gets a value for a given field
|
||||
* $SYNTAX$
|
||||
@@ -90,7 +90,7 @@
|
||||
*
|
||||
* CA-Clipper would raise BASE/1003 error if the field does not exist.
|
||||
* $SEEALSO$
|
||||
* EVAL(), FIELDWBLOCK(), MEMVARBLOCK()
|
||||
* EVAL() FIELDWBLOCK() mv.ngo:MEMVARBLOCK()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -107,7 +107,7 @@ FUNCTION FIELDBLOCK( cFieldName )
|
||||
* $FUNCNAME$
|
||||
* FIELDWBLOCK()
|
||||
* $CATEGORY$
|
||||
* Code block manipulation / Databases
|
||||
* Code Block
|
||||
* $ONELINER$
|
||||
* Return a sets/gets code block for field in a given work area
|
||||
* $SYNTAX$
|
||||
@@ -156,7 +156,7 @@ FUNCTION FIELDBLOCK( cFieldName )
|
||||
*
|
||||
* CA-Clipper would raise BASE/1003 error if the field does not exist.
|
||||
* $SEEALSO$
|
||||
* EVAL(), FIELDBLOCK(), MEMVARBLOCK()
|
||||
* EVAL() FIELDBLOCK() mv.ngo:MEMVARBLOCK()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ ANNOUNCE CLIPPER530
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* INIT PROCEDURE
|
||||
* 'INIT PROCEDURE'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -123,7 +123,7 @@ INIT PROCEDURE ClipInit
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __XHelp(), SET KEY, SETKEY()
|
||||
* __XHelp() 'SET KEY' Event.ngo:SETKEY()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HARDCR
|
||||
* HARDCR()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* STRINGS
|
||||
* $ONELINER$
|
||||
* Converts soft carriage pair chr(141)/chr(10) into hard carriage chr(13)
|
||||
* $SYNTAX$
|
||||
@@ -60,7 +60,7 @@
|
||||
* $COMPLIANCE$
|
||||
* HARDCR() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* MEMOTRAN(), STRTRAN()
|
||||
* MEMOTRAN() STRTRAN()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* $FUNCNAME$
|
||||
* __QUIT()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Events
|
||||
* $ONELINER$
|
||||
* Terminates an application.
|
||||
* $SYNTAX$
|
||||
@@ -65,7 +65,7 @@
|
||||
* $COMPLIANCE$
|
||||
* __QUIT() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* QUIT command
|
||||
* QUIT
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -985,7 +985,7 @@ HARBOUR HB_INKEY( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __KEYBOARD( [<cString>] )
|
||||
* __KEYBOARD()
|
||||
* $CATEGORY$
|
||||
* Console input
|
||||
* $ONELINER$
|
||||
@@ -1014,7 +1014,7 @@ HARBOUR HB_INKEY( void )
|
||||
* $COMPLIANCE$
|
||||
* __KEYBOARD() is compliant with CA-Clipper 5.3
|
||||
* $SEEALSO$
|
||||
* CLEAR TYPEAHEAD, KEYBOARD
|
||||
* 'CLEAR TYPEAHEAD' 'KEYBOARD'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -1096,7 +1096,7 @@ void hb_inkeyPut( int ch )
|
||||
* $COMPLIANCE$
|
||||
* Was not part of Clipper
|
||||
* $SEEALSO$
|
||||
* KEYBOARD, CLEAR TYPEAHEAD, INKEY
|
||||
* 'KEYBOARD' 'CLEAR TYPEAHEAD' INKEY()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -1144,7 +1144,7 @@ HARBOUR HB___KEYPUT( void )
|
||||
* $COMPLIANCE$
|
||||
* NEXTKEY() is compliant with CA-Clipper 5.3
|
||||
* $SEEALSO$
|
||||
* INKEY(), LASTKEY()
|
||||
* INKEY() LASTKEY()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -1184,7 +1184,7 @@ HARBOUR HB_NEXTKEY( void )
|
||||
* $COMPLIANCE$
|
||||
* LASTKEY() is compliant with CA-Clipper 5.3
|
||||
* $SEEALSO$
|
||||
* INKEY(), LASTKEY()
|
||||
* INKEY() LASTKEY()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __INPUT
|
||||
* __INPUT()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Data input and output
|
||||
* $ONELINER$
|
||||
* Stops application
|
||||
* $SYNTAX$
|
||||
@@ -60,7 +60,7 @@
|
||||
* $COMPLIANCE$
|
||||
* __INPUT() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* __WAIT, __ACCEPT
|
||||
* event.ngo:__WAIT() __ACCEPT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* LEN
|
||||
* LEN()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Strings
|
||||
* $ONELINER$
|
||||
* Returns size of a string or size of an array.
|
||||
* $SYNTAX$
|
||||
@@ -69,7 +69,7 @@
|
||||
* $COMPLIANCE$
|
||||
* LEN() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* EMPTY, RTRIM, LTRIM, AADD, ASIZE
|
||||
* Conv.ngo:EMPTY() RTRIM() LTRIM() array.ngo:AADD() array.ngo:ASIZE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* MEMVARBLOCK
|
||||
* MEMVARBLOCK()
|
||||
* $CATEGORY$
|
||||
* variables management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* Returns a codeblock that sets/gets a value of memvar variable
|
||||
* Returns a codeblock that sets/gets a value of memvar variable
|
||||
* $SYNTAX$
|
||||
* MEMVARBLOCK( <cMemvarName> )
|
||||
* $ARGUMENTS$
|
||||
@@ -75,7 +75,7 @@
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* __MVGET, __MVPUT
|
||||
* __MVGET() __MVPUT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ static void hb_memvarCreateFromItem( PHB_ITEM, BYTE, PHB_ITEM );
|
||||
static void hb_memvarCreateFromDynSymbol( PHB_DYNS, BYTE, PHB_ITEM );
|
||||
static void hb_memvarAddPrivate( PHB_DYNS );
|
||||
static HB_DYNS_PTR hb_memvarFindSymbol( HB_ITEM_PTR );
|
||||
|
||||
void hb_memvarsInit( void )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_memvarsInit()"));
|
||||
@@ -514,7 +513,7 @@ void hb_memvarGetRefer( HB_ITEM_PTR pItem, PHB_SYMB pMemvarSymb )
|
||||
hb_errInternal( 9999, "Invalid symbol item passed as memvar %s", pMemvarSymb->szName, NULL );
|
||||
}
|
||||
|
||||
/* Create a new variable declared as procedure/function PARAMETER
|
||||
/*
|
||||
*/
|
||||
void hb_memvarNewParameter( PHB_SYMB pSymbol, PHB_ITEM pValue )
|
||||
{
|
||||
@@ -523,13 +522,6 @@ void hb_memvarNewParameter( PHB_SYMB pSymbol, PHB_ITEM pValue )
|
||||
hb_memvarCreateFromDynSymbol( pSymbol->pDynSym, HB_MV_PRIVATE, pValue );
|
||||
}
|
||||
|
||||
/* This function returns a string value of memvar variable with passed name.
|
||||
* If a requested variable does not exist or contains non-string value
|
||||
* then the NULL pointer is returned.
|
||||
* NOTE:
|
||||
* This is a helper function for macro text substitution
|
||||
* var1 := "&var2.value"
|
||||
*/
|
||||
char * hb_memvarGetStrValuePtr( char * szVarName, ULONG *pulLen )
|
||||
{
|
||||
HB_ITEM itName;
|
||||
@@ -566,7 +558,6 @@ char * hb_memvarGetStrValuePtr( char * szVarName, ULONG *pulLen )
|
||||
return szValue;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This function creates a value for memvar variable
|
||||
*
|
||||
@@ -891,19 +882,12 @@ static HB_DYNS_PTR hb_memvarFindSymbol( HB_ITEM_PTR pName )
|
||||
|
||||
if( pName )
|
||||
{
|
||||
ULONG ulLen;
|
||||
|
||||
/* truncate a passed name to maximal allowed symbol name
|
||||
*/
|
||||
if( pName->item.asString.length < HB_SYMBOL_NAME_LEN )
|
||||
ulLen = pName->item.asString.length;
|
||||
else
|
||||
ulLen = HB_SYMBOL_NAME_LEN;
|
||||
ULONG ulLen = pName->item.asString.length;
|
||||
|
||||
if( ulLen )
|
||||
{
|
||||
char * szName = ( char * ) hb_xgrab( ulLen + 1 );
|
||||
char * szArg = pName->item.asString.value;
|
||||
char szName[ HB_SYMBOL_NAME_LEN + 1 ];
|
||||
|
||||
szName[ ulLen ] = '\0';
|
||||
do
|
||||
@@ -913,6 +897,7 @@ static HB_DYNS_PTR hb_memvarFindSymbol( HB_ITEM_PTR pName )
|
||||
} while( ulLen );
|
||||
|
||||
pDynSym = hb_dynsymFind( szName );
|
||||
hb_xfree( szName );
|
||||
}
|
||||
}
|
||||
return pDynSym;
|
||||
@@ -926,7 +911,7 @@ static HB_DYNS_PTR hb_memvarFindSymbol( HB_ITEM_PTR pName )
|
||||
* $FUNCNAME$
|
||||
* __MVPUBLIC()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function creates a PUBLIC variable
|
||||
* $SYNTAX$
|
||||
@@ -1008,7 +993,7 @@ HARBOUR HB___QQPUB( void )
|
||||
* $FUNCNAME$
|
||||
* __MVPRIVATE()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function creates a PRIVATE variable
|
||||
* $SYNTAX$
|
||||
@@ -1079,7 +1064,7 @@ HARBOUR HB___MVPRIVATE( void )
|
||||
* $FUNCNAME$
|
||||
* __MVXRELEASE()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function releases value stored in PRIVATE or PUBLIC variable
|
||||
* $SYNTAX$
|
||||
@@ -1175,7 +1160,7 @@ HARBOUR HB___MVXRELEASE( void )
|
||||
* $FUNCNAME$
|
||||
* __MVRELEASE()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function releases PRIVATE variables created in current procedure
|
||||
* $SYNTAX$
|
||||
@@ -1239,7 +1224,7 @@ HARBOUR HB___MVRELEASE( void )
|
||||
* $FUNCNAME$
|
||||
* __MVSCOPE()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* If variable exists then returns its scope.
|
||||
* $SYNTAX$
|
||||
@@ -1313,7 +1298,7 @@ HARBOUR HB___MVSCOPE( void )
|
||||
* $FUNCNAME$
|
||||
* __MVCLEAR()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function releases all PRIVATE and PUBLIC variables
|
||||
* $SYNTAX$
|
||||
@@ -1347,7 +1332,7 @@ HARBOUR HB___MVCLEAR( void )
|
||||
* $FUNCNAME$
|
||||
* __MVDBGINFO()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function returns the information about the variables for debugger
|
||||
* $SYNTAX$
|
||||
@@ -1514,7 +1499,7 @@ HARBOUR HB___MVDBGINFO( void )
|
||||
* $FUNCNAME$
|
||||
* __MVGET()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function returns value of memory variable
|
||||
* $SYNTAX$
|
||||
@@ -1535,7 +1520,7 @@ HARBOUR HB___MVDBGINFO( void )
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* MVPUT()
|
||||
* __MVPUT()
|
||||
* $END$
|
||||
*/
|
||||
HARBOUR HB___MVGET( void )
|
||||
@@ -1607,7 +1592,7 @@ HARBOUR HB___MVGET( void )
|
||||
* $FUNCNAME$
|
||||
* __MVPUT()
|
||||
* $CATEGORY$
|
||||
* Variable management
|
||||
* Variable Management
|
||||
* $ONELINER$
|
||||
* This function set the value of memory variable
|
||||
* $SYNTAX$
|
||||
@@ -1632,7 +1617,7 @@ HARBOUR HB___MVGET( void )
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $SEEALSO$
|
||||
* MVPUT()
|
||||
* __MVPUT()
|
||||
* $END$
|
||||
*/
|
||||
HARBOUR HB___MVPUT( void )
|
||||
|
||||
@@ -39,7 +39,7 @@ static s_nPointer := 1
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __AtPrompt() (@...PROMPT command)
|
||||
* __AtPrompt()
|
||||
* $CATEGORY$
|
||||
* Data input and output
|
||||
* $ONELINER$
|
||||
@@ -47,9 +47,6 @@ static s_nPointer := 1
|
||||
* $SYNTAX$
|
||||
* __AtPrompt( <nRow>, <nCol>, <cPrompt>, [<xMsg>] ) --> .F.
|
||||
*
|
||||
* or
|
||||
*
|
||||
* @ <nRow>, <nCol> PROMPT <cPrompt> [MESSAGE <xMsg>]
|
||||
* $ARGUMENTS$
|
||||
* <nRow> is the row number to display the menu <cPrompt>. Value could
|
||||
* range from zero to MAXROW().
|
||||
@@ -100,7 +97,69 @@ static s_nPointer := 1
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* ACHOICE(), MENU TO, SET MESSAGE, SET INTENSITY, SET WRAP, __MenuTo()
|
||||
* array.ngo:ACHOICE() comm.ngo:'MENU TO' 'SET MESSAGE' 'SET INTENSITY' 'SET WRAP' __MENUTO()
|
||||
* $END$
|
||||
*/
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* @...PROMPT
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Display a menu item on screen and define a message
|
||||
* $SYNTAX$
|
||||
* @ <nRow>, <nCol> PROMPT <cPrompt> [MESSAGE <xMsg>]
|
||||
* $ARGUMENTS$
|
||||
* <nRow> is the row number to display the menu <cPrompt>. Value could
|
||||
* range from zero to MAXROW().
|
||||
*
|
||||
* <nCol> is the column number to display the menu <cPrompt>. Value
|
||||
* could range from zero to MAXCOL().
|
||||
*
|
||||
* <cPrompt> is the menu item character string to display.
|
||||
*
|
||||
* <xMsg> define a message to display each time this menu item is
|
||||
* highlighted. <xMsg> could be a character string or code block that
|
||||
* is evaluated to a character string. If <xMsg> is not specified or
|
||||
* got the wrong type, an empty string ("") would be used.
|
||||
* $RETURNS$
|
||||
* @...Prompt always return .F.
|
||||
* $DESCRIPTION$
|
||||
* With @...Prompt you define and display a menu item, each call to
|
||||
* @...Prompt add another item to the menu, to start the menu itself
|
||||
* you should call the __MenuTo() function (MENU TO command). You can
|
||||
* define any row and column combination and they will be displayed at
|
||||
* the order of definition. After each call to @...Prompt, the cursor
|
||||
* is placed one column to the right of the last text displayed, and
|
||||
* ROW() and COL() are updated.
|
||||
*
|
||||
* @...PROMPT command is preprocessed into __AtPrompt() function during
|
||||
* compile time.
|
||||
* $EXAMPLES$
|
||||
* // display a two line menu with status line at the bottom
|
||||
* // let the user select favorite day
|
||||
* SET MESSAGE TO 24 CENTER
|
||||
* @ 10, 2 PROMPT "Sunday" MESSAGE "This is the 1st item"
|
||||
* @ 11, 2 PROMPT "Monday" MESSAGE "Now we're on the 2nd item"
|
||||
* MENU TO nChoice
|
||||
* DO CASE
|
||||
* CASE nChoice == 0 // user press Esc key
|
||||
* QUIT
|
||||
* CASE nChoice == 1 // user select 1st menu item
|
||||
* ? "Guess you don't like Mondays"
|
||||
* CASE nChoice == 2 // user select 2nd menu item
|
||||
* ? "Just another day for some"
|
||||
* ENDCASE
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* CA-Clipper array is limited to 4096 items, and therefor 4096 menu
|
||||
* items are the maximum that could be defined per one menu, Harbour
|
||||
* does not have this limit (not that you'll ever need that).
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* array.ngo:ACHOICE() comm.ngo:'MENU TO' 'SET MESSAGE' 'SET INTENSITY' 'SET WRAP' datai.ngo:__MENUTO()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -132,10 +191,6 @@ function __AtPrompt( nRow, nCol, cPrompt, cMsg )
|
||||
* Invoked a menu defined by set of @...PROMPT
|
||||
* $SYNTAX$
|
||||
* __MenuTo( <bBlock>, <cVariable> ) --> nChoice
|
||||
*
|
||||
* or
|
||||
*
|
||||
* MENU TO <cVariable>
|
||||
* $ARGUMENTS$
|
||||
* <bBlock> is a set/get code block for variable named <cVariable>.
|
||||
*
|
||||
@@ -208,8 +263,89 @@ function __AtPrompt( nRow, nCol, cPrompt, cMsg )
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* @...PROMPT, ACHOICE(), SET MESSAGE, SET INTENSITY, SET WRAP,
|
||||
* __AtPrompt()
|
||||
* comm.ngo:'@...PROMPT' array.ngo:ACHOICE() 'SET MESSAGE' 'SET INTENSITY' 'SET WRAP' __ATPROMPT()
|
||||
* $END$
|
||||
*/
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* MENU TO
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Invoked a menu defined by set of @...PROMPT
|
||||
* $SYNTAX$
|
||||
* MENU TO <cVariable>
|
||||
* $ARGUMENTS$
|
||||
* <cVariable> is a character string that contain the name of the
|
||||
* variable to hold the menu choices, if this variable does not exist
|
||||
* a PRIVATE variable with the name <cVariable> would be created to
|
||||
* hold the result.
|
||||
* $RETURNS$
|
||||
* Menu To return the number of select menu item, or 0 if there was
|
||||
* no item to select from or if the user pressed the Esc key.
|
||||
* $DESCRIPTION$
|
||||
* Menu To() invoked the menu define by previous __AtPrompt() call
|
||||
* and display a highlight bar that the user can move to select an
|
||||
* option from the menu. If <cVariable> does not exist or not visible,
|
||||
* a PRIVATE variable named <cVariable> is created and hold the current
|
||||
* menu selection. If there is a variable named <cVariable>, its value
|
||||
* is used to select the first highlighted item.
|
||||
*
|
||||
* Menu prompts and messages are displayed in current Standard color,
|
||||
* highlighted bar is displayed using current Enhanced color.
|
||||
*
|
||||
* Pressing the arrow keys move the highlighted bar. When a menu item
|
||||
* is highlighted the message associated with it is displayed on the
|
||||
* line specified with SET MESSAGE. If SET WRAP is ON and the user
|
||||
* press UP arrow while on the first selection the last menu item is
|
||||
* highlighted, if the user press Down arrow while on the last item,
|
||||
* the first item is highlighted.
|
||||
*
|
||||
* Following are active keys that handled by Menu To:
|
||||
* -----------------------------------------------------
|
||||
*
|
||||
* Up - Move to previous item
|
||||
* Down - Move to next item
|
||||
* Left - Move to previous item
|
||||
* Right - Move to next item
|
||||
* Home - Move to the first item
|
||||
* End - Move to the last item
|
||||
* Page-Up - Select menu item, return position
|
||||
* Page-Down - Select menu item, return position
|
||||
* Enter - Select menu item, return position
|
||||
* Esc - Abort selection, return 0
|
||||
* First letter - Select next menu with the same first letter,
|
||||
* return this item position.
|
||||
*
|
||||
* upon exit the cursor is placed at MAXROW()-1, 0
|
||||
* Menu To can be nested without loosing the previous prompts.
|
||||
*
|
||||
* MENU TO command is preprocessed into __MenuTo() function during
|
||||
* compile time.
|
||||
* $EXAMPLES$
|
||||
* // display menu item on each screen corner and let user select one
|
||||
* CLS
|
||||
* SET MESSAGE TO MAXROW()/2 CENTER
|
||||
* SET WRAP ON
|
||||
* @ 0, 0 PROMPT "1. Upper left" MESSAGE " One "
|
||||
* @ 0, MAXCOL()-16 PROMPT "2. Upper right" MESSAGE " Two "
|
||||
* @ MAXROW()-1,MAXCOL()-16 PROMPT "3. Bottom right" MESSAGE "Three"
|
||||
* @ MAXROW()-1,0 PROMPT "4. Bottom left" MESSAGE "Four "
|
||||
* MENU TO nChoice
|
||||
* SETPOS ( MAXROW()/2, MAXCOL()/2 - 10 )
|
||||
* if nChoice == 0
|
||||
* ?? "Esc was pressed"
|
||||
* else
|
||||
* ?? "Selected option is", nChoice
|
||||
* endif
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
*
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* comm.ngo:'@...PROMPT' array.ngo:ACHOICE() 'SET MESSAGE' 'SET INTENSITY' 'SET WRAP' datai.ngo:__ATPROMPT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* MEMOTRAN
|
||||
* MEMOTRAN()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Strings
|
||||
* $ONELINER$
|
||||
* Converts hard and soft carriages within strings.
|
||||
* $SYNTAX$
|
||||
@@ -64,7 +64,7 @@
|
||||
* $COMPLIANCE$
|
||||
* MEMOTRAN() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* HARDCR(), STRTRAN()
|
||||
* HARDCR() STRTRAN()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -94,9 +94,9 @@ char * hb_nationGetMsg( USHORT uiMsg )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ISAFFIRM
|
||||
* ISAFFIRM()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* NATION
|
||||
* $ONELINER$
|
||||
* Checks if passed char is an affirmation char
|
||||
* $SYNTAX$
|
||||
@@ -118,7 +118,7 @@ char * hb_nationGetMsg( USHORT uiMsg )
|
||||
* $COMPLIANCE$
|
||||
* ISAFFIRM() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* ISNEGATIVE, NATIONMSG
|
||||
* ISNEGATIVE() NATIONMSG()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -131,9 +131,9 @@ HARBOUR HB_ISAFFIRM( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* ISNEGATIVE
|
||||
* ISNEGATIVE()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* NATION
|
||||
* $ONELINER$
|
||||
* Checks if passed char is a negation char
|
||||
* $SYNTAX$
|
||||
@@ -155,7 +155,7 @@ HARBOUR HB_ISAFFIRM( void )
|
||||
* $COMPLIANCE$
|
||||
* ISNEGATIVE() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* ISAFFIRM, NATIONMSG
|
||||
* ISAFFIRM() NATIONMSG()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -168,9 +168,9 @@ HARBOUR HB_ISNEGATIVE( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* NATIONMSG
|
||||
* NATIONMSG()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* NATION
|
||||
* $ONELINER$
|
||||
* Returns international strings messages.
|
||||
* $SYNTAX$
|
||||
@@ -194,7 +194,7 @@ HARBOUR HB_ISNEGATIVE( void )
|
||||
* $COMPLIANCE$
|
||||
* NATIONMSG() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* ISAFFIRM, ISNEGATIVE
|
||||
* ISAFFIRM() ISNEGATIVE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objGetMethodList(), __objGetMsgList(), __objHasMethod()
|
||||
* __ObjGetMethodLis __objGetMsgList() __objHasMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -127,7 +127,7 @@ return __objHasMsg( oObject, cSymbol ) .and. ;
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objGetMethodList(), __objGetMsgList(), __objHasData()
|
||||
* __ObjGetMethodLis __objGetMsgList() __objHasData()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -184,8 +184,7 @@ return __objHasMsg( oObject, cSymbol ) .and. ;
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objGetMethodList(), __objGetValueList(), __objHasData(),
|
||||
* __objHasMethod()
|
||||
* __ObjGetMethodLis __ObjGetValueList __objHasData() __objHasMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -261,8 +260,7 @@ return aData
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objGetMsgList(), __objGetValueList(), __objHasData(),
|
||||
* __objHasMethod()
|
||||
* __objGetMsgList() __ObjGetValueList __objHasData() __objHasMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -314,8 +312,7 @@ return __objGetMsgList( oObject, .F. )
|
||||
* $FILES$
|
||||
* Header file is hboo.ch
|
||||
* $SEEALSO$
|
||||
* __objGetMethodList(), __objGetMsgList(), __objHasData(),
|
||||
* __objHasMethod(), __objSetValueList()
|
||||
* __ObjGetMethodLis __objGetMsgList() __objHasData() __objHasMethod() __ObjSetValueList
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -350,22 +347,22 @@ return aData
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __objSetValueList()
|
||||
* __ObjSetValueList()
|
||||
* $CATEGORY$
|
||||
* Object manipulation
|
||||
* $ONELINER$
|
||||
* Set object with an array of DATA names and values
|
||||
* $SYNTAX$
|
||||
* __objSetValueList( <oObject>, <aData> ) --> oObject
|
||||
* __ObjSetValueList( <oObject>, <aData> ) --> oObject
|
||||
* $ARGUMENTS$
|
||||
* <oObject> is an object to set.
|
||||
*
|
||||
* <aData> is a 2D array with a pair of instance variables and values
|
||||
* for setting those variable.
|
||||
* $RETURNS$
|
||||
* __objSetValueList() return a reference to <oObject>.
|
||||
* __ObjSetValueList() return a reference to <oObject>.
|
||||
* $DESCRIPTION$
|
||||
* __objSetValueList() is a low level class support function that let
|
||||
* __ObjSetValueList() is a low level class support function that let
|
||||
* you set a group of instance variables with values. each array
|
||||
* element in <aData> is a pair of:
|
||||
* aData[ i, HB_OO_DATA_SYMBOL ] which contain the variable name to set
|
||||
@@ -382,7 +379,7 @@ return aData
|
||||
* aData[ 3, HB_OO_DATA_VALUE ] = 20
|
||||
* aData[ 4, HB_OO_DATA_SYMBOL ] = "nRight"
|
||||
* aData[ 4, HB_OO_DATA_VALUE ] = 70
|
||||
* __objSetValueList( oB, aData )
|
||||
* __ObjSetValueList( oB, aData )
|
||||
* ? oB:nTop // 1
|
||||
* ? oB:nLeft // 10
|
||||
* ? oB:nBottom // 20
|
||||
@@ -390,16 +387,16 @@ return aData
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* __objSetValueList() is an Harbour extension.
|
||||
* __ObjSetValueList() is an Harbour extension.
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* Header file is hboo.ch
|
||||
* $SEEALSO$
|
||||
* __objGetValueList()
|
||||
* __ObjGetValueList
|
||||
* $END$
|
||||
*/
|
||||
|
||||
function __objSetValueList( oObject, aData )
|
||||
function __ObjSetValueList( oObject, aData )
|
||||
|
||||
if !ISOBJECT( oObject )
|
||||
__errRT_BASE(EG_ARG, 3101, NIL, ProcName( 0 ) )
|
||||
@@ -460,9 +457,7 @@ return oObject
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddInline(), __objAddData(), __objDelMethod(),
|
||||
* __objGetMethodList(), __objGetMsgList(), __objHasMethod(),
|
||||
* __objModMethod()
|
||||
* __objAddInline() __objAddData() __objDelMethod() __ObjGetMethodLis __objGetMsgList() __objHasMethod() __objModMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -519,9 +514,7 @@ return oObject
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddData(), __objAddMethod(), __objDelInline(),
|
||||
* __objGetMethodList(), __objGetMsgList(), __objHasMethod(),
|
||||
* __objModInline()
|
||||
* __objAddData() __objAddMethod() __objDelInline() __ObjGetMethodLis __objGetMsgList() __objHasMethod() __objModInline()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -576,9 +569,7 @@ return oObject
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddInline(), __objAddMethod(), __objDelData(),
|
||||
* __objGetMsgList(), __objGetValueList(), __objHasData(),
|
||||
* __objSetValueList()
|
||||
* __objAddInline() __objAddMethod() __objDelData() __objGetMsgList() __ObjGetValueList __objHasData() __ObjSetValueList
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -667,8 +658,7 @@ return oObject
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddMethod(), __objDelMethod(), __objGetMethodList(),
|
||||
* __objGetMsgList(), __objHasMethod()
|
||||
* __objAddMethod() __objDelMethod() __ObjGetMethodLis __objGetMsgList() __objHasMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -694,7 +684,8 @@ return oObject
|
||||
* $CATEGORY$
|
||||
* Object manipulation
|
||||
* $ONELINER$
|
||||
* Modify (replace) an INLINE method in an already existing class
|
||||
* Modify (replace) an INLINE method in an already
|
||||
* existing class
|
||||
* $SYNTAX$
|
||||
* __objModInline( <oObject>, <cInlineName>, <bInline> ) --> oObject
|
||||
* $ARGUMENTS$
|
||||
@@ -730,8 +721,7 @@ return oObject
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddInline(), __objDelInline(), __objGetMethodList(),
|
||||
* __objGetMsgList(), __objHasMethod()
|
||||
* __objAddInline() __objDelInline() __ObjGetMethodLis __objGetMsgList() __objHasMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -803,9 +793,7 @@ return oObject
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddInline(), __objAddMethod(), __objGetMethodList(),
|
||||
* __objGetMsgList(), __objHasMethod(), __objModInline(),
|
||||
* __objModMethod()
|
||||
* __objAddInline() __objAddMethod() __ObjGetMethodLis __objGetMsgList() __objHasMethod() __objModInline() __objModMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -823,6 +811,61 @@ function __objDelMethod( oObject, cSymbol )
|
||||
endif
|
||||
|
||||
return oObject
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __objDelInline()
|
||||
* $CATEGORY$
|
||||
* Object manipulation
|
||||
* $ONELINER$
|
||||
* Delete a METHOD or INLINE method from class
|
||||
* $SYNTAX$
|
||||
* __objDelMethod( <oObject>, <cSymbol> ) --> oObject
|
||||
*
|
||||
* or
|
||||
*
|
||||
* __objDelInline( <oObject>, <cSymbol> ) --> oObject
|
||||
* $ARGUMENTS$
|
||||
* <oObject> is the object to work on.
|
||||
*
|
||||
* <cSymbol> is the symbol name of METHOD or INLINE method to be
|
||||
* deleted (removed) from the object.
|
||||
* $RETURNS$
|
||||
* __objDelMethod() return a reference to <oObject>.
|
||||
* $DESCRIPTION$
|
||||
* __objDelMethod() is a low level class support function that delete
|
||||
* (remove) a METHOD or an INLINE method from an object. If a symbol
|
||||
* with the name <cSymbol> does not exist in <oObject> a run time error
|
||||
* will occur.
|
||||
*
|
||||
* __objDelInline() is exactly the same as __objDelMethod().
|
||||
* $EXAMPLES$
|
||||
* // create a new THappy class and add a Smile method
|
||||
* oHappy := TClass():New( "THappy" )
|
||||
* __objAddMethod( oHappy, "Smile", @MySmile() )
|
||||
* ? __objHasMethod( oHappy, "Smile" ) // .T.
|
||||
* // remove Smile method
|
||||
* __objDelMethod( oHappy, "Smile" )
|
||||
* ? __objHasMethod( oHappy, "Smile" ) // .F.
|
||||
*
|
||||
* STATIC FUNCTION MySmile( nType )
|
||||
* LOCAL cSmile
|
||||
* DO CASE
|
||||
* CASE nType == 1
|
||||
* cSmile := ":)"
|
||||
* CASE nType == 2
|
||||
* cSmile := ";)"
|
||||
* ENDCASE
|
||||
* RETURN cSmile
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* __objDelMethod() is an Harbour extension.
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddInline() __objAddMethod() __ObjGetMethodLis __objGetMsgList() __objHasMethod() __objModInline() __objModMethod()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
function __objDelInline( oObject, cSymbol )
|
||||
return __objDelMethod( oObject, cSymbol ) // Same story
|
||||
@@ -862,8 +905,8 @@ return __objDelMethod( oObject, cSymbol ) // Same story
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* __objAddData(), __objGetMsgList(), __objGetValueList(),
|
||||
* __objHasData(), __objSetValueList()
|
||||
* __objAddData() __objGetMsgList() __ObjGetValueList
|
||||
* __objHasData() __ObjSetValueList
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* PCOUNT
|
||||
* PCOUNT()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Parameter Checks
|
||||
* $ONELINER$
|
||||
* Retrieves the number of arguments passed to a function.
|
||||
* $SYNTAX$
|
||||
@@ -67,7 +67,7 @@
|
||||
* $COMPLIANCE$
|
||||
* PCOUNT() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* PVALUE
|
||||
* HB_PVALUE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* PROCNAME
|
||||
* PROCNAME()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Misc
|
||||
* $ONELINER$
|
||||
* Gets the name of the current function on the stack
|
||||
* $SYNTAX$
|
||||
@@ -79,7 +79,7 @@
|
||||
* $COMPLIANCE$
|
||||
* PROCNAME() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* PROCLINE, PROCFILE
|
||||
* PROCLINE() PROCFILE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -114,9 +114,9 @@ HARBOUR HB_PROCNAME( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* PROCLINE
|
||||
* PROCLINE()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Misc
|
||||
* $ONELINER$
|
||||
* Gets the line number of the current function on the stack
|
||||
* $SYNTAX$
|
||||
@@ -142,7 +142,7 @@ HARBOUR HB_PROCNAME( void )
|
||||
* $COMPLIANCE$
|
||||
* PROCLINE() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* PROCNAME, PROCFILE
|
||||
* PROCNAME() PROCFILE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -162,9 +162,9 @@ HARBOUR HB_PROCLINE( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* PROCFILE
|
||||
* PROCFILE()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Misc
|
||||
* $ONELINER$
|
||||
* This function allways returns an empty string.
|
||||
* $SYNTAX$
|
||||
@@ -189,7 +189,7 @@ HARBOUR HB_PROCLINE( void )
|
||||
* $COMPLIANCE$
|
||||
* PROCFILE() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* PROCNAME, PROCLINE
|
||||
* PROCNAME() PROCLINE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_PVALUE
|
||||
* HB_PVALUE()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Parameter Checks
|
||||
* $ONELINER$
|
||||
* Retrieves the value of an argument.
|
||||
* $SYNTAX$
|
||||
@@ -66,7 +66,7 @@
|
||||
* $COMPLIANCE$
|
||||
* HB_PVALUE() is a new function and hence not CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* PCOUNT
|
||||
* PCOUNT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* @...GET, INKEY(), LASTKEY(), READ, READEXIT(), UPDATED()
|
||||
* '@...GET' consimpu.ngo:INKEY() consimpu.ngo:LASTKEY() 'READ' READEXIT() UPDATED()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -33,66 +33,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following parts are Copyright of the individual authors.
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* Copyright 1999 Chen Kedem <niki@actcom.co.il>
|
||||
* READVAR() documentation
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* READVAR()
|
||||
* $CATEGORY$
|
||||
* Data input and output
|
||||
* $ONELINER$
|
||||
* Return variable name of current GET or MENU
|
||||
* $SYNTAX$
|
||||
* READVAR( [<cVarName>] ) --> cOldVarName
|
||||
* $ARGUMENTS$
|
||||
* <cVarName> is a new variable name to set.
|
||||
* $RETURNS$
|
||||
* READVAR() return the old variable name. If no variable previously
|
||||
* was set, READVAR() return "".
|
||||
* $DESCRIPTION$
|
||||
* READVAR() is set inside a READ or MENU TO command to hold the
|
||||
* uppercase name of the GET / MENU TO variable, and re-set back to old
|
||||
* value when those commands finished. You should not normally set a
|
||||
* variable name but rather use it to retrieve the name of a GET
|
||||
* variable when executing a VALID or WHEN clause, or during SET KEY
|
||||
* execution and you are inside a READ or MENU TO.
|
||||
* $EXAMPLES$
|
||||
* // display a menu, press F1 to view the MENU TO variable name
|
||||
* CLS
|
||||
* @ 1, 10 PROMPT "blood sucking insect that infect beds "
|
||||
* @ 2, 10 PROMPT "germ; virus infection "
|
||||
* @ 3, 10 PROMPT "defect; snag; (source of) malfunctioning"
|
||||
* @ 4, 10 PROMPT "small hidden microphone "
|
||||
* @ 6, 10 SAY "(Press F1 for a hint)"
|
||||
* SET KEY 28 TO ShowVar
|
||||
* MENU TO What_Is_Bug
|
||||
*
|
||||
* PROCEDURE ShowVar
|
||||
* ALERT( READVAR() ) // WHAT_IS_BUG in red ALERT() box
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* READVAR() works exactly like CA-Clipper's READKEY(), note however,
|
||||
* that the <cVarName> parameter is not documented and used internally
|
||||
* by CA-Clipper.
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* @...GET, @..PROMPT, MENU TO, READ, SET KEY, __AtPrompt(), __MenuTo()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
FUNCTION ReadVar( cVarName )
|
||||
STATIC s_cVarName := ""
|
||||
|
||||
|
||||
@@ -391,11 +391,22 @@ HARBOUR HB_SETCANCEL( void )
|
||||
}
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$ __SETCENTURY( [<lFlag> | <cOnOff> ] ) --> lPreviousValue
|
||||
* $ARGUMENTS$ optional <lFlag> or <cOnOff> (not case sensitive)
|
||||
* $FUNCNAME$
|
||||
* __SETCENTURY()
|
||||
*
|
||||
* $CATEGORY$
|
||||
* Enviroment
|
||||
* $ONELINER$
|
||||
* Set the Current Century
|
||||
|
||||
* $SYNTAX$
|
||||
* __SETCENTURY([<lFlag> | <cOnOff> ] ) --> lPreviousValue
|
||||
* $ARGUMENTS$
|
||||
* optional <lFlag> or <cOnOff> (not case sensitive)
|
||||
* .T. or "ON" to enable the century setting (4-digit years)
|
||||
* .F. or "OFF" to disable the century setting (2-digit years)
|
||||
* $RETURNS$ Either the current or previous century setting as a logical value
|
||||
* $RETURNS$
|
||||
Either the current or previous century setting as a logical value
|
||||
* $END$
|
||||
*/
|
||||
HARBOUR HB___SETCENTURY( void )
|
||||
@@ -481,8 +492,17 @@ HARBOUR HB___SETCENTURY( void )
|
||||
}
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$ SET( <nSet> [, <xNewSetting> [, <xOption> ] ] ) --> xPreviousSetting
|
||||
* $ARGUMENTS$ <nSet> <xNewSetting> <xOption>
|
||||
* $FUNCNAME$
|
||||
* SET()
|
||||
* $CATEGORY$
|
||||
* Enviroment
|
||||
* $ONELINER$
|
||||
* Changes or evaluated enviromental settings
|
||||
|
||||
* $SYNTAX$
|
||||
* Set<nSet> [, <xNewSetting> [, <xOption> ] ] ) --> xPreviousSetting
|
||||
* $ARGUMENTS$
|
||||
* <nSet> <xNewSetting> <xOption>
|
||||
* _SET_ALTERNATE <lFlag> | <cOnOff>
|
||||
* If enabled, QOUT() and QQOUT() write to the screen and to
|
||||
* a file, provided that a file has been opened or created
|
||||
|
||||
@@ -33,76 +33,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following parts are Copyright of the individual authors.
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* Copyright 1999 Chen Kedem <niki@actcom.co.il>
|
||||
* __SetFunction() documentation
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "inkey.ch"
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __SetFunction() (SET FUNCTION command)
|
||||
* $CATEGORY$
|
||||
* Environment
|
||||
* $ONELINER$
|
||||
* Assign a character string to a function key
|
||||
* $SYNTAX$
|
||||
* __SetFunction( <nFunctionKey>, [<cString>] ) --> NIL
|
||||
*
|
||||
* or
|
||||
*
|
||||
* SET FUNCTION <nFunctionKey> TO [<cString>]
|
||||
* $ARGUMENTS$
|
||||
* <nFunctionKey> is a number in the range 1..40 that represent the
|
||||
* function key to be assigned.
|
||||
*
|
||||
* <cString> is a character string to set. If <cString> is not
|
||||
* specified, the function key is going to be set to NIL releasing by
|
||||
* that any previous __SetFunction() or SETKEY() for that function.
|
||||
* $RETURNS$
|
||||
* __SetFunction() always return NIL.
|
||||
* $DESCRIPTION$
|
||||
* __SetFunction() assign a character string with a function key, when
|
||||
* this function key is pressed, the keyboard is stuffed with this
|
||||
* character string. __SetFunction() has the effect of clearing any
|
||||
* SETKEY() previously set to the same function number and vice versa.
|
||||
*
|
||||
* nFunctionKey Key to be set
|
||||
* ------------ -------------
|
||||
* 1 .. 12 F1 .. F12
|
||||
* 13 .. 20 Shift-F3 .. Shift-F10
|
||||
* 21 .. 30 Ctrl-F1 .. Ctrl-F10
|
||||
* 31 .. 40 Alt-F1 .. Alt-F10
|
||||
*
|
||||
* SET FUNCTION command is preprocessed into __SetFunction() function
|
||||
* during compile time.
|
||||
* $EXAMPLES$
|
||||
* // Set F1 with a string
|
||||
* CLS
|
||||
* __SetFunction( 1, "I Am Lazy" + CHR( 13 ) )
|
||||
* cTest := SPACE( 20 )
|
||||
* @ 10, 0 SAY "type something or F1 for lazy mode " GET cTest
|
||||
* READ
|
||||
* ? cTest
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* Harbour use 11 and 12 to represent F11 and F12, while CA-Clipper use
|
||||
* 11 and 12 to represent Shift-F1 and Shift-F2.
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* INKEY(), SETKEY(), __Keyboard()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
PROCEDURE __SetFunction( nFunctionKey, cString )
|
||||
|
||||
/* NOTE: CA-Cl*pper will not handle F11 and F12 here. */
|
||||
|
||||
@@ -54,9 +54,9 @@ static s_aSetKeys := {} // holds array of hot-key id, code-block, activati
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* SetKey
|
||||
* SETKEY()
|
||||
* $CATEGORY$
|
||||
* ?
|
||||
* Events
|
||||
* $ONELINER$
|
||||
* Assign an action block to a key
|
||||
* $SYNTAX$
|
||||
@@ -84,7 +84,8 @@ static s_aSetKeys := {} // holds array of hot-key id, code-block, activati
|
||||
*
|
||||
* // make F10 exit current get, but only if in a get - ignores other
|
||||
* // wait-states such as menus, achoices, etc...
|
||||
* SetKey( K_F10, {|| GetActive():State := GE_WRITE }, {|| GetActive() != NIL } )
|
||||
* SetKey( K_F10, {|| GetActive():State := GE_WRITE },;
|
||||
* {|| GetActive() != NIL } )
|
||||
* $TESTS$
|
||||
* None definable
|
||||
* $STATUS$
|
||||
@@ -95,7 +96,7 @@ static s_aSetKeys := {} // holds array of hot-key id, code-block, activati
|
||||
* be conditionally turned off or on. This condition-block cannot be
|
||||
* returned once set - see SetKeyGet()
|
||||
* $SEEALSO$
|
||||
* SETKEYSAVE()
|
||||
* HB_SETKEYSAVE()
|
||||
* $END$
|
||||
*/
|
||||
Function SetKey( anKey, bBlock, bCondition )
|
||||
@@ -137,9 +138,9 @@ return bReturn
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_SetKeyGet
|
||||
* HB_SetKeyGet()
|
||||
* $CATEGORY$
|
||||
* ?
|
||||
* Events
|
||||
* $ONELINER$
|
||||
* Determine a set-key code block & condition-block
|
||||
* $SYNTAX$
|
||||
@@ -165,7 +166,7 @@ return bReturn
|
||||
* $COMPLIANCE$
|
||||
* HB_SETKEYGET() is a new function and hence not CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* SETKEY(), HB_SETKEYSAVE(), HB_SETKEYCHECK()
|
||||
* SETKEY() HB_SETKEYSAVE() HB_SETKEYCHECK()
|
||||
* $END$
|
||||
*/
|
||||
Function HB_SetKeyGet( nKey, bCondition )
|
||||
@@ -188,11 +189,12 @@ return NIL //bReturn
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_SetKeySave
|
||||
* HB_SETKEYSAVE()
|
||||
* $CATEGORY$
|
||||
* ?
|
||||
* Events
|
||||
* $ONELINER$
|
||||
* Returns a copy of internal set-key list, optionally overwriting
|
||||
* Returns a copy of internal set-key list,
|
||||
* optionally overwriting
|
||||
* $SYNTAX$
|
||||
* HB_SETKEYSAVE( [ <OldKeys> ] )
|
||||
* $ARGUMENTS$
|
||||
@@ -240,9 +242,9 @@ return aReturn
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_SetKeyCheck
|
||||
* HB_SetKeyCheck()
|
||||
* $CATEGORY$
|
||||
* ?
|
||||
* Events
|
||||
* $ONELINER$
|
||||
* Impliments common hot-key activation code
|
||||
* $SYNTAX$
|
||||
@@ -255,11 +257,11 @@ return aReturn
|
||||
* True if there is a hot-key associated with <nKey> and it was executed;
|
||||
* otherwise False
|
||||
* If there is a hot-key association (before checking any condition):
|
||||
* - if there is a condition-block, it is passed one parameter - <nKey>
|
||||
* - when the hot-key code-block is called, it is passed 1 to 4 parameters,
|
||||
* depending on the parameters passed to HB_SetKeyCheck(). Any
|
||||
* parameters so passed are directly passed to the code-block, with an
|
||||
* additional parameter being <nKey>
|
||||
* - if there is a condition-block, it is passed one parameter - <nKey>
|
||||
* - when the hot-key code-block is called, it is passed 1 to 4 parameters,
|
||||
* depending on the parameters passed to HB_SetKeyCheck(). Any
|
||||
* parameters so passed are directly passed to the code-block, with an
|
||||
* additional parameter being <nKey>
|
||||
* $DESCRIPTION$
|
||||
* HB_SetKeyCheck() is intended as a common interface to the SetKey()
|
||||
* functionality for such functions as ACHOICE(), DBEDIT(), MEMOEDIT(),
|
||||
@@ -281,7 +283,7 @@ return aReturn
|
||||
* $COMPLIANCE$
|
||||
* HB_SETKEYCHECK() is new.
|
||||
* $SEEALSO$
|
||||
* SETKEY(), HB_SETKEYSAVE()
|
||||
* SETKEY() HB_SETKEYSAVE()
|
||||
* $END$
|
||||
*/
|
||||
Function HB_SetKeyCheck( nKey, p1, p2, p3 )
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* SETTYPEAHEAD
|
||||
* SETTYPEAHEAD()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Enviroment
|
||||
* $ONELINER$
|
||||
* Sets the typeahead buffer to given size.
|
||||
* $SYNTAX$
|
||||
@@ -59,7 +59,7 @@
|
||||
* $COMPLIANCE$
|
||||
* SETTYPEAHEAD() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* __ACCEPT, __INPUT
|
||||
* __ACCEPT() datai.ngo:__INPUT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -1197,7 +1197,7 @@ HARBOUR HB_VAL( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* STR
|
||||
* STR()
|
||||
* $CATEGORY$
|
||||
* Run-time Library, Strings
|
||||
* $ONELINER$
|
||||
@@ -1258,8 +1258,7 @@ HARBOUR HB_VAL( void )
|
||||
* $COMPLIANCE$
|
||||
* CA-Clipper compatible.
|
||||
* $SEEALSO$
|
||||
* STRZERO()
|
||||
* VAL()
|
||||
* STRZERO() VAL()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -1317,7 +1316,7 @@ HARBOUR HB_STR( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* STRZERO
|
||||
* STRZERO()
|
||||
* $CATEGORY$
|
||||
* Run-time Library, Strings
|
||||
* $ONELINER$
|
||||
@@ -1378,8 +1377,7 @@ HARBOUR HB_STR( void )
|
||||
* $COMPLIANCE$
|
||||
* CA-Clipper compatible (it was not mentioned in the docs though).
|
||||
* $SEEALSO$
|
||||
* STR()
|
||||
* VAL()
|
||||
* runtime.ngo:STR() VAL()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -1470,7 +1468,7 @@ HARBOUR HB_STRZERO( void )
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_VALTOSTR
|
||||
* HB_VALTOSTR()
|
||||
* $CATEGORY$
|
||||
* Strings
|
||||
* $ONELINER$
|
||||
@@ -1499,7 +1497,7 @@ HARBOUR HB_STRZERO( void )
|
||||
* $COMPLIANCE$
|
||||
* HB_VALTOSTR() is a Harbour enhancement.
|
||||
* $SEEALSO$
|
||||
* STR(), VAL()
|
||||
* runtime.ngo:STR() VAL()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ STATIC s_cOldExtraFile
|
||||
* $CATEGORY$
|
||||
* Internal
|
||||
* $ONELINER$
|
||||
* Redirect console output to printer or a file and save old settings
|
||||
* Redirect console output to printer or a file and
|
||||
* save old settings
|
||||
* $SYNTAX$
|
||||
* __TextSave( <cFile> ) --> NIL
|
||||
* $ARGUMENTS$
|
||||
@@ -79,7 +80,7 @@ STATIC s_cOldExtraFile
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* SET(), SET ALTERNATE, SET PRINTER, TEXT, __TextRestore()
|
||||
* envirom.ngi:SET() 'SET ALTERNATE' 'SET PRINTER' 'TEXT' __TextRestore()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -121,7 +122,7 @@ PROCEDURE __TextSave( cFile )
|
||||
* $PLATFORMS$
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* SET(), SET ALTERNATE, SET PRINTER, TEXT, __TextSave()
|
||||
* envirom.ngi:SET() 'SET ALTERNATE' 'SET PRINTER' 'TEXT' __TextSave()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
* $FUNCNAME$
|
||||
* TONE()
|
||||
* $CATEGORY$
|
||||
* Misc.
|
||||
* Misc
|
||||
* $ONELINER$
|
||||
* Sound a tone with a specifies frequency and duration
|
||||
* $SYNTAX$
|
||||
@@ -130,7 +130,7 @@
|
||||
* $COMPLIANCE$
|
||||
* TONE() works exactly like CA-Clipper's TONE().
|
||||
* $SEEALSO$
|
||||
* CHR(), SET BELL
|
||||
* CHR() 'SET BELL'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* TYPE
|
||||
* TYPE()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Misc
|
||||
* $ONELINER$
|
||||
* Retrieves the type of an expression
|
||||
* $SYNTAX$
|
||||
@@ -59,7 +59,7 @@
|
||||
* $COMPLIANCE$
|
||||
* TYPE() is
|
||||
* $SEEALSO$
|
||||
* VALTYPE
|
||||
* VALTYPE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* VALTYPE
|
||||
* VALTYPE()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Misc
|
||||
* $ONELINER$
|
||||
* Retrieves the data type of an expression
|
||||
* $SYNTAX$
|
||||
@@ -69,7 +69,7 @@
|
||||
* $COMPLIANCE$
|
||||
* VALTYPE() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* TYPE
|
||||
* TYPE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __WAIT
|
||||
* __WAIT()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Events
|
||||
* $ONELINER$
|
||||
* Stops the application until a key is pressed.
|
||||
* $SYNTAX$
|
||||
@@ -61,7 +61,7 @@
|
||||
* $COMPLIANCE$
|
||||
* __WAIT() is fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* __ACCEPT, __INPUT
|
||||
* __ACCEPT() datai.ngo:__INPUT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* WORD
|
||||
* WORD()
|
||||
* $CATEGORY$
|
||||
*
|
||||
* Conversion
|
||||
* $ONELINER$
|
||||
* Converts double to integer values.
|
||||
* $SYNTAX$
|
||||
@@ -60,7 +60,7 @@
|
||||
* $COMPLIANCE$
|
||||
* WORD() is NOT fully CA-Clipper compliant.
|
||||
* $SEEALSO$
|
||||
* CALL command
|
||||
* 'CALL'
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -49,17 +49,13 @@ STATIC s_cScrn
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __XSaveScreen() (SAVE SCREEN command)
|
||||
* __XSaveScreen()
|
||||
* $CATEGORY$
|
||||
* Data input and output
|
||||
* $ONELINER$
|
||||
* Save whole screen image and coordinate to an internal buffer
|
||||
* $SYNTAX$
|
||||
* __XSaveScreen() --> NIL
|
||||
*
|
||||
* or
|
||||
*
|
||||
* SAVE SCREEN
|
||||
* $ARGUMENTS$
|
||||
* none.
|
||||
* $RETURNS$
|
||||
@@ -92,7 +88,49 @@ STATIC s_cScrn
|
||||
* platforms.
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* RESTORE SCREEN, RESTSCREEN(), SAVESCREEN()
|
||||
* comm.ngo:'RESTORE SCREEN' RESTSCREEN() SAVESCREEN()
|
||||
* $END$
|
||||
*/
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* SAVE SCREEN
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Save whole screen image and coordinate to an internal buffer
|
||||
* $SYNTAX$
|
||||
*
|
||||
* SAVE SCREEN
|
||||
* $ARGUMENTS$
|
||||
* none.
|
||||
* $RETURNS$
|
||||
* SAVE SCREEN always return NIL.
|
||||
* $DESCRIPTION$
|
||||
* SAVE SCREEN save the image of the whole screen into an internal
|
||||
* buffer, it also save current cursor position. The information could
|
||||
* later be restored by REST SCREEN. Each call to SAVE SCREEN
|
||||
* overwrite the internal buffer.
|
||||
*
|
||||
* SAVE SCREEN command is preprocessed into __XSaveScreen() function
|
||||
* during compile time. Note that SAVE SCREEN TO is preprocessed into
|
||||
* SAVESCREEN() function.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
* // save the screen, display list of files than restore the screen
|
||||
* SAVE SCREEN
|
||||
* DIR *.*
|
||||
* WAIT
|
||||
* RESTORE SCREEN
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* __XSaveScreen() works exactly like CA-Clipper's __XSaveScreen()
|
||||
* $PLATFORMS$
|
||||
* __XSaveScreen() is part of the GT API, and supported only by some
|
||||
* platforms.
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* comm.ngo:'RESTORE SCREEN' RESTSCREEN() SAVESCREEN()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -104,7 +142,7 @@ PROCEDURE __XSAVESCREEN()
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* __XRestScreen() (RESTORE SCREEN command)
|
||||
* __XRestScreen()
|
||||
* $CATEGORY$
|
||||
* Data input and output
|
||||
* $ONELINER$
|
||||
@@ -146,7 +184,48 @@ PROCEDURE __XSAVESCREEN()
|
||||
* platforms.
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* RESTSCREEN(), SAVE SCREEN, SAVESCREEN()
|
||||
* RESTSCREEN() comm.ngo:'SAVE SCREEN' SAVESCREEN()
|
||||
* $END$
|
||||
*/
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* REST SCREEN
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Restore screen image and coordinate from an internal buffer
|
||||
* $SYNTAX$
|
||||
* RESTORE SCREEN
|
||||
* $ARGUMENTS$
|
||||
* none.
|
||||
* $RETURNS$
|
||||
* REST SCREEN always return NIL.
|
||||
* $DESCRIPTION$
|
||||
* Rest Screen restore saved image of the whole screen from an
|
||||
* internal buffer that was saved by Save Screen, it also restore
|
||||
* cursor position. After a call to Rest Screen the internal buffer
|
||||
* is cleared.
|
||||
*
|
||||
* RESTORE SCREEN command is preprocessed into __XRestScreen() function
|
||||
* during compile time. Note that RESTORE SCREEN FROM is preprocessed
|
||||
* into RESTSCREEN() function.
|
||||
*
|
||||
* $EXAMPLES$
|
||||
* // save the screen, display list of files than restore the screen
|
||||
* SAVE SCREEN
|
||||
* DIR *.*
|
||||
* WAIT
|
||||
* RESTORE SCREEN
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* $COMPLIANCE$
|
||||
* Rest Screen() works exactly like CA-Clipper's Rest Screen
|
||||
* $PLATFORMS$
|
||||
* Rest Screen is part of the GT API, and supported only by some
|
||||
* platforms.
|
||||
* $FILES$
|
||||
* $SEEALSO$
|
||||
* RESTSCREEN() comm.ngo:'SAVE SCREEN' SAVESCREEN()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
* Change the Current Directory
|
||||
* $SYNTAX$
|
||||
* CD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -34,7 +35,7 @@
|
||||
* ENDIF
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
* MD() RD()
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h
|
||||
* $END$
|
||||
@@ -55,7 +56,7 @@ HARBOUR HB_CD( void )
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
*
|
||||
* Creates a Directory
|
||||
* $SYNTAX$
|
||||
* MD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -74,7 +75,7 @@ HARBOUR HB_CD( void )
|
||||
* ENDIF
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
* CD() MD()
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h
|
||||
* $END$
|
||||
@@ -95,7 +96,7 @@ HARBOUR HB_MD(void)
|
||||
* $CATEGORY$
|
||||
* DOS
|
||||
* $ONELINER$
|
||||
*
|
||||
* Remove a Directory
|
||||
* $SYNTAX$
|
||||
* RD(<NDIR>)
|
||||
* $ARGUMENTS$
|
||||
@@ -114,7 +115,7 @@ HARBOUR HB_MD(void)
|
||||
* ENDIF
|
||||
*
|
||||
* $SEEALSO$
|
||||
*
|
||||
* CD() MD()
|
||||
* $INCLUDE$
|
||||
* extend.h dos.h dir.h bios.h
|
||||
* $END$
|
||||
|
||||
@@ -247,7 +247,7 @@ FUNCTION DecToBin(nNumber)
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $EnNumber$
|
||||
* $END$
|
||||
*/
|
||||
|
||||
FUNCTION DecToOctal(nNumber)
|
||||
@@ -283,7 +283,7 @@ FUNCTION DecToOctal(nNumber)
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $EnNumber$
|
||||
* $END$
|
||||
*/
|
||||
|
||||
FUNCTION DecToHexa(nNumber)
|
||||
@@ -319,7 +319,7 @@ FUNCTION DecToHexa(nNumber)
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $EnNumber$
|
||||
* $END$
|
||||
*/
|
||||
|
||||
FUNCTION BinToDec(cString)
|
||||
@@ -355,7 +355,7 @@ FUNCTION BinToDec(cString)
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $EnNumber$
|
||||
* $END$
|
||||
*/
|
||||
|
||||
FUNCTION OctalToDec(cString)
|
||||
@@ -391,7 +391,7 @@ FUNCTION OctalToDec(cString)
|
||||
*
|
||||
* $INCLUDE$
|
||||
*
|
||||
* $EnNumber$
|
||||
* $END$
|
||||
*/
|
||||
|
||||
FUNCTION HexaToDec(cString)
|
||||
|
||||
Reference in New Issue
Block a user