当使用为 null 的元素调用 ArrayLen 时,它会引发错误。你如何让它返回0?
The value '' cannot be converted to a number.
The error occurred in D:/Resource/WWW/DEV/ww1dev.cwtvacations.com/welcome_survey/welcome_survey_question_builder.cfm: line 12
10 : <cfset curPage = SESSION.thisPage />
11 :
12 : <cfloop from="1" to="#ArrayLen(SESSION.WHSurveyStruct.pagesQuestions[curPage])#" index="curQuestion">
13 : <cfif (SESSION.WHSurveyStruct.pagesQuestions[curPage][curQuestion].SectionID eq 4 AND SESSION.WHSurveyStruct.AirlineID neq 0) <!--- Ask airline questions, if airline known --->
14 : OR (SESSION.WHSurveyStruct.pagesQuestions[curPage][curQuestion].SectionID neq 4