FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xharbour last cvs error
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
xharbour last cvs error
Posted: Wed Aug 24, 2016 01: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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xharbour last cvs error
Posted: Wed Aug 24, 2016 02: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
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
Re: xharbour last cvs error
Posted: Wed Aug 24, 2016 03: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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xharbour last cvs error
Posted: Wed Aug 24, 2016 03: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
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
Re: xharbour last cvs error
Posted: Wed Aug 24, 2016 05: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.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: xharbour last cvs error
Posted: Sun Aug 28, 2016 04:25 PM
Sorry for the late reply--I just read this message thread.

The complete line of code is:

Code (fw): Select all Collapse
      ::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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xharbour last cvs error
Posted: Sun Aug 28, 2016 05:33 PM
This is compiling fine here:

Code (fw): Select all Collapse
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: xharbour last cvs error
Posted: Sun Aug 28, 2016 06: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xharbour last cvs error
Posted: Sun Aug 28, 2016 07:45 PM

Yes, it's the same.

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: xharbour last cvs error
Posted: 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 (fw): Select all Collapse
/*
Purpose  : Test compile to test error generated by new version of xHarbour
Author   : James Bott, <!-- e --><a href="mailto:jbott@compuserve.com">jbott@compuserve.com</a><!-- e -->
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: xharbour last cvs error
Posted: Mon Aug 29, 2016 01: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 (fw): Select all Collapse
#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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xharbour last cvs error
Posted: Mon Aug 29, 2016 08:37 AM
Your sample, after corrected some errors and warning, compiles fine here:

Code (fw): Select all Collapse
#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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: xharbour last cvs error
Posted: Mon Aug 29, 2016 04: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xharbour last cvs error
Posted: Mon Aug 29, 2016 06:03 PM
Sorry, no errors, only warnings:

Code (fw): Select all Collapse
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: xharbour last cvs error
Posted: Mon Aug 29, 2016 06: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