Re: Language Design (Torben Ęgidius Mogensen)
Mon, 08 Aug 2011 16:11:05 +0200

          From comp.compilers

Related articles
[6 earlier articles]
Re: Language Design (Christophe de Dinechin) (2011-07-23)
Re: Language Design (Oleg Sesov) (2011-07-23)
Re: Language Design (Gene) (2011-07-26)
Re: Language Design (tm) (2011-07-27)
Re: Language Design (Roberto Waltman) (2011-07-28)
Re: Language Design ( (2011-08-04)
Re: Language Design (2011-08-08)
Language design David.Chase@Eng.Sun.COM (1991-09-04)
| List of all articles for this month |

From: (Torben Ęgidius Mogensen)
Newsgroups: comp.compilers
Date: Mon, 08 Aug 2011 16:11:05 +0200
Organization: - Supporting Open source
References: 11-07-027 11-07-038
Keywords: design, Pascal, history
Posted-Date: 08 Aug 2011 17:58:46 EDT

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).


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.