Eiffel "Gotchas"

07 April 1998


Oops!

Gotcha #2 - manifest strings

In what context can the "check" instruction in this code fragment fail? (Don't worry about exceptional conditions like "out of memory".)

   s: STRING
   ...
   s := "gotcha"
   check
      s.count = 6
   end

ANSWER


Eiffel and NICE are registered trademarks of the Nonprofit International Consortium for Eiffel.

Eiffel "Gotchas"