Enrico,

This is a code quality issue. When you use -a then each PRIVATE  
statement is treated as a MEMVAR declaration. So in effect you have  
duplicate declaration, such that the duplicate declaration is never  
marked as used. When this is fixed, you'll get an additional warning  
of a Duplicate Declaration. So the code should be corrected as follows:

//-------------------------------//
PROCEDURE MAIN()

    PRIVATE Test

    IF .T.
       Test := 2
    ELSE
       Test := 2
    ENDIF

RETURN
//-------------------------------//

Ron

On Jun 9, 2008, at 1:17 PM, Enrico Maria Giordano wrote:

>
> -----Messaggio Originale----- Da: "Ron Pinkas" <[EMAIL PROTECTED]>
> A: "Enrico Maria Giordano" <[EMAIL PROTECTED]>
> Cc: "Xharbour-Developers" <[email protected]>
> Data invio: lunedì 9 giugno 2008 21.51
> Oggetto: Re: [xHarbour-developers] Strange warning
>
>
>> Should be fixed now.
>
> Unfortunately I still get
>
> Warning W0003  Variable: 'TEST' declared but not used in function:  
> 'MAIN(8)'
>
> trying to compile the following sample:
>
> FUNCTION MAIN()
>
>    IF .T.
>        PRIVATE Test
>
>        Test = 1
>    ELSE
>        PRIVATE Test
>
>        Test = 2
>    ENDIF
>
>    INKEY( 0 )
>
>    RETURN NIL
>
> EMG
>
> --
> EMAG Software Homepage:     http://www.emagsoftware.it
> The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
> The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
> The EMG Music page:         http://www.emagsoftware.it/emgmusic
>



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to