On Fri, 2010-11-12 at 13:06 -0500, Steven Schveighoffer wrote:

> >> if(x)
> >> {
> >>     g(x)
> >> }

> If that is invalid code, then I stand corrected.  If it compiles, then  
> it's a serious flaw that is inexcusable.

I think there is element of "more by luck than judgement" here.  In the
example I tried:

        package main
        
        import "fmt"
        
        func main ( ) {
                x := false
                if ( x )
                {
                        fmt.Printf ( "Hello World." )
                }
        }


I got the error:

... 7: x not used

So all in all, not entirely satisfactory :-(

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to