FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Strange compiling problem in FWH 14.12
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 11:33 AM
Hello,

Can anyone tell me why this line of code is generating a compiling error in FWH 14.12 ?
Code (fw): Select all Collapse
IF BOEK->REK <= 5 .AND. ((OzTel = 1 .AND. BOEK->IN <> 0) .OR. (OzTel = 2 .AND. BOEK->UIT <> 0)) .AND. BOEK->DATUM <= DATVERSLAG
The error which is generated is : Syntax error at ')'.

In FWH 14.11 everything is going just fine.

Anyone any idea?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 11:46 AM
Maybe:

Code (fw): Select all Collapse
   IF BOEK->REK <= 5 .AND. ;
      ( ( OzTel = 1  .AND. BOEK->IN  != 0 ) .OR.  ;
        ( OzTel = 2  .AND. BOEK->UIT != 0 ) .AND. ;
          BOEK->DATUM <= DATVERSLAG )


Or,

Code (fw): Select all Collapse
   IF ( BOEK )->REK <= 5 .AND. ;
      ( ( OzTel = 1      .AND. ( BOEK )->IN  != 0 ) .OR.  ;
        ( OzTel = 2      .AND. ( BOEK )->UIT != 0 ) .AND. ;
          ( BOEK )->DATUM <= DATVERSLAG )



Regards,

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 12:04 PM

Thanks for trying to help me.

Unfortunately, the problem also occurs with your examples.

No problem in FWH 14.11 but an compiling error in FWH 14.12.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 12:44 PM
Michel,

driessen wrote:Hello,

Can anyone tell me why this line of code is generating a compiling error in FWH 14.12 ?
Code (fw): Select all Collapse
IF BOEK->REK <= 5 .AND. ((OzTel = 1 .AND. BOEK->IN <> 0) .OR. (OzTel = 2 .AND. BOEK->UIT <> 0)) .AND. BOEK->DATUM <= DATVERSLAG
The error which is generated is : Syntax error at ')'.

In FWH 14.11 everything is going just fine.

Anyone any idea?

Thanks.


Your line compile fine here using latest FWH/xHarbour.

EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 01:04 PM

This has nothing to do with FWH.

This is compiling well with xHarbour. I am also getting compilation error with the Harbour version I have downloaded recently (Harbour 3.2.0dev (r1412151448) .

I have not yet checked with previous versions of Harbour. This is strange.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 01:09 PM

I have compiled this code with the latest Harbour version provided by Antonio with FWH 4.12.

With the same Harbour version, I compiled it with FWH 4.11 without any problems.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 01:12 PM
I changed my code into this line :
Code (fw): Select all Collapse
IF BOEK->REK <= 5 .AND. [(OzTel = 1 .AND. BOEK->IN <> 0) .OR. (OzTel = 2 .AND. BOEK->UIT <> 0)] .AND. BOEK->DATUM <= DATVERSLAG
This code is compiling fine in FWH 4.12.

Very mysterious, if you ask me.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 01:18 PM

Yes. Because [....] results in a String constant and is not a logical value. This should give error.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 02:16 PM

Mr Michel

In the fivewin.ch please locate the line

include "hbcompat.ch"

Please comment out this line or remove it.

Then your code compiles correctly with Harbour too.

That is because "hbcompat.ch" is translating "IN" thinking that it is xHarbour operator "IN".

Regards



G. N. Rao.

Hyderabad, India
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 02:59 PM

Thanks a lot, Mr. Rao.

The problem is solved thanks to your solution.

Antonio, can this be fixed for the future versoin?

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 03:16 PM

Michel,

Yes, I am going to review it to see if we can solve it, and if not, then we will remove hbcompat.ch

manty thanks for your feedback :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 03:26 PM

Michel,

I have just sent an email to Viktor from the Harbour devel list to know his opinion about this :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 05:32 PM

Michel

i've compiled with 14.08 and Harbour Harbour 3.2.0dev (Rev. 18881). All ok !

Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
HIX -> https://github.com/carles9000/hix
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 07:03 PM

The problem comes from hbcompat.ch, specifically from this line:

translate ( <exp1> IN <exp2> ) => ( ( <exp1> ) $ ( <exp2> ) )

thats why I emailed Viktor, as to me that line should not be there

Viktor's answer is to avoid the use of hbcompat.ch :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Strange compiling problem in FWH 14.12
Posted: Wed Jan 07, 2015 07:04 PM

Viktor suggested me to #untranslate that line

That may be the right solution if we want to keep using hbcompat.ch

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion