From 8981b593f9747a3cd0e2e1404e22f08b0a827cc7 Mon Sep 17 00:00:00 2001 From: Eddie Runia Date: Mon, 10 May 1999 09:06:57 +0000 Subject: [PATCH] Function PCount() added to hvm.c --- harbour/ChangeLog | 6 ++++++ harbour/source/vm/hvm.c | 8 ++++++++ harbour/tests/working/debugtst.prg | 24 ++++++------------------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7e9d8302c1..8922878eb1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index f29ebe0e41..d71e06d166 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -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 ); +} + diff --git a/harbour/tests/working/debugtst.prg b/harbour/tests/working/debugtst.prg index 116dc34b55..5f82b6beca 100644 --- a/harbour/tests/working/debugtst.prg +++ b/harbour/tests/working/debugtst.prg @@ -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 ) +// aOData( , [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 // // aOGet( , [] )