Skip to content

Text

Use the Text blocks to create and perform operations on strings of text.

Example 1

In this example, the first line sets the variable myName to the string Paul. The second line displays a text output as the first letter of myName in a digits display.

Example 2

This example uses an append block that adds text onto an existing text variable. Set the variable myName to "Paul", then append "Stokstad". The full name displays in the fullName Text Output block.

Note

Did you notice the space added before the second string? Add a space so that there is a space between the two strings.

Example 3

The create text with block joins together text from two or more blocks. In this example, the string "Random di:" joins with the random integer math block, which displays a random number between 1 and 6.

Example 4

In this example, the string pasco changes to uppercase and displays the letters P and S on the //code.Node LED array.