DELPHI 2010 > Consider using 'CharInSet' function in 'SysUtils' unit.

SysUtils单元里面的CharInSet函数替代你的key in [...]的代码

 
原来
 if not(key in ['0'..'9',#8]) then key:=#0;
改为
 if not(CharInSet(Key, ['0'..'9',#8]) then key:=#0;
好的代码像粥一样,都是用时间熬出来的
原文地址:https://www.cnblogs.com/jijm123/p/14245549.html