Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!csun!csuna!abcscnuk From: abcscnuk@csuna.UUCP (Naoto Kimura) Newsgroups: comp.lang.pascal Subject: Re: Microsoft Pascal : Why does it still exist ? Message-ID: <1646@csuna.UUCP> Date: 3 Feb 89 23:51:53 GMT References: <2529@nunki.usc.edu> <8631@orstcs.CS.ORST.EDU> <4741@sfsup.UUCP> Reply-To: abcscnuk@csuna.UUCP (Naoto Kimura) Distribution: usa Organization: California State University, Northridge Lines: 43 In article <4741@sfsup.UUCP> dwd@/guestc/dwdUUCP (xt1121-D.W.Dougherty) writes: ]... (text deleted)... ]Pascal compiler. Borland has make lots of useful extensions to the ]language, but they have overlooked what I believe are the two most ]obvious extensions: ] ] 1) allowing functions to return user defined types If you happen to mean ennumerated types (which are ordinal types), I think that they are part of standard, not an extension. If I recall, I was able to return enumerated types in TP. If you're talking about returning record types, which is non-standard, they'll have to change how the return value is passed back. At present, Borland's TP uses AX register to pass back value. You'd need to use either the stack segment or some other segment to return the value. ] 2) functions and procedures as parameters to other ] functions or procedures Actually, procedural and functional parameters are part of standard. Borland has implemented something similar with "procedural types" in version 5. ]Of course, MS has done some pretty nasty things with their compiler; ]i.e., let's map identifiers to all upper-case (*WHY*)?? Actually, Standard Pascal is case-insensitive. Borland's Turbo Pascal will also ignore case. You should never rely on case to differentiate between identifiers. Nor should you rely on identifiers to be unique if they differ somewhere beyond the 8th character (this will vary with the implementation). One complaint that I have of TP is that it doesn't have get() or put(), nor does it implement page(), nor does it allow accessing file buffer, as in standard (I can probably do this by using the TextRec type, but that'll make my programs non-portable). //-n-\\ Naoto Kimura _____---=======---_____ (csun!csuna!abcscnuk) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !!