Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site teltone.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!houxm!houxz!vax135!cornell!uw-beaver!teltone!bobc
From: bobc@teltone.UUCP (Bob Campbell)
Newsgroups: net.lang.mod2
Subject: strings in Modula-2
Message-ID: <682@teltone.UUCP>
Date: Sat, 11-Aug-84 13:37:45 EDT
Article-I.D.: teltone.682
Posted: Sat Aug 11 13:37:45 1984
Date-Received: Mon, 13-Aug-84 00:41:39 EDT
References: <3956@tekecs.UUCP>
Organization: Teltone Corp., Kirkland, WA
Lines: 34

>> 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,
...
>> 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.
	
The points made are true, but one must remember that Modula-2 is not a
generic do it all language.  The language was made with the intent that
these functions could be added with modules.  Perhaps there is no standard
group of string handling functions because there are too many different
methods of handling them.  The C style of strings (ie null terminated).
could be easily be implemented, as well as the dynamic type.  To solve
the literal string problem you only need a routine (LiteralString?) to
stuff the constant into the right structure.



If you really want true dynamic strings with out any effort use icon,
snobol, basic(yuck), lisp(dynamic memory in general), logo,
Ada (tm US Dept. Of Defense) or some such language.

As soon as we get modula-2 for our pyramids I will do some expermenting
with strings and modula-2  (I am currently trying to get icon for the
pyramids also.  Any leads would be gladly excepted) 

Bob Campbell
Telco-Software at Teltone Corp.  Kirkland Washington.

...uw-beaver!teltone!tikal!bobc
(tikal is the name of a American Pyramid)
...uw-beaver!teltone!bobc