Author Topic: Strings concatenation  (Read 1141 times)

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Strings concatenation
« 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~

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Strings concatenation
« Reply #1 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.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Rastor

  • Planewalker
  • *****
  • Posts: 271
  • Author of the book, "Being a Jerk for Dummies"
    • RPG Dungeon
Re: Strings concatenation
« Reply #2 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.

Offline neriana

  • Planewalker
  • *****
  • Posts: 585
  • Gender: Female
    • Darien NPC for BG2
Re: Strings concatenation
« Reply #3 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.
« Last Edit: November 20, 2004, 08:43:19 PM by neriana »
The color of infinity inside an empty glass.

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: Strings concatenation
« Reply #4 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

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
Re: Strings concatenation
« Reply #5 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 ^.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: