simple example

asu asu at ritm.msk.ru
Tue Jan 25 16:49:23 CET 2005


 Thanks! :-)

Anton



Jorge Marques Pelizzoni:

>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>:
>  
>





More information about the mozart-users mailing list