Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...What a great service! This is the best site I've ever seen!!! It totally restores my faith in humanity when people take time out to help other people..."

Geography

Where in the world do Tek-Tips members come from?

IMPORTANT: Counter Class Not Compilling

nvidia1234 (Programmer)
6 Jan 08 13:03
Hi i am very new to Eiffel but what i am doing is trying to write a COUNTER class, when i try to compile this it gives the following error
"

Error code: VD27
Configuration error: There is an inconsistency between the Root clause
  of the ecf file and the creation clause of the system's root
  class
What to do:
  1) If the system's root class has a creation procedure: make
     sure that the name listed in the Root clause is that of a
     feature which is a creation procedure of the root class
  2) If the system's root class does not have a creation procedure:
     make sure that that the Root clause does not list a creation
     procedure.
Root class: COUNTER
Invalid procedure name: value "

The code i am using for this is:



indexing
    description    : "System's root class"
    date: "$Date$"
    revision: "$Revision$"

class
    COUNTER
feature -- Initialization

     value : INTEGER

    increment is
    do
        value := value + 1
    end


end -- class COUNTER

The code has been taken from a book but can somebody tell me why this occurs. It read that this class does not have a creation procedure: the Eiffel rules ensure that the value attribute will be initialized to 0, as required.  Can somebdody tell me why this is still giving me erros.
JocelynF (Programmer)
20 Feb 08 6:44
You need to precise the root class and the creation routine of your system.

That is to say, the main entry point.
you can have for instance

class
    APPLICATION
create
    make

feature -- Initialization
    make is
        -- Instanciate application
      local
         c: COUNTER
      do
         create c
         c.increment
         c.increment
         c.increment
         io.put_string ("c=")
         io.put_integer (c.value)
         io.put_new_line
      end
end

Hope this helps.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close