if语句的坑
或者说是powerscript设计上的不完善或者是编译器的bug:
if key = keyEscape! and keyEscape() = 1 then return //这个return永远不会执行,因为第二个条件处不能是一个函数?
string s1,s2,s3
s1='hello world'
setnull(s2)
setnull(s3)
if s1 <> s2 then return //这个return也永远不会执行,因为null和任何非null值比较都返回null?
if s2 = s3 then return //这个return是会执行的,因为null和null比较又相等了?
很多年不用pb了,其他语言代码写多了,早已忘了pb还有这些坑,版本号都到2017了,也没见修复下