LE是什么意思在for循环的test-expression部分 [英] What does LE mean in the test-expression part of a for loop
问题描述
您好,我非常新手冷灌,我试图调试一些cfscript逻辑。基本上我想知道什么le意味着在for循环的test-expression部分。我已经通过coldfusion docs,但找不到它的意思。我猜这意味着小于或等于,但我相信,被表示为LTE。以下是代码示例:
for(i = 1; i le length; i = i + 1)$ b $ 解决方案 div> 这是一种 LTE的替代方法< a>。这些是等效的:
小于或等于
LTE
LE
但是对于新代码,我会改用< =
这更直观。
for(i = 1; i <= length; i ++){
.. 。
}
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)
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++) {
...
}
这篇关于LE是什么意思在for循环的test-expression部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文