用户输入控制仍不理想
ahu 2000-01-24 05:27:00 刚才已按各高手的指点去做,但实际情况不理想。
用key in ['0'..'9']程序报错(type incompatible,word and char),改用key in [48..57](0到9的ascii码),但在输入时每按backspace键一次就提示一次,很烦。能不能在keyexit事件中判断一
下输入的是否为数值型(类似其他语言中isnumber这种函数)。strtoint好像不是最理想的,if strtoint(edit1.text)=0不允许!
盼指教!!