delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/31/10:28:37

Sender: crough45 AT amc DOT de
Message-Id: <97May31.162051gmt+0100.16641@internet01.amc.de>
Date: Sat, 31 May 1997 15:24:48 +0100
From: Chris Croughton <crough45 AT amc DOT de>
Mime-Version: 1.0
To: adalee AT sendit DOT sendit DOT nodak DOT edu
Cc: djgpp AT delorie DOT com
Subject: RE: Demos (Was How the Quake source got out)

Adam wrote:

>I guess we have different definitions on interpretation...  Well, maybe I
>should just be more specific...  BASIC is considered an interpreted
>language, in that it interprets the actual code that you write, it doesn't
>compile it into something else first...  That's how interpreted languages
>work...  QuakeC is parsed and compiled into something that is, for all
>intentive purposes, illegible to the standard human.

No BASIC is a language.  There are interpreters, compilers and compiler/
interpreters for it.  The Sinclair ZX80/81 had an implementation of
BASIC 
where the keywords were converted into single bytes which were then 
interpreted.  I believe M$ Visual Basic does the same.  In fact there 
are probably more BASIC systems which "semi-compile" the code and then 
interpret that than there are 'true' interpreters.  Try storing a VB
program, not in text mode, and see how intelligible it is.

For that matter, many implementations of Pascal compile to p-code, which
is then interpreted (i.e. it's not the native code of the host machine).
Several versions of C do something similar.  BCPL (a predecessor of C)
was distributed as a compiler written in its intermediate code (Ocode),
which then meant that you only had to write a fairly simple Ocode 
interpreter to port it.

Where I'm working at the moment we're using a C interpreter for
debugging.
You can type C statements at it in realtime and it will run them, or
write functions at realtime.

Interpretation and compilation are not features of a language, they are
features of the implementation (there may be exceptions, Lisp for
example,
but I remember at one time there was talk of a Lisp machine which would 
execute it directly, without any compilation).

Chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019