Documentation

Una is developed by Una Technologies Limited

All rights reserved

© 2022 Una Technologies Limited

Print

Transforming Text to Number

Parse to number

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"string_parsefloat\" disabled=\"true\" x=\"-22\" y=\"247\"><value name=\"text\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\">123</field></shadow></value></block></xml>"}
				
			

This block is used to convert a text to a number.

Parameters: 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_consoleLogNum\"><value name=\"num\"><block type=\"string_parsefloat\"><value name=\"text\"><shadow type=\"text\"><field name=\"TEXT\">123</field></shadow></value></block></value></block></statement></block></xml>"}
				
			

The output:

Pause to Number - Output
Next Concatenating the Text