On 2011 Apr 12, at 6:41 AM, Gene Buckle wrote:
On Mon, 11 Apr 2011, Chris M wrote:
> I'll assume Quick C could be used to write
Quick
Basic, but what about the other way around?
Quick C and QB were _completely_ different
product lines
and languages.
Is this so hard to grasp? Could you write a compiler "on the level"
of Quick Basic w/QC? That's what I'm asking. I'll wager some type of
C compiler was used to write most of what's out there. In the case of
Quick Basic, possibly even a M$ product. Could it have been done
w/QC? Perhaps I threw some people off when I started out mentioning
Pascal, it having it's own way of storing data. May not be the first
choice when endeavoring to write a compiler (though even at least
early versions of Turbo C used pascal conventions), but were any of
these tools up to the task?
Oh for...
Look, when you write, "I'll assume Quick C could be used to write
Quick Basic" that says to pretty much everyone that reads it that
you're asking if you can write QB code in QC. You never mentioned
writing a compiler.
Actually, while I can see people interpreting it as you suggest, I
first interpreted Chris's statement the way he intended it, but maybe
I'm not pretty much everyone. Perhaps it depends on what 'world' one
comes from, e.g. applications vs. systems/languages.
If you want to write a compiler that will generate
code that QB45 can
_link_ to, you'd need to use something that emitted a compatible
binary format. I _think_ it used COFF. Borland compilers used a
different binary format which made it (nearly?) impossible to link
against libraries that were compiled with Microsoft products.
If you wanted to write a QB45 _like_ compiler, then your choice of
host compiler really doesn't matter. Hell, you could use Lua if you
wanted.