A ATY Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #1 if ( copy(currday,6,5) in ('03-31','06-30','09-30','12-31') ) then总是报错,是不是我的写法有问题
S szhcracker Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #2 你的写法不可以,in 一般用于数字型的判断,你改成if (copy(currday,6,5) in ['03-31','06-30','09-30','12-31']) then 试试
S szhcracker Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #3 如果不行你就这样: strcurrday := Copy(currday, 6, 5); if (strcurrday = '03-31') or (strcurrday = '06-30') or (strcurrday = '09-30') or (strcurrday = '12-31') then ...
如果不行你就这样: strcurrday := Copy(currday, 6, 5); if (strcurrday = '03-31') or (strcurrday = '06-30') or (strcurrday = '09-30') or (strcurrday = '12-31') then ...
A aahben Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #4 if (copy(currday,6,5)='03-31') or (copy(currday,6,5)='06-30') or (copy(currday,6,5)='09-30') or (copy(currday,6,5)='12-31') then
if (copy(currday,6,5)='03-31') or (copy(currday,6,5)='06-30') or (copy(currday,6,5)='09-30') or (copy(currday,6,5)='12-31') then
H hs-kill Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #5 这样: if pos(copy(currday,6,5)+'|','03-31|06-30|09-30|12-31|')>0 then
李 李翔鹏 Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #6 if (copy(currday,6,5) in ['03-31','06-30','09-30','12-31']) then
N nolliman Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #7 if (copy(currday,6,5) in ['03-31','06-30','09-30','12-31']) then
H hs-kill Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-07 #9 楼上几位..delphi从几开始集合可以支持字符串了???
叶 叶不归 Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-08 #10 楼上的楼上用什么版本???不是在忽悠我吧in只能用于byte和char类型,即0~255,或枚举、集合if 1 in [1,22] thenif 'a' in ['a','b'] thenif shift in tshifttype ...
楼上的楼上用什么版本???不是在忽悠我吧in只能用于byte和char类型,即0~255,或枚举、集合if 1 in [1,22] thenif 'a' in ['a','b'] thenif shift in tshifttype ...
W wql Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-08 #11 可以用啊,例如a:='3';if a in ['0'..'9'] then 可以了!
S szhcracker Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-08 #12 我用D7测试了一下,确实不能用(copy(currday,6,5) in ['03-31','06-30','09-30','12-31'])这种写法,看来只有老老实实的判断了。
H hs-kill Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-08 #13 这还用试,集合只支持有序类型,比如char byte boolean 枚举
T Tuatara Unregistered / Unconfirmed GUEST, unregistred user! 2009-01-08 #14 in ()里面的东东只能是0..255的整数或者对应ASCII码的字符或枚举值,但是其ORD()都不能超过255