simple example
Jorge Marques Pelizzoni
jorgemp at icmc.usp.br
Tue Jan 25 15:19:38 CET 2005
In the interactive mode all modules (for example, Browser) are implicitly
imported. But when you compile a program, it has to be wrapped up in a
_functor_ (= module specifying its dependencies and a few other things). So
example.oz should read:
functor
import
Browser(browse:Browse)
define
local X Y in
X = 5
Y = X * 2
{Browse [X Y]}
end
end
.. or even:
functor
import
Browser(browse:Browse)
define
X = 5
Y = X * 2
{Browse [X Y]}
end
The problem is that your program should end instantly. If you want it to block,
put something like this at the end:
{Wait _}
Cheers,
Jorge.
Quoting asu <asu at ritm.msk.ru>:
> In Mozart/EMacs:
> local X Y in
> X = 5
> Y = X * 2
> {Browse [X Y]}
> end
>
> Ok - output [5 10]
>
> (OS: Windows 2000 Pro)
> In file example.oz - command line - ozc -c example.oz -o example.oza
> Output: "...variable Browse not introduced..."
>
>
> Anton Orekhov.
>
>
>
>
_________________________________________________________________________________
> mozart-users mailing list
> mozart-users at ps.uni-sb.de
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
More information about the mozart-users
mailing list