User Manual
Print

Displaying Character at the Certain Position

Char from … at …

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"string_get\" disabled=\"true\" x=\"-22\" y=\"652\"><value name=\"this\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\">this</field></shadow></value><value name=\"pos\"><shadow type=\"math_number\" disabled=\"true\"><field name=\"NUM\">0</field></shadow></value></block></xml>"}
				
			

This block is used to show the character at the specified position.

Parameters: Screen Item/String

Output: Number

Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"basic_consoleLogText\"><value name=\"text\"><block type=\"string_get\"><value name=\"this\"><shadow type=\"text\"><field name=\"TEXT\">this</field></shadow></value><value name=\"pos\"><shadow type=\"math_number\"><field name=\"NUM\">3</field></shadow></value></block></value></block></statement></block></xml>"}
				
			

The output:

Char from - Output