Trying to work out the code from thread 'checking changes in folder' (28 juni , using 'HB_DBG_VMSTKLLIST()' , i have no error when compiled without FW , probably a GPF with FW
- Code: Select all Expand view RUN
# ifdef FIVEWIN
#include "FiveWin.ch"
# endif
#include "common.ch"
function Main()
Test( "one", "two", "three" )
return nil
***************************************************************************************************************
function Test( x, y, z )
************************
local local1 := "first", local2 := {"SecondFirst","secondSecond"}
local aBegin
local aEnd
// your code...
aBegin := aClone(ReadLocals(HB_DBG_VMSTKLLIST(),4,5))
local2[2] := "changed!" // we change a local value
aEnd := Readlocals(HB_DBG_VMSTKLLIST(),4,5)
CompLocals(aBegin , aEnd)
return nil
****************************************************************************************************************
FUNC ReadLocals(...)
********************
LOCAL aParam := HB_aParams()
LOCAL nFrom , nTo
LOCAL aLocals// := HB_DBG_VMSTKLLIST()
LOCAL Arr[0] , el
aLocals := aParam[1]
aDel(aParam,1,.T.)
aDel(aLocals,1,.T.)
aDel(aLocals,1,.T.)
IF LEN(aParam) == 0
Arr := aLocals
ELSEIF LEN(aParam) <= 2
nTo := nFrom := aParam[1]
IF LEN(aParam) = 2
nTO := aParam[2]
END
Arr := {}
AEVAL(aLocals , {|el| AADD(Arr,el) } , nFrom , Nto - nFrom + 1)
ELSE
AEVAL(aParam , {|el| AADD(Arr , aLocals[el]) } )
ENDIF
RETURN Arr
*************************************************************
FUNC CompLocals(aBegin , aEnd)
*********************************
LOCAL el , elem , lOk := .T. , i
FOR i := 1 TO LEN(aBegin)
el := aBegin[i]
elem := aEnd[i]
IF VALTYPE(el) <> VALTYPE(elem)
lOk := .F.
EXIT
END
IF IsArray(el) .AND. IsArray(elem)
IF LEN(el) <> LEN(elem)
lOk := .F.
EXIT
END
IF ! CompLocals(el , elem )
lOk := .F.
EXIT
END
ELSE
IF el <> elem
lOk := .F.
EXIT
END
END
NEXT
IF ! lOk
? i , aBegin[i] , aEnd[i] , lOk
# ifndef FIVEWIN
WAIT
# endif
END
RETURN lOk