0

I am a beginner in Eiffel programming and I just try to create variable and I get an error,heres my code:

class
    APPL
create
    make
        local         
            v1:BOOLEAN
            v2:BOOLEAN
            v3:BOOLEAN

        do
            io.putstring ("test")
        end

end

I keep getting a "syntax error" on the "local" word...without any details.I'm pretty sure its something really stupid but cant manage to find it.Thank you!

Phil_oneil
  • 267
  • 3
  • 11

1 Answers1

2

The create clause only lists the names of the features that are considered constructors. You need to implement them in the feature clause:

class
    APPL

create
    make

feature
    make
        local         
            v1: BOOLEAN
            v2: BOOLEAN
            v3: BOOLEAN
        do
            io.putstring("test")
        end

end