作者 Michael Lei STAFF 关注 问题 Michael Lei · 五月 18, 2022 如何区别参数是纯numeric string 还是number,比如 "123" 和 "123". #Caché #部署 Hi,大家好。 我想知道如何区分一个变量是纯数字字符串还是一个数字,比如 "123 "和 "123"。 我只知道一个笨方法。 ClassMethod IsNumber(n) { s ret=0try{ s ret= $lb(n)=$lb(+n) }catch e{ s ret=0 } q ret }欢迎大家指教 Product version: Caché 2016.1 讨论 (1)0 登录或注册以继续 添加回复 Comments Michael Lei · 五月 18, 2022 答案参见英文社区:https://community.intersystems.com/post/how-distinguish-whether-variabl…
Michael Lei · 五月 18, 2022 答案参见英文社区:https://community.intersystems.com/post/how-distinguish-whether-variabl…