On 1/18/06, Emilio Duarte Garcia <[EMAIL PROTECTED]> wrote:
> Hi.
>
> How I can execute a file foo.oz from console (unix terminal) without run
> emacs?
> What commands exactly I need to execute from console?
>
> for example I have the file simple.oz:
>
> -------- begin simple.oz ---------
> declare X Y Z
> local
> X :: 0#13
> Y :: 1#4
> Z :: 2#3
> {FD.plus X Y Z}
> in
> {Browse [X Y Z]}
> end
> --------- end simple.oz ----------
>
> I want to run simple.oz for trace the execution in the emulator.exe with
> gdb or ddd (data display debugger)
>
> How I can debug or trace the execution of simple.oz inside the emulator.exe?
>
> Thanks in advance.
>
> Emilio Duarte Garcia.
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
You would have to define a functor:
functor
import
Application(exit)
System(show)
FD(plus)
define
X Y Z
X :: 0#13
Y :: 1#4
Z :: 2#3
{FD.plus X Y Z}
in
{System.show [X Y Z]}
{Application.exit 0}
end
Then, you can compile it with ozc -c or -x to execute from the terminal.
>From this point I don't know how to invoke the emulator with the functor !
Sorry,
--
Andrés
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users