LE 在 for 循环的测试表达式部分是什么意思 [英] What does LE mean in the test-expression part of a for loop
本文介绍了LE 在 for 循环的测试表达式部分是什么意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我对coldfusion 非常陌生,我正在尝试调试一些cfscript 逻辑.基本上我想知道le"在for循环的测试表达式部分是什么意思.我浏览了coldfusion docs,但找不到它的含义.我猜这意味着小于或等于,但我相信这表示为 LTE.以下是代码示例:
Hi I'm very novice to coldfusion and I am trying to debug some cfscript logic. Basically 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)
提前致谢.
推荐答案
这是一个 LTE 的另一种说法.这些是等价的:
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++) {
...
}
这篇关于LE 在 for 循环的测试表达式部分是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文