🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #256

Re: Ciclo 'For each file in.....'

#256
From: AntFast
Date: Thu, 16 Nov 2006 14:20
48 lines
2281 bytes
"Rafunk" <zero@none0.it> ha scritto nel messaggio 
news:455c525a$0$7637$4fafbaef@reader1.news.tin.it...
> AntFast wrote:
>> Ciao a tutti.
>> Come si fa riportare il controllo all'inizio del ciclo
>> 'for each file in ......'
>> Cioe', se si e' verificata una condizione, deve saltare
>> il codice che viene a valle (codice2) e ripartire dal
>> 'for each file in ......'   Esempio:
>>
>> for each file in fld.Files
>>    ....codice
>>    ....codice
>>    if condizione then
>>        torna a for each.....     <-------
>>    endif
>> ....codice2
>> ....codice2
>> next
>> Grazie in anticipo per l'eventuale risposta
>> AntFast
>
> Basterebbe strutturarla cos�:
> for each file in fld.Files
>   ....codice
>   ....codice
>   if NOT condizione then
>    ....codice2
>    ....codice2
>   endif
> next
>
> Sempre che tu non voglia reinizializzare il loop, ripartendo dal primo 
> elemento.
> In tal caso sei costretto ad usare GoTo (che si dovrebbe usare con 
> parsimonia
> per evitare di rendere poco leggibile e "spaghettoso" il codice).
>
>
> Bye
>
> Raf
>
> -----------------------------------------------------
> Funk: cooler than the other side of the pillow.
>
> 
Technical Details
Message-ID: <ts_6h.9722$mZ5.7302@tornado.fastwebnet.it>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!tornado.fastwebnet.it!53ab2750!not-for-mail
References: <VqP6h.9067$mZ5.239@tornado.fastwebnet.it> <455c525a$0$7637$4fafbaef@reader1.news.tin.it>

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,1434dad1ca015974
X-Google-Attributes: gidf94ee,public
X-Google-Language: ITALIAN,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!tornado.fastwebnet.it!53ab2750!not-for-mail
From: "AntFast" <cianto@fastwebnet.it>
Newsgroups: free.it.visual-basic
References: <VqP6h.9067$mZ5.239@tornado.fastwebnet.it> <455c525a$0$7637$4fafbaef@reader1.news.tin.it>
Subject: Re: Ciclo 'For each file in.....'
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <ts_6h.9722$mZ5.7302@tornado.fastwebnet.it>
Date: Thu, 16 Nov 2006 15:20:04 +0100
NNTP-Posting-Host: 1.242.164.55
X-Complaints-To: newsmaster@fastweb.it
X-Trace: tornado.fastwebnet.it 1163686809 1.242.164.55 (Thu, 16 Nov 2006 15:20:09 CET)
NNTP-Posting-Date: Thu, 16 Nov 2006 15:20:09 CET