Harbour 3.2 Borland 7 32bits 2018/01/27

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Antonio Linares »

https://bitbucket.org/fivetech/harbour- ... 180127.zip

Built using these Harbour defines:

go.bat
set path=c:\bcc7\bin
set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include
set HB_WITH_CURL=c:\curl\include
win-make.exe
http://forums.fivetechsupport.com/viewt ... 92#p201592
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Enrico Maria Giordano »

I just found a bug:

Code: Select all

FUNCTION MAIN()

    LOCAL i

    FOR i = 1 TO 10
        FOR i = i TO 5
            ? i
        NEXT
    NEXT

    INKEY( 0 )

    RETURN NIL

Code: Select all

Harbour 3.2.0dev (r1801051438)
Copyright (c) 1999-2016, http://harbour-project.org/
BUG.prg(6) Warning W0030  Duplicate variable 'I' in nested FOR loop

No code generated.
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Antonio Linares »

Enrico,

I don't think that is a bug as it is reported as a warning

Anyhow the right place to report it is in the Harbour developers group at:
https://groups.google.com/forum/#!forum/harbour-devel

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Enrico Maria Giordano »

Antonio Linares wrote:Enrico,

I don't think that is a bug as it is reported as a warning
Still I think it's a bug. Anyway, is there a way to suppress it?
Antonio Linares wrote:Anyhow the right place to report it is in the Harbour developers group at:
https://groups.google.com/forum/#!forum/harbour-devel

thanks
It would be wasted time, you know. :-(

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Antonio Linares »

Ni idea how to supress that warning...

Regarding reporting it, you will never know it unless you try it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
sygecom
Posts: 42
Joined: Tue Mar 11, 2008 3:18 am
Location: Brasil

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by sygecom »

Enrico,
In this case, it would not be ideal to separate the variables

Code: Select all

FUNCTION MAIN()

    LOCAL i,ii

    FOR i = 1 TO 10
        FOR ii = i TO 5
            ? ii
        NEXT ii
    NEXT i

    INKEY( 0 )

    RETURN NIL
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Enrico Maria Giordano »

It was only a sample. The point is that there is no valid reason to issue a warning in this case and no compiler in any language issues it.

EMG
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by cnavarro »

Enrico Maria Giordano wrote:It was only a sample. The point is that there is no valid reason to issue a warning in this case and no compiler in any language issues it.

EMG
Other compilers do not warn that their code produces an endless loop?
I prefer that the compiler warn me
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Harbour 3.2 Borland 7 32bits 2018/01/27

Post by Enrico Maria Giordano »

cnavarro wrote:Other compilers do not warn that their code produces an endless loop?
I prefer that the compiler warn me
No, why should it be? Endless loops are useful sometimes. Anyway, neither Harbour warns on that. It warns the use of the same index variable in nested loops.

EMG
Post Reply