Yeah... Nicer to be implicit though.

Sam

-----Original Message-----
From: Levi Bard Sent: Wednesday, May 06, 2009 7:48 PM
To: Sam Liddicott <[email protected]>
Subject: Re: [Vala] Listing directory content with GIO

On Wed, May 6, 2009 at 2:42 PM, Sam Liddicott <[email protected]> wrote:
> I prefer:
>
> while ((FileInfo fileinfo = enumerator.next_file(null)) != null)
> {
>  stdout.printf("%s\n", fileinfo.get_name());
> }
>
> Which allows you to have a fake scope surrounding the loop to keep the loop 
> variable temporary to the loop.
>
> I don't know any language that likes it though :-(

{
    FileInfo fileinfo;
    while(null != (fileinfo = enumerator.next_file(null)))
    {
        // stuff
    }
}// ?


-- 
http://homes.eff.org/~barlow/EconomyOfIdeas.html
http://www.dreamsongs.com/MobSoftware.html
http://www.gnu.org/philosophy/shouldbefree.html

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to