开发者

What does LE mean in the test-expression part of a for loop

开发者 https://www.devze.com 2023-03-18 21:10 出处:网络
Hi I\'m very novice to coldfusion and I am trying to debug some cfscript logic. Ba开发者_Go百科sically I want to know what \"le\" means in the test-expression part of the for loop. I have looked throu

Hi I'm very novice to coldfusion and I am trying to debug some cfscript logic. Ba开发者_Go百科sically I want to know what "le" means in the test-expression part of the for loop. I have looked through the coldfusion docs but can't find what it means. I am guessing it means less than or equals, but I believe that is denoted as LTE. Here's a sample of the code:

for (i = 1; i le length; i = i + 1)

Thanks in advance.


It is an alternate way of saying LTE. These are equivalent:

 LESS THAN OR EQUAL TO
 LTE
 LE

But for new code, I would use <= instead. It is more intuitive.

for (i = 1; i <= length; i++) {
   ... 
}  
0

精彩评论

暂无评论...
验证码 换一张
取 消