Multiline strings

Post

Posted
Rating:
#1 (In Topic #425)
Trainee
 I did a quick google search and I found and old mailing list thread that seems to indicate it wasn't possible at the time (back in 2013) but I was wondering whether there's a straightforward way to doing it now?
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
Hi and welcome to the forum.

You can do multiline strings, here are a couple of examples: -

Code (gambas)

  1. Dim sString As String[] = ["I did a quick google search and I found and old mailing list thread that seems to indicate it wasn't possible at the time (back in 2013)",
  2.     "but I was wondering whether there's a straightforward way to doing it now?"]
  3.  
  4. Dim sS As String = "I did a quick google search and I found and old mailing list thread" &
  5.     " that seems to indicate it wasn't possible at the time (back in 2013)" &
  6.     "but I was wondering whether there's a straightforward way to doing it now?"
  7.  
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Regular
stevedee is in the usergroup ‘Regular’
…and you can naturally do stuff like this:-

Code (gambas)

  1. Public Sub Button1_Click()
  2. Dim CatStevens As String
  3.  
  4.   CatStevens = "It's not time to make a change" & gb.CrLf &
  5.   "Just relax, take it easy" & gb.CrLf &
  6.   "You're still young, that's your fault" & gb.CrLf &
  7.   "There's so much you have to know" & gb.CrLf
  8.  
  9.   TextArea1.Text = CatStevens
  10.  
  11.  
Online now: No Back to the top

Post

Posted
Rating:
#4
Trainee
Cheers guys. Appreciate the responses.
Online now: No Back to the top
1 guest and 0 members have just viewed this.