关于栈(stack)的实现: 需要指向栈顶的变量top,一个数组为存储数据的空间。
type stack = record top: integer; data: array [1..SIZE] of ElementType; end;