Home > Back-end >  If StrToInt (edit1. Text) in [56 we, HYU, 2 u3, 2 tp4] then... ?????
If StrToInt (edit1. Text) in [56 we, HYU, 2 u3, 2 tp4] then... ?????

Time:10-11

If StrToInt (edit1. Text) in [56 we, HYU, 2 u3, 2 tp4] then
Written as how to change, always display an error??????

CodePudding user response:

56 we, HYU, 2 u3, 2 tp4 is what? Inside the brackets only integer

CodePudding user response:

I want to put in the edit control is not the integer, letters or Numbers can be,

CodePudding user response:

First limited Edit1 input letters and Numbers only
Procedure TForm1. Edit1KeyPress (Sender: TObject; Var Key: Char);
The begin
If not (Key [in '0'... '9', 'a'. The 'z', 'a'. The 'z', # 8]) then
Key:=# 0;
end;

Then such a judgment
If StrToIntDef (Edit1. Text, 1) & gt; 1 then
ShowMessage (' can't enter the Numbers, but also the input letters');

CodePudding user response:

No, I mean if edit1 control is equal to the content of the 56 we, HYU, 2 u3, one of two tp4, is set up, otherwise,
How to write???????

CodePudding user response:

56 we [' ', 'HYU', '2 u3', '2 tp4'],, your mother call you home of a lot more grammar!

CodePudding user response:

Monopoly has given the answer, dizzy, this BBS pride,

CodePudding user response:

refer to 6th floor wallyhost1 response:
monopoly has given the answer, dizzy, this BBS pride,


I won't

CodePudding user response:

Monopoly???

CodePudding user response:

If StrUtils. IndexOfText (' aaa ', 'BBB',... ) & lt;> 1 then
  • Related