Hello
what do you thinks about this way...
in errsysw.prg
add this function
function SetErrorPath( cPath )
local cOldPath
static cErrorPath := ".\"
cOldPath = cErrorPath
if PCount() == 1 .and. ValType( cPath ) == "C"
cErrorPath = cPath
endif
return cOldPath
Return last path used, without argument return current path
change
MemoWrit( SetErrorPath() + "Error.log", cErrorLog )
now we can call from main prg SetErrorPath( cPath )
example
#include "fivewin.ch"
function main
local aArray := {}
? SetErrorPath() //return current path
? SetErrorPath( "c:\Errors\") //return last path used
? SetErrorPath() //return current path
//force error
aArray[ 2 ] = 1
RETURN NIL