Path: utzoo!attcan!uunet!lll-winken!ames!sgi!andru@rhialto.SGI.COM From: andru@rhialto.SGI.COM (Andrew Myers) Newsgroups: comp.lang.pascal Subject: Re: function returning a record? Summary: ANSI compatibility Message-ID: <27716@sgi.SGI.COM> Date: 1 Mar 89 04:40:37 GMT References: <2012@pur-phy> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 19 In article <2012@pur-phy>, murphy@pur-phy (William J. Murphy) writes: > > I was trying to program a function yesterday similar to the following: [program excised] > > I found out that Turbo Pascal 5.0 does not support returning a record as a > value. Does this imply that a function can only return a single value? > Is there any way to get a function to return a record? > Any help would be appreciated. I will in the mean-time write this with > pointers. This is actually in accordance with ANSI Standard Pascal, which specifies that function return values may *only* be simple types (integer,reals,chars,booleans), enumerated types, or pointer types. Basically, anything that fits in a word, and isn't a record. Whether this is a change from TP3,4 I don't know. If you want your Pascal programs to be portable, don't use record types for return values! Andrew