<?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/">
	<channel>
		<title><![CDATA[ايران ويج - ColdFusion]]></title>
		<link>https://www.iranled.com/forum/</link>
		<description><![CDATA[ايران ويج - https://www.iranled.com/forum]]></description>
		<pubDate>Fri, 28 Aug 2026 12:14:21 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[دستورهای شرطی در ColdFusion]]></title>
			<link>https://www.iranled.com/forum/thread-4029.html</link>
			<pubDate>Mon, 10 Jul 2006 18:14:23 +0000</pubDate>
			<guid isPermaLink="false">https://www.iranled.com/forum/thread-4029.html</guid>
			<description><![CDATA[<blockquote class="mycode_quote"><cite>نقل قول: </cite>برای تصميم گيری بر اساس شرايط مختلف می توان از ساخت if/else/elseif استفاده کرد :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;cfif condition&gt;</span><br />
<br />
<span style="color: blue;" class="mycode_color">  &lt;!--- Some code to go if condition is TRUE ---&gt;</span><br />
<br />
<span style="color: green;" class="mycode_color">&lt;/cfif&gt;</span></div>
<br />
ColdFusion  چک می کند که آيا شرط condition دارای مقدار True  می باشد يا False . اگر اين مقدار True  باشد کد بين جفت تق را اجرا می کند. مانند مثال زير :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;CFIF myVar EQ MyOtherVar&gt;<br />
<br />
    Two Variables are equal to eachother .<br />
<br />
&lt;/CFIF&gt;</span></div>اگر بخواهيد coldfusion يک کد خاص برای مواقعی که شرط False می باشد را اجرا کند از ساختار زير استفاده می کنيم :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;CFIF myVar EQ MyOtherVar&gt;<br />
<br />
   Two variables are equal to eachother.<br />
<br />
&lt;CFELSE&gt;</span><br />
<span style="color: blue;" class="mycode_color"><br />
   &lt;!--- This part will be executed if the condition is FALSE ---&gt;</span><br />
<br />
<span style="color: green;" class="mycode_color">   Two variables are not equal.<br />
<br />
&lt;/CFIF&gt;</span></div>
<br />
شما می توانيد اين ساخت شرطی را با افزودن cfelseif گسترش دهيد :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;CFIF myVar Greater Than MyOtherVar&gt;<br />
<br />
    &lt;cfoutput&gt;#myvar# &gt; #myotherVar# &lt;/cfoutput&gt;<br />
<br />
&lt;CFELSEIF myVar EQ MyOtherVar&gt;<br />
<br />
    &lt;cfoutput&gt; #myVar# = #MyOtherVar# &lt;/cfoutput&gt;<br />
<br />
&lt;CFELSE&gt;<br />
<br />
   &lt;cfoutput&gt; #myVar# &lt; #myOtherVar# &lt;/cfoutput&gt;<br />
<br />
&lt;/CFIF&gt;</span></div>
<br />
اگر شرط موجود در cfif صحيح نباشد شرط مجود در cfelseif های موجود به ترتيب چک می شود. اگر هيچ کدام درست نباشند ٬ کد موجود پس از cfelse اجرا می شود .</blockquote>
<br />
<a href="http://www.macromediax.com/learn/" target="_blank" rel="noopener" class="mycode_url">منبع</a>]]></description>
			<content:encoded><![CDATA[<blockquote class="mycode_quote"><cite>نقل قول: </cite>برای تصميم گيری بر اساس شرايط مختلف می توان از ساخت if/else/elseif استفاده کرد :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;cfif condition&gt;</span><br />
<br />
<span style="color: blue;" class="mycode_color">  &lt;!--- Some code to go if condition is TRUE ---&gt;</span><br />
<br />
<span style="color: green;" class="mycode_color">&lt;/cfif&gt;</span></div>
<br />
ColdFusion  چک می کند که آيا شرط condition دارای مقدار True  می باشد يا False . اگر اين مقدار True  باشد کد بين جفت تق را اجرا می کند. مانند مثال زير :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;CFIF myVar EQ MyOtherVar&gt;<br />
<br />
    Two Variables are equal to eachother .<br />
<br />
&lt;/CFIF&gt;</span></div>اگر بخواهيد coldfusion يک کد خاص برای مواقعی که شرط False می باشد را اجرا کند از ساختار زير استفاده می کنيم :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;CFIF myVar EQ MyOtherVar&gt;<br />
<br />
   Two variables are equal to eachother.<br />
<br />
&lt;CFELSE&gt;</span><br />
<span style="color: blue;" class="mycode_color"><br />
   &lt;!--- This part will be executed if the condition is FALSE ---&gt;</span><br />
<br />
<span style="color: green;" class="mycode_color">   Two variables are not equal.<br />
<br />
&lt;/CFIF&gt;</span></div>
<br />
شما می توانيد اين ساخت شرطی را با افزودن cfelseif گسترش دهيد :<br />
<div style="text-align: left;" class="mycode_align">
<span style="color: green;" class="mycode_color">&lt;CFIF myVar Greater Than MyOtherVar&gt;<br />
<br />
    &lt;cfoutput&gt;#myvar# &gt; #myotherVar# &lt;/cfoutput&gt;<br />
<br />
&lt;CFELSEIF myVar EQ MyOtherVar&gt;<br />
<br />
    &lt;cfoutput&gt; #myVar# = #MyOtherVar# &lt;/cfoutput&gt;<br />
<br />
&lt;CFELSE&gt;<br />
<br />
   &lt;cfoutput&gt; #myVar# &lt; #myOtherVar# &lt;/cfoutput&gt;<br />
<br />
&lt;/CFIF&gt;</span></div>
<br />
اگر شرط موجود در cfif صحيح نباشد شرط مجود در cfelseif های موجود به ترتيب چک می شود. اگر هيچ کدام درست نباشند ٬ کد موجود پس از cfelse اجرا می شود .</blockquote>
<br />
<a href="http://www.macromediax.com/learn/" target="_blank" rel="noopener" class="mycode_url">منبع</a>]]></content:encoded>
		</item>
	</channel>
</rss>