Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cunixb.cc.columbia.edu!stone From: stone@cunixb.cc.columbia.edu (Glenn Stone) Newsgroups: comp.lang.pascal Subject: Re: Long strings in TP Message-ID: <1991Feb16.204804.1795@cunixf.cc.columbia.edu> Date: 16 Feb 91 20:48:04 GMT References: <1991Feb15.162333.24408@cunixf.cc.columbia.edu> <1991Feb15.205214.28291@maytag.waterloo.edu> Sender: news@cunixf.cc.columbia.edu (The Daily News) Reply-To: stone@cunixb.cc.columbia.edu (Glenn Stone) Organization: Columbia University Lines: 28 In article <1991Feb15.205214.28291@maytag.waterloo.edu> dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes: >In article <1991Feb15.162333.24408@cunixf.cc.columbia.edu> stone@cunixb.cc.columbia.edu (Glenn Stone) writes: >>What's the best way to implement a long string variable, say 600 chars? > >That depends on what you want to do with it. If you don't need to I should have explained this at the outset. I want to be able to tack other strings onto it either with CONCAT or STRING := STRING + NEWSTRING, and I have to be able to write it to a text file. So the ARRAY OF CHAR solutions you and others suggested won't work. What I have done so far is define an overflow string, which gives me 510 characters total, but I really need 600 chars, and having two overflow strings and all the attendant overhead seems sort of messy. But if there's no way to avoid using multiple strings, I guess I can put them in a queue and keep things fairly neat. >know the length, and it doesn't change much, and you don't use nulls in >the strings, probably C-style null terminated strings are best. Turbo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could you explain? No hablo C. Thanks. ------------------------------------------------------------------------- Glenn Davis Stone BITNET stone@cunixc Columbia University INTERNET stone@cunixb.cc.columbia.edu -------------------------------------------------------------------------