枚举使用:
color = pred(color);
color = succ(color); // 如何得到color的名字?集合使用:
var
abc: set of '0'..'9';
begin
if not (key in abc) then
key := #0;
end;集合和枚举有什么区别,什么时候使用集合,何时使用枚举?
color = pred(color);
color = succ(color); // 如何得到color的名字?集合使用:
var
abc: set of '0'..'9';
begin
if not (key in abc) then
key := #0;
end;集合和枚举有什么区别,什么时候使用集合,何时使用枚举?
解决方案 »
- adoQuery编辑视图计算列
- toolbar控件做了个工具栏,怎么去掉按钮的立体效果?
- 100分,存储过程参数传递问题!
- 怎么把固定的txt文本转换成access数据呢,请进,内详!
- 大家帮帮忙!!!
- CSDN改版后不好,请大家到这里暂聚:http://delphi8013.xilubbs.com/
- 比比谁的单条SQL语句最长。先看我的:
- 新手求教!简单查询语句,查不出来结果!!!!!好急!
- delphi 6 重大bug发布!!!!!!!!
- 今天谁还在工作散分了
- 难题:自己做的下拉框控件TPopupEdit,下拉框获得焦点时其他控件无法再获得焦点?
- 能否在不用数据组件的情况下,在程序中嵌入SQL语句?
type
Season = (spring, summer, autumn, winter );
上面的season类型的值:spring \ summer \ autumn \ winter 默认有一个顺序关系,分别是0、1、2、3,当然也可以自己给他指定顺序,例如
type
Season = (spring=3, summer=6, autumn=25, winter );
此时顺序就是后面的值,而winter默认是26。在同一个program中同一个值不能被定义到两个不同的每局类型中。
----------------------------
集合就简单的多了
type setEx= set of boolean;
就表示一个boolean类型的集合,取值只能在True和False之间选区。
一个set可以在使用过程中增加或者删除变量
include
exclude
来操作...