const Digits: array[0..9] of Char = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');declares a typed constant called Digits that holds an array of characters. Zero-based character arrays often represent null-terminated strings, and for this reason string constants can be used to initialize character arrays. So the declaration above can be more conveniently represented asconst Digits: array[0..9] of Char = '0123456789';To define a multidimensional array constant, enclose the values of each dimension in a separate set of parentheses, separated by commas. For example,type TCube = array[0..1, 0..1, 0..1] of Integer;const Maze: TCube = (((0, 1), (2, 3)), ((4, 5), (6,7)));creates an array called Maze whereMaze[0,0,0] = 0Maze[0,0,1] = 1 Maze[0,1,0] = 2 Maze[0,1,1] = 3 Maze[1,0,0] = 4 Maze[1,0,1] = 5 Maze[1,1,0] = 6 Maze[1,1,1] = 7
mybutton:array[1..10] of tbutton; 控件组例子
type ary:array[1..3] of integer;//定义类型 var ary1:ary;//声明变量
Zero-based character arrays often represent null-terminated strings, and for this reason string constants can be used to initialize character arrays. So the declaration above can be more conveniently represented asconst Digits: array[0..9] of Char = '0123456789';To define a multidimensional array constant, enclose the values of each dimension in a separate set of parentheses, separated by commas. For example,type TCube = array[0..1, 0..1, 0..1] of Integer;const Maze: TCube = (((0, 1), (2, 3)), ((4, 5), (6,7)));creates an array called Maze whereMaze[0,0,0] = 0Maze[0,0,1] = 1
Maze[0,1,0] = 2
Maze[0,1,1] = 3
Maze[1,0,0] = 4
Maze[1,0,1] = 5
Maze[1,1,0] = 6
Maze[1,1,1] = 7
控件组例子
var ary1:ary;//声明变量