making a calculator using records, pointers and links.

hey, im trying to work with records and pointers. i have to make a calculator that will calculator any question that i input. the trouble im having is that i dont' know how to find doing the calculation part. i have the equation down, but now im stuck on how to start the calculation. thanks for the help. bye

program pointers6a (input, output);

type
onepoint = ^one;
one = record
numb : integer; {the number in the equation}
oper : char; {the operator in the equation}
next : onepoint; {move to the next node}
end;

const space = ' ';

var
p1, {first numbers for the equation}
p2, {second numbers for the equation}
start, {beginning of the node}
tail {end of node}
: onepoint;
temp : integer;
num {true or false}
: boolean;

procedure printlist (p1 : onepoint);
{*******************************************************************
***********
purpose:to display the original equation on the screen for user to v
iew.
input:the equation in which the user types in.
output:the equation of what the user has typed in.
********************************************************************
**********}
begin
while (p1 <> tail) do
begin
if(p1^.numb > 0) and (p1^.numb < 1000) then
write (p1^.numb);
if(p1^.oper in['+', '-', '*', '/']) then
write(p1^.oper);
p1:=p1^.next;
end;
end; { printlist }

begin {main program}
num := true;
new(start);
start^.numb := temp;
start^.oper:= space;
start^.next:=nil;
tail:= start; {set tail to the beginning}
p1:= start; {set p1 to the beginning}
p2:= start; {set p2 to the beginning}

while (tail^.oper <> '=') do
begin
new(p1);
p1^.next := nil;
if (num) then
begin
p1^.numb:=0;
num:= false;
end
else
begin