文字上的数组成员函数

Array Member function on a literal

这个有效

<cfif ArrayContains(["bridge","ccf"], getSection())>

这不

<cfif ["bridge","ccf"].Contains(getSection())>

错误信息

第 7 栏

Detail ColdFusion was looking at the following text:

[

The CFML compiler was processing:

  • A cfif tag beginning on line 15, column 2.
KnownColumn 2 KnownLine 15 KnownText cfif Line 15 Message Invalid CFML construct found on line 15 at column 7.
Snippet

我是否转换正确,这是 Adob​​e 实施的限制吗?

ColdFusion 不支持在文字上调用方法,不。

参考文献:Member functions cannot be called on literals,表示:

This should work:

"lowercase".ucase()

It currently doesn't.