## 子界 转

涂孟超

``````//定义
type
Ten = 1..10;
OverHundred = 100..1000;
Uppercase = 'A'..'Z';
//TMonth = Jan..Dec;

//应用
var
UppLetter: UpperCase;
begin
UppLetter := 'F';

//判断是否属于子界范围
var
i: Integer;
begin
i := 1;
if i in [0..10] then
ShowMessage('i 大于0、小于10');
end;

//根据枚举定义子界
type
TColors = (Red,Blue,Green,Yellow,Orange,Purple,White,Black);
TMyColors = Blue..Yellow;
var
MyColor: TMyColors;
begin
MyColor := Blue;
ShowMessage(IntToStr(Ord(MyColor)));  //1
end;

//遍历子界
var
character: 'a' .. 'z';
s: string;
begin
for character in [Low(character) .. High(character)] do
begin
s := s + character;
end;
ShowMessage(s);  //abcdefghijklmnopqrstuvwxyz
end;

``````

### 涂孟超

Q907 Sum of Subarray Minimums

Given an array of integers A, find the sum of min(B), where B ranges over every (contiguous) subarray of A. Since the answer may be large, return the answer modulo 10^9 + 7. Exa......

09/26
0
0

2010/01/03
0
0

迭代子模式又叫游标(Cursor)模式，是对象的行为模式。迭代子模式可以顺序地访问一个聚集中的元素而不必暴露聚集的内部表象（internal representation）。 聚集和JAVA聚集 　　多个对象聚...

2016/08/23
8
0

08/05
0
0
iOS Debuger（便捷辅助调试器）

WHC
10/30
0
0

OSChina 周六乱弹 —— 你一口我一口多咬一口是小狗

Osc乱弹歌单（2018）请戳（这里） 【今日歌曲】 @达尔文 ：分享Roy Orbison的单曲《She's a Mystery to Me》 《She's a Mystery to Me》- Roy Orbison 手机党少年们想听歌，请使劲儿戳（这里...

59分钟前
11
3
Spring源码学习笔记-1-Resource

zypy333

12
0
RestClientUtil和ConfigRestClientUtil区别说明

RestClientUtil directly executes the DSL defined in the code. ConfigRestClientUtil gets the DSL defined in the configuration file by the DSL name and executes it. RestClientUtil......

bboss

19
0

2
0
Linux系统设置全局的默认网络代理

13
0