Pocket Plane Group

Friends and Neighbors => Weimer Republic (WeiDU.org) => WeiDU => Topic started by: Lu on November 20, 2004, 12:59:41 PM

Title: Strings concatenation
Post by: Lu on November 20, 2004, 12:59:41 PM
The necessity to sometimes type dozens of words on one line in order to have the text displayed
 properly may be rather annoying.
 So, it would be pretty convenient if it were possible to concatenate strings,
 sort of
 SAY   ~string1~
     + ~string2~
     + ~string3~

 that will do the same as

 SAY ~string1string2string3~
Title: Re: Strings concatenation
Post by: jcompton on November 20, 2004, 01:03:12 PM
How about using an editor with word wrap? Typically I write my dialogues in flat text in Word, then transfer them to Context for actual coding.
Title: Re: Strings concatenation
Post by: Rastor on November 20, 2004, 04:19:21 PM
I'd rather have it be the way it is now.

IE. SAY ~String1~
             +~String2~
             +~String3~

Equals three NPC comments with a continue in between.
Title: Re: Strings concatenation
Post by: neriana on November 20, 2004, 08:40:29 PM
It's =, not +, in CHAINs (unless that's yet another thing + can substitute for). I think Lu was asking for the written text to all happen in one box without a continue in between, and to apply to .tp2 descriptions as well as dialogue, though I could be wrong of course. It would be sort of a nice feature, I suppose, but as Jason says, you can always copy and paste from wordpad.
Title: Re: Strings concatenation
Post by: Lu on November 21, 2004, 05:25:02 AM
Yes, Neriana, this is exactly what I meant. I had hoped that it was pretty clear:
 ~string1~ + ~string2~
 would result in
 ~string1string2~
This is what is called 'concatenating strings', this feature is present in many programming languages.
 The choice of sign '+' is surely optional, just they use it in, say, Java and C
Title: Re: Strings concatenation
Post by: weimer on December 02, 2004, 01:53:58 PM
Lu, look for string concatenation in the next WeiDU. Using + makes the grammar more ambiguous, so we use ^.