Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6533463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:07:48+00:00 2026-05-25T10:07:48+00:00

I am taking a subject at school which require us to use the Mozart

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:07:49+00:00Added an answer on May 25, 2026 at 10:07 am

    There are many ways to do this.

    The easiest is to setup the browser object right after creating it. No need for a guard.

    If you want to use a mutable variable, look at cells. For example:

    BrowserSetup = {NewCell false}
    ...
    if @BrowserSetup == false ...
    BrowserSetup := true
    

    However, this is not thread-safe, i.e. it is a problem if you use the Browse procedure from multiple threads.

    The best way would probably be to use lazy initialization for BrowserObject, i.e. create and initialize it only when it is used the first time. Take a look at the documentation for “Value.byNeed” if you want to use this.

    I recommend to give the language a chance. It is quite different from most languages and you will probably never use it “in the real world”. But there is a lot to learn, and more and more concepts of research languages find their way into mainstream languages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using PHPMailer but I think it's taking too many lines and feel
Okay, so far, I have been taking computer science courses in my high school
I think I might be missing something, but I can't see how to use
Taking advice from this post , I purchased a copy of 'The C Programming
Recently a teacher said PHP isn't a real programming language, but only gave, in
Been reading a bit about the subject, and out of curiosity, online games which
I have to make a SQL statement which is taking values from three tables
I really like to study algorithms and optimize code (I try not to do
Here's my table: dbo.Posts PostId (IDENTITY, PK) Subject UniqueUri (NVARCHAR(350), NOT NULL) When i
I'm sorry if this subject has already been answered, but I couldn't find what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.