You can use"
CRLF=Text.GetCharacter(13)+Text.GetCharacter(10) ''Carriage return Line feed
TextWindow.WriteLine("Hi"+CRLF+"I'm new")
Or you can use
TextWindow.WriteLine("Hi")
TextWindow.WriteLine("(I'm new")
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You know how in like c# and other codes in strings you have "Hi!\nIm new" where \n goes to the next line
I was Wondering if there is something similar on small basic?
Thanks,
Coder
;)
You can use"
CRLF=Text.GetCharacter(13)+Text.GetCharacter(10) ''Carriage return Line feed
TextWindow.WriteLine("Hi"+CRLF+"I'm new")
Or you can use
TextWindow.WriteLine("Hi")
TextWindow.WriteLine("(I'm new")
In Small visual Basic, you can use Text.NewLine
Or Chars.CrLf
to represent the new line.
You can also use the Text.Format to easily concatenate strings, such as:
TextBox1.Text = Text.Format(
"line1[1]line2[1]line3",
Chars.CrLf
)
Where [1] will be replaced with Chars.CrLf. The reason of using the indexer [1], is that you can use an array of values, such as:
TextBox1.Text = Text.Format(
"Name: [2].[1]Age: [3].",
{Chars.CrLf, "Adam", 15}
)
Also, you can use TextBox1.AppendLine
directly:
TextBox1.AppendLine ("Name: Adam.")
TextBox1.AppendLine ("Age: 15.")