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 8390497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:00:20+00:00 2026-06-09T19:00:20+00:00

I have a question concerning constants in eiffel. Well it’s just a semantic issue

  • 0

I have a question concerning constants in eiffel. Well it’s just a semantic issue but it has been bugging me for some time now and I just don’t understand the concept of this speciality.

For a normal assignment you use := which makes total sense in a mathematical thinking because it’s the mathematical sign for an assignment

But if we look at the definition of a constant:

feature
    some_constant: INTEGER = 5

I just don’t see why we use the equality sign there. Is there a certain reason? I would understand it the following way: We assign the value 5 to the constant but then why the boolean expression?

I hope someone can explain the concept behind this

  • 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-06-09T19:00:22+00:00Added an answer on June 9, 2026 at 7:00 pm

    You have to treat the = sign as a quick contract for the constant feature.

    foo: INTEGER = 5
    

    would be identical to

    foo: INTEGER
      ensure
        Result = 5
    

    Note that this is a recent syntax change, before it used to be

    foo: INTEGER is 5
    

    but the Eiffel specification dropped the is keyword altogether.

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

Sidebar

Related Questions

I have a question concerning floating constants in C. In Java, the default type
I know a lot of question regarding VB6 migration have been asked, but I
I've been reading Design Patterns, by Gamma et al. I have a question concerning
I've been reading through a nice tutorial and have a quick question concerning something
I have a question concerning dependency injection. I have been keeping it simple so
I have some question concerning dllexport, dllimport in C++ in Windows. Let's assume I
I have an ASP.NET web app I'm developing but I have a question concerning
I have a question concerning seekbars. I tried several things but nothing helped. I
I have a question concerning Hibernate 3.6.7 and JPA 2.0. Consider following entities (some
I have question concerning a function I created. I would like to show the

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.