Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!oakhill!dover!norm!shelley From: shelley@atc.sps.mot.com (Norman K. Shelley) Newsgroups: comp.lang.eiffel Subject: Class STRING bug Message-ID: <2339@dover.sps.mot.com> Date: 24 Jul 90 18:42:20 GMT Sender: usenet@dover.sps.mot.com Lines: 29 class NEW_STRING inherit STRING; -- notice that Create is not renamed feature ... end; -- NEW_STRING Object of class NEW_STRING does not use STRING's Create (or allocate) to allocate some string storage space. When equal, putstring, etc. are applied to this object, the system will crash with a segmentation error! One way to solve this is to add the following to STRING's invariant: not area.Void; This will protect future heirs from this problem! Also, one could then take out the check for "not area.Void" within the routine "count" as it is not necessary. If one allows "area.Void" then one must put many checks for "not area.Void" in MANY more spots than the one it is currently in!! Norman Shelley Motorola - ATC 2200 W. Broadway AZ09/M350 Mesa, AZ 85202 ...!uunet!motsps!atc!shelley shelley@atc.sps.mot.com (602) 962-2473