Page 1 of 2

xharbour last cvs error

PostPosted: Wed Aug 24, 2016 1:32 pm
by norberto
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

Re: xharbour last cvs error

PostPosted: Wed Aug 24, 2016 2:30 pm
by Enrico Maria Giordano
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

Re: xharbour last cvs error

PostPosted: Wed Aug 24, 2016 3:14 pm
by norberto
Enrico, tdata is james bott class, i dont have permission to publish here, but in prevision revision of xharbour this error dont ocur.

regards

Re: xharbour last cvs error

PostPosted: Wed Aug 24, 2016 3:24 pm
by Enrico Maria Giordano
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

Re: xharbour last cvs error

PostPosted: Wed Aug 24, 2016 5:16 pm
by norberto
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.

Re: xharbour last cvs error

PostPosted: Sun Aug 28, 2016 4:25 pm
by James Bott
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.

Re: xharbour last cvs error

PostPosted: Sun Aug 28, 2016 5:33 pm
by Enrico Maria Giordano
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

Re: xharbour last cvs error

PostPosted: Sun Aug 28, 2016 6:50 pm
by James Bott
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

Re: xharbour last cvs error

PostPosted: Sun Aug 28, 2016 7:45 pm
by Enrico Maria Giordano
Yes, it's the same.

EMG

Re: xharbour last cvs error

PostPosted: Sun Aug 28, 2016 11:44 pm
by James Bott
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


Re: xharbour last cvs error

PostPosted: Mon Aug 29, 2016 1:14 am
by James Bott
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

Re: xharbour last cvs error

PostPosted: Mon Aug 29, 2016 8:37 am
by Enrico Maria Giordano
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

Re: xharbour last cvs error

PostPosted: Mon Aug 29, 2016 4:28 pm
by James Bott
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

Re: xharbour last cvs error

PostPosted: Mon Aug 29, 2016 6:03 pm
by Enrico Maria Giordano
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

Re: xharbour last cvs error

PostPosted: Mon Aug 29, 2016 6:34 pm
by James Bott
Enrico,

Thanks.

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

James