I am taking a subject at school which require us to use the Mozart Programming Interface. I do not really think much of it so far. But anyways, here is the question:
In OZ you are only allowed to assign a variable once (it can't be reassigned but redeclared in the current scope, if I am right?). I came across a problem where I want to use a boolean guard, but OZ wont let me. I have the current:
declare
BrowserObject = {New Browser.'class' init}
BrowserSetup = false
proc {Browse Bs}
if BrowserSetup == false then
{BrowserObject option(representation strings:true)}
{BrowserObject option(representation virtualStrings:true)}
BrowserSetup = true
end
{BrowserObject browse(Bs)}
end
Does anyone have any ideas of how to do this? Thanks for your time.