Changing the place of "comp.log" file in scripts.

Changing the place of "comp.log" file in scripts.

Postby betoncu » Mon Jul 30, 2018 1: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: Select all  Expand view
#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
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: Changing the place of "comp.log" file in scripts.

Postby Antonio Linares » Tue Jul 31, 2018 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing the place of "comp.log" file in scripts.

Postby betoncu » Sat Aug 04, 2018 1: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
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: Changing the place of "comp.log" file in scripts.

Postby Antonio Linares » Mon Aug 06, 2018 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Jimmy and 82 guests