<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Looping over arrays in Lucee CFML	</title>
	<atom:link href="https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/</link>
	<description>CFML, AWS, WordPress and more...</description>
	<lastBuildDate>Sat, 19 Feb 2022 23:49:56 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Will B.		</title>
		<link>https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/#comment-941</link>

		<dc:creator><![CDATA[Will B.]]></dc:creator>
		<pubDate>Sat, 19 Feb 2022 23:49:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.andrewdixon.co.uk/?p=93#comment-941</guid>

					<description><![CDATA[An old post, but I agree with Richard on this.  In my early coding days (lots of PowerBuilder), I was heavily advised against putting any functions in a loop evaluation.  Simply because (in most languages) must be re-run constantly and that takes up CPU.

But also, can be dangerous, too, if you&#039;re deleting from that array.  Of course, if I&#039;m looping to do that, I always do step=&quot;-1&quot; and work backwards.]]></description>
			<content:encoded><![CDATA[<p>An old post, but I agree with Richard on this.  In my early coding days (lots of PowerBuilder), I was heavily advised against putting any functions in a loop evaluation.  Simply because (in most languages) must be re-run constantly and that takes up CPU.</p>
<p>But also, can be dangerous, too, if you&#8217;re deleting from that array.  Of course, if I&#8217;m looping to do that, I always do step=&#8221;-1&#8243; and work backwards.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrew Dixon		</title>
		<link>https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/#comment-3</link>

		<dc:creator><![CDATA[Andrew Dixon]]></dc:creator>
		<pubDate>Sun, 04 Nov 2018 21:48:37 +0000</pubDate>
		<guid isPermaLink="false">https://www.andrewdixon.co.uk/?p=93#comment-3</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/#comment-2&quot;&gt;Richard Herbert&lt;/a&gt;.

Interesting point. I&#039;ve not tested to see how Lucee handles you modifying the array in the loop to see if it re-evaluates the value in the &quot;to&quot; attribute or if it simply uses the value it gets at the start of the loop. If it does re-evaluate, then, depending on your use case, this may or may not be desired.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/#comment-2">Richard Herbert</a>.</p>
<p>Interesting point. I&#8217;ve not tested to see how Lucee handles you modifying the array in the loop to see if it re-evaluates the value in the &#8220;to&#8221; attribute or if it simply uses the value it gets at the start of the loop. If it does re-evaluate, then, depending on your use case, this may or may not be desired.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Richard Herbert		</title>
		<link>https://www.andrewdixon.co.uk/2018/11/03/looping-over-arrays-in-lucee-cfml/#comment-2</link>

		<dc:creator><![CDATA[Richard Herbert]]></dc:creator>
		<pubDate>Sat, 03 Nov 2018 12:07:16 +0000</pubDate>
		<guid isPermaLink="false">https://www.andrewdixon.co.uk/?p=93#comment-2</guid>

					<description><![CDATA[I&#039;d be careful using arrayLen(myArray) to test for the end of the loop as you have in the first 4 examples. The value is evaluated on every iteration so there is a chance that the length of the array could have changed by the time the code loops around again. Better to capture the length of the array before the loop starts and use that value in the test.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d be careful using arrayLen(myArray) to test for the end of the loop as you have in the first 4 examples. The value is evaluated on every iteration so there is a chance that the length of the array could have changed by the time the code loops around again. Better to capture the length of the array before the loop starts and use that value in the test.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
