xharbour last cvs error

xharbour last cvs error

Postby norberto » Wed Aug 24, 2016 1:32 pm

Hi,

after this changelog :

2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>
* bin/bld.bat
+ Added test for error level after prg compilation
* bin/bld_vc.bat
+ Added support for VS 2013 and 2015
* make_vc.bat
* More complete VS 2015 support and minor revision

* source/compiler/harbour.sly
* source/compiler/harbouryy.c
! Fixed GPF trap (hb_comp_BlocksList NULL after syntax error)


old function, like tdata from james dont compile :

Tdata\Tdata.prg(281) Error E0047 Code block contains both macro and declared symbol references

line of tdata :

::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
cMessage )

someone can contact xharbour team?

thanks
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: xharbour last cvs error

Postby Enrico Maria Giordano » Wed Aug 24, 2016 2:30 pm

norberto wrote:Hi,

after this changelog :

2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>
* bin/bld.bat
+ Added test for error level after prg compilation
* bin/bld_vc.bat
+ Added support for VS 2013 and 2015
* make_vc.bat
* More complete VS 2015 support and minor revision

* source/compiler/harbour.sly
* source/compiler/harbouryy.c
! Fixed GPF trap (hb_comp_BlocksList NULL after syntax error)


old function, like tdata from james dont compile :

Tdata\Tdata.prg(281) Error E0047 Code block contains both macro and declared symbol references

line of tdata :

::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
cMessage )

someone can contact xharbour team?

thanks


Can you build a little PRG showing the problem, please?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xharbour last cvs error

Postby norberto » Wed Aug 24, 2016 3:14 pm

Enrico, tdata is james bott class, i dont have permission to publish here, but in prevision revision of xharbour this error dont ocur.

regards
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: xharbour last cvs error

Postby Enrico Maria Giordano » Wed Aug 24, 2016 3:24 pm

norberto wrote:Enrico, tdata is james bott class, i dont have permission to publish here, but in prevision revision of xharbour this error dont ocur.

regards


Sorry, we need a code sample. James?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xharbour last cvs error

Postby norberto » Wed Aug 24, 2016 5:16 pm

I just returned the last revision

2016-07-05 10:02 UTC+0200 Enrico Maria Giordano <e.m.giordano@emagsoftware.it>
* contrib/gtwvw/gtwvw.c
! pacify warning

and everything worked again. remembering old class tdata there were no changes in it in recent times.

Best regards.
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: xharbour last cvs error

Postby James Bott » Sun Aug 28, 2016 4:25 pm

Sorry for the late reply--I just read this message thread.

The complete line of code is:

Code: Select all  Expand view
     ::Meter( { | oMeter, oText, oDlg, lEnd | ;
         ::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
         cMessage )


So I am assuming it doesn't like the @lEnd and bFor in the same line of code. This is inside a complex class (543 lines) so I can't easily make a working test program from it. I guess we just need to try to build a test sample from scratch containing both items.

And yes, TData hasn't been changed since 2010-04-09.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xharbour last cvs error

Postby Enrico Maria Giordano » Sun Aug 28, 2016 5:33 pm

This is compiling fine here:

Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending

    LOCAL cMessage := ""

    Meter( { | oMeter, oText, oDlg, lEnd | ;
         buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
         cMessage )

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xharbour last cvs error

Postby James Bott » Sun Aug 28, 2016 6:50 pm

Enrico,

Did you use the same version of xHarbour as Norberto?

2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Re: xharbour last cvs error

Postby James Bott » Sun Aug 28, 2016 11:44 pm

Everyone,

OK I wrote a test program with the offending line of code. It is wrapped in a dummy class just we can test the line as is. This one doesn't error using my old xHarbour ver. 1.2.3.

James
Code: Select all  Expand view

/*
Purpose  : Test compile to test error generated by new version of xHarbour
Author   : James Bott, jbott@compuserve.com
Date     : 8/28/2016
Company  : Intellitech
Copyright: Copyright © 2016 Intellitech
Language : Fivewin/xHarbour
Updated  :
Notes    : Norberto tried compiling TData with this version of xHarbour
           2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>
           
           And got this error:

Tdata\Tdata.prg(281) Error E0047 Code block contains both macro and declared symbol references

line of tdata :

::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
 cMessage )
 
So I wrote a dummy TData class to test for the problem.
No errors were generated using my older version of xHarbour - J Bott          
/

#include "fivewin.ch"

Function Main()

Return nil

Class TData
   Data Meter
   Method New()
   Method BuildIndex()
   Method Meter()
   Method Reindex()
endclass

Method new() class TData
return self

Method Reindex() Class TData

   Local oMeter,oText,oDlg,lEnd,cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending, cMessage

     ::Meter( { | oMeter, oText, oDlg, lEnd | ;
         ::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
         cMessage )

return nil

Method BuildIndex() Class TData
Return nil

Method Meter() Class TData
return nil

// EOF

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xharbour last cvs error

Postby James Bott » Mon Aug 29, 2016 1:14 am

Everyone:

I noticed that I forgot to assign bFor a codeblock. So here is the updated test program.

Norberto,

Can you please test compile this sample with your new xHarbour version to see if it errors?

James

Code: Select all  Expand view
#include "fivewin.ch"

Function Main()

Return nil

Class TData
   Data Meter
   Method New()
   Method BuildIndex()
   Method Meter()
   Method Reindex()
endclass

Method new() class TData
return self

Method Reindex() Class TData

   Local oMeter,oText,oDlg,lEnd,cTag, cKey, cFile, nInterval, lUnique, bFor:={|| .t.}, lDescending, cMessage

     ::Meter( { | oMeter, oText, oDlg, lEnd | ;
         ::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
         cMessage )

return nil

Method BuildIndex() Class TData
Return nil

Method Meter() Class TData
return nil

// EOF
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xharbour last cvs error

Postby Enrico Maria Giordano » Mon Aug 29, 2016 8:37 am

Your sample, after corrected some errors and warning, compiles fine here:

Code: Select all  Expand view
#include "fivewin.ch"

Function Main()

Return nil

Class TData
   Method New()
   Method BuildIndex()
   Method Meter()
   Method Reindex()
endclass

Method new() class TData
return self

Method Reindex() Class TData

   Local cTag, cKey, cFile, nInterval, lUnique, bFor:={|| .t.}, lDescending, cMessage := ""

     ::Meter( { | oMeter, oText, oDlg, lEnd | ;
         ::buildIndex( oMeter, oText, oDlg, @lEnd, cTag, cKey, cFile, nInterval, lUnique, bFor, lDescending ) },;
         cMessage )

return nil

Method BuildIndex() Class TData
Return nil

Method Meter() Class TData
return nil


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xharbour last cvs error

Postby James Bott » Mon Aug 29, 2016 4:28 pm

Enrico,

Thanks for testing it.

Interesting that you got warnings and errors. I didn't get any when compiling it with my older version of FWH/xHarbour. Warnings I'm not concerned about, but what errors did you get?

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xharbour last cvs error

Postby Enrico Maria Giordano » Mon Aug 29, 2016 6:03 pm

Sorry, no errors, only warnings:

Code: Select all  Expand view
test.prg(11) Warning W0019  Duplicate declaration of Method 'METER'
test.prg(28) Warning W0003  Variable: 'OMETER' declared but not used in function: 'TDATA_REINDEX(20)'
test.prg(28) Warning W0003  Variable: 'OTEXT' declared but not used in function: 'TDATA_REINDEX(20)'
test.prg(28) Warning W0003  Variable: 'ODLG' declared but not used in function: 'TDATA_REINDEX(20)'
test.prg(28) Warning W0003  Variable: 'LEND' declared but not used in function: 'TDATA_REINDEX(20)'
test.prg(28) Warning W0033  Variable 'CMESSAGE' is never assigned in function 'TDATA_REINDEX(20)'


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xharbour last cvs error

Postby James Bott » Mon Aug 29, 2016 6:34 pm

Enrico,

Thanks.

Well they all make sense. So, I would say they made some improvements in the compiler to catch these issues.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests