Page 1 of 1

Harbour 3.2 Borland 7 32bits 2018/01/27

Posted: Sat Jan 27, 2018 11:10 am
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

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

Posted: Sat Jan 27, 2018 10:06 pm
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

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

Posted: Sun Jan 28, 2018 6:03 am
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

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

Posted: Sun Jan 28, 2018 8:13 am
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

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

Posted: Sun Jan 28, 2018 8:34 am
by Antonio Linares
Ni idea how to supress that warning...

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

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

Posted: Sun Jan 28, 2018 9:53 am
by Enrico Maria Giordano
I already tried it in the past. And I really have enough of them. Sorry.

EMG

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

Posted: Mon Jan 29, 2018 1:08 pm
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

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

Posted: Mon Jan 29, 2018 1:36 pm
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

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

Posted: Mon Jan 29, 2018 4:29 pm
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

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

Posted: Mon Jan 29, 2018 5:52 pm
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