Text

Examples of pieces of text are:

  • "thing #1"

  • "March 12, 2010"

  • "" (the empty text)

Text can contain letters (which may be lower-case or upper-case), numbers, punctuation marks, other symbols, and blank spaces between words.

 

Text creation

The following block creates the piece of text "hello" and stores it in the variable named greeting.


 

The create text with block combines (concatenates) the value of the greeting variable and the new text "world" to create the text "helloworld". Note that there is no space be

tween them, since none was in either original text.


 

To increase the number of text inputs, click on the gear icon, which changes the view to:


 

Additional inputs are added by dragging an "item" block from the toolbox on the left into the "join" block.

 

Text modification

The format block allows you to change a String containing an expression formatted according to instructions contained in a format expression. In this case, it changes the value of “hello {0}” to “hello world”. Notice, that {0} here is an indicator, where the text will be inserted.

 

 

To increase the number of format inputs, click on the gear icon, which changes the view to:


 

Additional inputs are added by dragging a "string" block from the toolbox on the left below the first string block. For example, if you have three format inputs, then you can use text with an expression as below: