Оптимальні програми
Top:=0;
End;
Procedure Push(Number:Real);
Begin
Inc(Top);
S[Top]:=Number;
End;
Procedure Pop(Var Number:Real);
Begin
Number:=S[Top];
Dec(Top);
End;
Function IsEmpty:Boolean;
Begin
If Top=0 Then IsEmpty:=True Else IsEmpty:=False;
End;
Begin
Top:=0;
End.
Текст програми:
Uses Crt, Stack;
Type Id=Record
c:Char;
v:Real;
End;