Greetings,

I'd hoped to not have to post a query about a syntax-related problem, but,
alas, here is one which has me stumped. The following code [packaged as a
single '.oz' file]:

    functor
    import
        System Application
    define
        fun {TestCount}
            local Count in
                Count = {NewCell 0}
                Count := @Count + 1
                @Count
            end
        end
    in
        {System.printInfo "\n"#{TestCount}}
        {Application.exit 0}
    end

fails to compile, issuing the following diagnostics:

Mozart Compiler 1.2.5 (20030214) playing Oz 3

%%% feeding file cell2.oz

%************************** syntax error ******
%**
%** expected dot expression to the left of :=
%**
%** in file "./cell2.oz", line 8, column 22

%************************* expansion error ****
%**
%** attribute access used outside of method
%**
%** in file "./cell2.oz", line 8, column 25

%************************* expansion error ****
%**
%** attribute access used outside of method
%**
%** in file "./cell2.oz", line 9, column 16
%** ------------------ rejected (3 errors)

Now, to be quite honest, I don't see the error in the code ! What could I
have missed, or done wrong ?

Cheers,

Anthony Borla

P.S.

If this is not the appropriate forum for such queries [I suspect that it
isn't, but am not aware of any other Oz-language forums, so have little
choice but to post here] could I please be directed to the appropriate one ?


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to