unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
type
tvowels=set of char;
var
vowels:tvowels;
begin
vowels:=['a','e','i','o','u'];
if edit1.text[1] in vowels then
lable2.Caption:='是元音';
else
lable2.Caption:='请再试';
end;end.
解决方案 »
- 定义类后不声明变量有影响吗
- 如何在delphi7中建立corba服务器?
- ODAC里oraQuery有类似ADOQuery的缓存更新模式吗?该怎么设置?
- 请问怎么给文件夹改名? 用什么 API 呀?
- PARAMETER字段中有“1,26,5,4,01,112,1”,请问如何以逗号作为分界,将1、26、5、4、01、112、1赋值给变量?
- 怪事!为什么try...except不工作?!
- 怎样用ADO连接Access数据库
- 有高分!!如何用QuickRep完成打印功能,是不是要和PrintDialog,PrinterSetupDialog结合起来??
- 请大家帮忙。我想用ctrl+上下左右键控制控件的位置,应如何处理。多谢了
- 怎样把菜单控件放在CoolBar上,请求帮助
- 关于TStringList的用法?
- 高分相送一道推理题:知道答案的人将是一个优秀的程序员(题目很短)
这几句报错,请大家指导一下,
type
tvowels=set of char;
var
vowels:tvowels;
begin
vowels:=['a','e','i','o','u'];
if edit1.text[1] in vowels then
lable2.Caption:='是元音'
else
lable2.Caption:='请再试';
end;
type
tvowels=set of char;
var
vowels:tvowels;
begin
vowels:=['a','e','i','o','u'];
if edit1.text[1] in vowels then
label2.Caption:='是元音'
else
label2.Caption:='请再试';
end;