Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!src.dec.com!src.dec.com!muller From: muller@src.dec.com (Eric Muller) Newsgroups: comp.lang.modula3 Subject: SRC-M3 1.6: bug in STextTable. Message-ID: <1991Apr1.180012.6873@src.dec.com> Date: 2 Apr 91 02:00:12 GMT Sender: news@src.dec.com (News) Reply-To: muller@src.dec.com (Eric Muller) Organization: DEC Systems Research Center Lines: 22 Norman Ramsey and David Golberg reported that STextTable sometime fails with a runtime error in Text.Compare. The Text module now implements its interface properly, i.e. it complains when a NIL Text.T is passed to one of the Text routines. Unfortunately I failed to modify all the clients of Text so that they do not call Text.xxx with a NIL Text.T. Here is a version of STextTable.Compare that will do the right thing: PROCEDURE Compare (arg: REFANY; key1, key2: STable.Key): INTEGER = BEGIN IF key1 = NIL THEN key1 := ""; END; IF key2 = NIL THEN key2 := ""; END; RETURN Text.Compare (key1, key2) END Compare; Thanks to Norman and David for reporting this bug. -- Eric.