FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing the place of "comp.log" file in scripts.
Posts: 130
Joined: Sat Oct 08, 2005 09:38 PM
Changing the place of "comp.log" file in scripts.
Posted: Mon Jul 30, 2018 01:37 PM
I am usings execute command to run the scripts as below.
When I run my program a file named comp.log is created in the current directory.
Is it possible to change it. I want it to be created in another directory (for example in my documents folder)
Thanks in advance.

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()
local cPrg, cError, cResult

   cPrg := 'function Test(x,y) ' + CHR(13)+CHR(10)
   cPrg += 'local z '            + CHR(13)+CHR(10)
   cPrg += '   z := x * y - 2 '  + CHR(13)+CHR(10)
   cPrg += 'return z '           + CHR(13)+CHR(10)

   cResult := Execute(cPrg, 10, 5)
   cError  := MemoRead( "comp.log" )
   
   If Empty(cError)
      MsgInfo( cResult )
   else
      MsgInfo( cError )
   endif

return nil
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Changing the place of "comp.log" file in scripts.
Posted: Tue Jul 31, 2018 04:19 PM
Birol,

In FWH\source\function\harbour.prg in function Execute() please comment out this line:

// FReOpen_Stderr ( "comp.log", "w" )

and modify this one:

oHrb = HB_CompileFromBuf( cCode, .T., "-n", "-I" + cFWheaders, "-I" + cHBheaders )

these fixes will be included in the next FWH version
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 130
Joined: Sat Oct 08, 2005 09:38 PM
Re: Changing the place of "comp.log" file in scripts.
Posted: Sat Aug 04, 2018 01:42 PM

Thanks master. It has gone. Not created in the current directory.
But where is it now? It will not be created? Or it has gone to somewhere else?

Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Changing the place of "comp.log" file in scripts.
Posted: Mon Aug 06, 2018 04:47 PM

It will not be created

In case that there is an error, a runtime error will be generated

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion