Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site tekecs.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!hplabs!tektronix!orca!tekecs!patcl From: patcl@tekecs.UUCP (Pat Clancy) Newsgroups: net.lang.mod2 Subject: Re: Wanted: Pascal/Modula-2 help Message-ID: <3956@tekecs.UUCP> Date: Sat, 11-Aug-84 01:15:12 EDT Article-I.D.: tekecs.3956 Posted: Sat Aug 11 01:15:12 1984 Date-Received: Mon, 6-Aug-84 01:08:27 EDT Organization: Tektronix, Wilsonville OR Lines: 23 >> This makes it sound as if Modula-2 has made no progress over Pascal in >> string manipulation. Nothing could be further from the truth. Actually, a lot of things could be further. "Open" arrays (eg.: of CHAR) are only allowed as formal parameters -- for a given string to really change size dynamically, one must either declare a string type which is large enough to hold any expected string value, or one must copy the string into a new area each time it changes. This is not much better than Pascal. Think about implementing a "concatenate" operation, for example; the only way to get around using a fixed maximum-size string type is to use NEW/ALLOCATE and pointers, in which case these "dynamic" strings will be incompatible with literal strings (which are ARRAY OF CHAR), so the whole thing is very ugly. True dynamic array types would be one solution. As for standard procedures: the actual language report (second part of the book) does not define any standard procedures on strings. Pat Clancy Tektronix {ucbvax,decvax,ihnp4,allegra,uw-beaver,hplabs}!tektronix!tekecs!patcl