Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: torbenm@diku.dk (Torben Ægidius Mogensen) Newsgroups: comp.compilers Subject: Re: Language Design Date: Mon, 08 Aug 2011 16:11:05 +0200 Organization: SunSITE.dk - Supporting Open source Lines: 26 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <11-08-009@comp.compilers> References: <11-07-027@comp.compilers> <11-07-038@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: gal.iecc.com 1312840726 13339 64.57.183.58 (8 Aug 2011 21:58:46 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Mon, 8 Aug 2011 21:58:46 +0000 (UTC) Keywords: design, Pascal, history Posted-Date: 08 Aug 2011 17:58:46 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:226 Gene writes: > The old Turbo Pascal 2.0 dialect was pretty remarkable. There was a > version for Z80 (CP/M) and 8086 (MSDOS). I think the whole compiler > was only 50K or so. [...] > Pascal is also straightforward to compile, especially if you don't > allow nested functions/procedures (although Turbo did). Turbo Pascal used shallow binding, which makes nested procedures relatively simple to implement, though it made reference parameters behave in a non-standard way. With shallow binding, each variable name has its own global memory address. When you during execution pass a variable declaration, you stack the current value of the variable and set the new value according to the declaration. When you exit the scope of the declaration, you restore the old value from the stack. IIRC, later versions of Turbo Pascal changed this to be more standard compliant (i.e., by using deep binding). Torben