Torsten Anders wrote:
Dear Mark,
just in case you haven't noticed this already: you can call create and
call a Mozart compiler within a Mozart application without resorting
to the command line tools. In fact, it is more efficient to do so if
you want to call the compiler repeatedly.
Here is a small scale example where a virtual string of Oz code is
compiled and executed by a user-created compiler.
declare
MyOzCode = "local X=3 in X+X end"
{Browse {Compiler.virtualStringToValue MyOzCode}}
Hi, I can see that working but what if MyOzCode="{Browse 1+2}" for
example - that doesn't work!? I tried using Browser.browse, feeding a
module link first, but that doesn't work either.
The definition of VirtualStringToValue can serve as an example how to
create an use a compiler.
The compiler API reference doc is here:
http://www.mozart-oz.org/documentation/compiler/node4.html
Best
Torsten
I've read the documentation, tried some simple tests (most of which
wouldn't work!) and got only slightly less confused than when I first
looked at Peter Van Roy's book. I don't class myself as a newbie, I can
manage a QTk N-queens solution using FD constraints but I'm obviously
not an expert ;+) and I think I've said before that if you don't have a
*very* good idea what you're reading, a lot of the documentation can be
confusing. (And the confusion is usually over very small points of
syntax!).
The only reason I even started this is because I like buttons over
key-combinations. I'm not trying to be clever with my program, all I'm
trying to get is basically a notepad application with a
do-what-Emacs-does feed-buffer button. (At least to start with - I
actually want a compile then execute button for standalone apps
eventually :+) )
Any help would be greatly appreciated!
Regards
Mark
--
Mark Richardson
Final Year Undergraduate
University of Teesside, UK
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users