I attempted to follow those instructions, and looked for other
mailist replies, but am still unable to create a working "hello
world" program which works in both command-line and in the OPI.

Based on that FAQ, I created this:
%% ozc -x hello.oz
%% ./hello
declare
functor Foo
import
  System Application
define
  {System.showInfo 'hello world'}
  {Application.exit 0}
end
[FooModule] = {Module.apply [Foo]} 


which dies in the OPI with a
  Process *Oz Compiler* connection broken by remote peer


OTOH, I've now discovered that I don't need to use the OPI to use
the Browser and Explorer, so I might abandon the OPI entirely and
only use command-line programs... in which case the answer to this
question doesn't matter.  However, it would be nice if there was a
complete, working, "hello world" example somewhere.

Cheers,
- Graham

On Fri, 14 Mar 2008 19:09:55 -0600
"Robert Van Dam" <[EMAIL PROTECTED]> wrote:

> Here's the succinctest answer I know of:
> 
> http://www.vendian.org/oz/wiki/index.cgi?FAQ#Compiler_error_illegal_use_of_nesting_marker_at_the_top_of_a_functor
> 
> On 3/13/08, Graham Percival <[EMAIL PROTECTED]> wrote:
> >
> > Greetings,
> >
> > I've used Oz for a few months in the OPI, but now I'm trying to
> > generate stand-alone programs so I can start them with scripts.
> > This code works fine:
> >
> > %% ozc -x hello.oz
> > %% ./hello
> > functor
> > import
> >   System Application
> > define
> >   {System.showInfo 'hello world'}
> >   {Application.exit 0}
> > end
> >
> >
> > However, when I run the code with
> >   ozc -e hello.oz
> > I get this message:
> > Mozart Compiler 1.3.2 (20071210) playing Oz 3
> >
> > %%% feeding file hello.oz
> >
> > %************************* expansion error **********************
> > %**
> > %** illegal use of nesting marker
> > %**
> > %** in file "./hello.oz", line 4, column 0
> > %** ------------------ rejected (1 error)
> >
> >
> > What's the diffence between "-e" and "-x followed by ./filename" ?
> > And more to the point, what's the illegal nesting marker?  What's
> > the proper way to create "hello world" ?
> >
> > Cheers,
> > - Graham
> >
> > _________________________________________________________________________________
> > mozart-users mailing list
> > [email protected]
> > http://www.mozart-oz.org/mailman/listinfo/mozart-users
> >
> 
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to