WinAPI字符及字符串函数(6):IsCharAlphaNumeric
interface
使用
窗口、消息、系统工具、变量、类、图形、控件、表单、
对话框、StdCtrls
type
t form 1 = class(t form)
button 1:t button;
button 2:t button;
button 3:t button;
button 4:t button;
button 5:TButton;
过程按钮1Click(发件人:to object);
过程按钮2 click(Sender:to object);
过程按钮3 click(Sender:to object);
过程button 4 click(Sender:to object);
过程按钮5Click(发件人:to object);
end;
var
form 1:t form 1;
实现
{$R *。dfm}
过程TForm1。Button1Click(发件人:to object);
var//exmoda
c:Char;
b:BOOL;
begin
c:= # 65;{ A }
b:= ischalphanumeric(c);
ShowMessage(BoolToStr(b,True));{ True }
end;
过程TForm1。Button2Click(发送方:to object);
var
c:Char;
b:BOOL;
begin
c:= # 97;{ a }
b:= ischalphanumeric(c);
ShowMessage(BoolToStr(b,True));{ True }
end;
过程TForm1。Button3Click(发送方:to object);
var
c:Char;
b:BOOL;
begin
c:= # 48;{ 0 }
b:= ischalphanumeric(c);
ShowMessage(BoolToStr(b,True));{ True }
end;
过程TForm1。Button4Click(发送方:to object);
var
c:Char;
b:BOOL;
begin
c:= # 13;{ Enter key }
b:= ischalphanumeric(c);
ShowMessage(BoolToStr(b,True));{ False }
end;
过程TForm1。Button5Click(发件人:to object);
var
c:wide char;
b:BOOL;
begin
c:= # 19975;{万}
b:= ischalphanumeric(c);
ShowMessage(BoolToStr(b,True));{ True }
end;
结束。
0条评论