Function PCount() added to hvm.c

This commit is contained in:
Eddie Runia
1999-05-10 09:06:57 +00:00
parent 1bbe7f470a
commit 8981b593f9
3 changed files with 20 additions and 18 deletions

View File

@@ -1,3 +1,9 @@
19990510-10:05 Eddie Runia
* source/vm/hvm.c
Function PCount() added /* QUESTION: Should it be there ? */
* tests/working/debugtst.prg
PCount() used
19990510-09:10 Eddie Runia
* source/rtl/itemapi.c, include/itemapi.h
- new version installed

View File

@@ -2030,4 +2030,12 @@ HARBOUR ERRORLEVEL()
_retni( bPrevValue );
}
HARBOUR PCOUNT()
{
PITEM pBase = stack.pItems + stack.pBase->wBase;
WORD wRet = pBase->wParams; /* Skip current function */
_retni( wRet );
}

View File

@@ -222,7 +222,7 @@ function TForm()
oClass:AddData( "nBottom" )
oClass:AddData( "nRight" )
oClass:AddMethod( "aExcept", @Virtual() )
oClass:AddVirtual( "aExcept" )
// Export exceptions
oClass:AddMethod( "New", @New() ) // define this class objects methods
@@ -327,7 +327,7 @@ static function Transfer( x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 /* etc */ )
local self := QSelf()
local aParam := __aParam()
local nLen := Len( aParam ) // PCount() not implemented
local nLen := PCount()
local xRet
local xData
local n
@@ -357,15 +357,15 @@ static function Transfer( x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 /* etc */ )
return xRet
static function Virtual() /* Not implemented ?? */
return nil
//
// aData aOData( oObject )
// <aData> aOData( <oObject>, [lDataMethod] )
//
// Return an array containing the names of all the data items of oObject.
//
// lDataMethod = .T. (default) Return all DATAs
// .F. Return all METHODs
//
function aOData( oObject, lDataMethod )
local aInfo := aSort( oObject:ClassSel() )
@@ -402,19 +402,7 @@ return aData
function aOMethod( oObject )
return aOData( oObject, .F. )
// local aInfo := aSort( oObject:ClassSel() )
// local aData := {}
// local n := 1
// local nLen := Len( aInfo )
// do while n <= nLen .and. Substr( aInfo[ n ], 1, 1 ) != "_"
// if Empty( aScan( aInfo, "_" + aInfo[ n ], n + 1 ) )
// aAdd( aData, aInfo[ n ] )
// endif
// n++
// enddo
//return aData
//
// <aData> aOGet( <oObject>, [<aExcept>] )