Related articles |
---|
[6 earlier articles] |
Re: Language Design christophe.de.dinechin@gmail.com (Christophe de Dinechin) (2011-07-23) |
Re: Language Design osesov@gmail.com (Oleg Sesov) (2011-07-23) |
Re: Language Design gene.ressler@gmail.com (Gene) (2011-07-26) |
Re: Language Design thomas.mertes@gmx.at (tm) (2011-07-27) |
Re: Language Design usenet@rwaltman.com (Roberto Waltman) (2011-07-28) |
Re: Language Design s_dubrovich@yahoo.com (s_dubrovich@yahoo.com) (2011-08-04) |
Re: Language Design torbenm@diku.dk (2011-08-08) |
Language design David.Chase@Eng.Sun.COM (1991-09-04) |
From: | torbenm@diku.dk (Torben Ęgidius Mogensen) |
Newsgroups: | comp.compilers |
Date: | Mon, 08 Aug 2011 16:11:05 +0200 |
Organization: | SunSITE.dk - Supporting Open source |
References: | 11-07-027 11-07-038 |
Keywords: | design, Pascal, history |
Posted-Date: | 08 Aug 2011 17:58:46 EDT |
Gene <gene.ressler@gmail.com> 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
Return to the
comp.compilers page.
Search the
comp.compilers archives again.