vbscript - 经典 ASP:无法从函数返回 False,我收到类型不匹配错误
问题描述
' Determines if a file contains any of an array of lines.
' Case insensitive comparison.
Function DoesFileContainAnyLine(filename, lines)
Dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists(filename) Then
set f = fs.OpenTextFile(filename, 1, true)
Do Until f.AtEndOfStream
Dim line
line = f.ReadLine
For Each needle in lines
if LCase(Trim(needle)) = LCase(Trim(line)) Then
return true
end if
Next
Loop
End If
Return False
End Function
我在线上收到类型不匹配错误Return False
;为什么我不能从函数中返回 false?
解决方案
推荐阅读
- python - Django - 如何创建一个包含自己类型集合的模型?
- javascript - 从 Javascript 将原始 ZPL 和 EPL 发送到打印机
- node.js - Meteor 默认 http 身份验证
- r - 在 R 中随时间平均
- jpa - 如何在 WebSphere Liberty 上将 H2 数据库与 JPA 一起使用
- python-3.x - website_sale控制器Odoo 11上“pdf,_ =”的含义
- android - 无法获取消息字符串中标识的链接以及 TextView 中的链接预览
- php - PHP简单的html dom file_get_html如何在div之后提取/中断
- r - 如何根据表中的值对 xtab 的暗名进行分组和变异?
- php - PHP 7.2:每个都已弃用。如何转换这些示例?