Re: New question on strings
- From: Darren New <dnew@xxxxxxxxxx>
- Date: Fri, 29 Feb 2008 08:48:15 -0800
Bryan Oakley wrote:
foreach line <some set of data ...> {
if {<some criteria is met>} {
incr count(<some index>)
}
}
Until your set of data is empty.
Mistakenly doing [incr $counter] is way up on my list along with mistakenly writing code like
proc mapit {list} {
foreach item $list {
lappend result [transform $item]
}
return $result
}
Which, of course, is wrong.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
.
- Follow-Ups:
- Re: New question on strings
- From: Andreas Leitgeb
- Re: New question on strings
- References:
- New question on strings
- From: mark
- Re: New question on strings
- From: mark
- Re: New question on strings
- From: Gerald W. Lester
- Re: New question on strings
- From: tom.rmadilo
- Re: New question on strings
- From: Neil Madden
- Re: New question on strings
- From: tom.rmadilo
- Re: New question on strings
- From: Bryan Oakley
- New question on strings
- Prev by Date: Re: Tk8.5: Tk_PhotoSetSize vs Tk_PhotoSetSize_Panic
- Next by Date: Re: New question on strings
- Previous by thread: Re: New question on strings
- Next by thread: Re: New question on strings
- Index(es):
Relevant Pages
|