弱智问题~type
书上有这么一段代码:
unit unit1;
interface
uses .....;
const
width=30;....
type
tdirect=(none,mbup,mbdown);//这里为什么可以不用加end
type
TPosition=record
x:byte;
y:byte;
end;//或者这里为什么需要加
type
Tmoving=record
value:byte;
direct:Tdirect;
end;//同样
type
Tglasssh=array[1..width,1..height] of Tmoving;//又没有了
var
gamap[1..2] of tglasssh;
type
tform1=class(Tform)
....
end.
我查了半天书也没找到到底是什么时候该用end。我这么写运行时候总是出错,提示缺少;或end.还提示X...的出错。搞不懂,请帮忙~`~