Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!usc!polyslo!vlsi3b15!lehi3b15!edkay From: edkay@lehi3b15.csee.Lehigh.EDU (Ed Kay) Newsgroups: comp.lang.pascal Subject: Funny evaluation of functions Keywords: functions, precedence Message-ID: <614@lehi3b15.csee.Lehigh.EDU> Date: 23 Aug 89 15:50:10 GMT Organization: CSEE Dept. Lehigh University, Bethlehem, PA Lines: 20 The following code produces 25 as output in Turbo Pascal 4.0. Can anyone explain what is going on? var y:integer; Function one(var x:integer):integer; begin x:=x+1; one:=x; end; begin y:=4; writeln(output,y*one(y)); end. Edwin J. Kay CSEE Lehigh University