8 / 16

Strings

We introduced the String type in the "Hello World!" section.
String is essentially just text.

There is one very common operator we can use on Strings, called "concatenation operator".
The syntax used in FlowRun is "abc" + "def", we use + to combine 2 strings into one.
The result is string "abcdef".

You can also concatenate other types with a string.
This is useful for printing values in a nicer way.
For example, you can print "You entered: " + x.
That would result in a string that has text "You entered: " and the value of the variable x appended to it.


Let's make a program that does exactly that:

  • declare x: Integer
  • input x
  • output "You entered: " + x