chenchuk
chenchuk

Reputation: 5742

Return from a function in Pascal

Giving the following function in Pascal where GetChar is another function. How is GetChar executed after the function returns with the := operator?

function GetNum: char;
begin
   GetNum := Look;
   GetChar;
end;

Upvotes: 1

Views: 882

Answers (1)

vollitwr
vollitwr

Reputation: 439

The assignment in Pascal doesn't return, it is just an assignment. So GetChar will be executed.

Upvotes: 5

Related Questions