10.6
10.6.1
Pascal TheAnswer
TheAnswer := GetTheAnswer; TheAnswer
OtherAnswer := GetOldAnswer; GetOtherAnswer TheAnswer
AverageAnswer := (TheAnswer + OtherAnswer )/2; AverageAnswer
GetOtherAnswer TheAnswer
GetOtherAnswer TheAnswer
Pascal :
Procedure WriteGlobal (VAR InputVar:Integer);
begin
Globa1Var := InputVar + 1
Writeln( 'InputVariable:', InputVar)
writeln( 'GlobalVariable:', Globe1Var)
end
WriteGlobel GlobalVar
WriteGlobal InputVar 1 GlobalVar GlobalVar InputVar l