W whitehorse Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-06 #1 怎样判断edit.text输入框里是数字或其它数据类型(不使用editmask)
W wjiachun Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-06 #2 try inttostr(edit1.text) except showmessage('不是整数') end;
L leo_aj Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-06 #3 use as operator, you can see help to find how to use as. check what 's type of you x:= edit.textX as integer;
use as operator, you can see help to find how to use as. check what 's type of you x:= edit.textX as integer;
小 小刚 Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-06 #4 我是这么处理的: var Nmb:Integer; …… Nmb := StrToIntDef(Edit1.Text, 1010110452); If Nmb=1010110452 Then showmessage('不是整数');
我是这么处理的: var Nmb:Integer; …… Nmb := StrToIntDef(Edit1.Text, 1010110452); If Nmb=1010110452 Then showmessage('不是整数');
H hhzh426 Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-06 #5 try StrToFloat(edit1.text) except message(handle,'请输入数字!','程序提示',MB_OK); end;