User Manual
Print

Setting a Number

0

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>count</variable></variables><block type=\"math_number\" disabled=\"true\" x=\"-22\" y=\"247\"><field name=\"NUM\">0</field></block></xml>"}
				
			

This block is used to set the value to number or decimal number.

Parameters: Condition: Number (Default: 0)

Output: Number
Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>count</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"variables_set\"><field name=\"VAR\">count</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">6.1</field></shadow></value><next><block type=\"basic_consoleLogNum\"><value name=\"num\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value></block></next></block></statement></block></xml>"}
				
			

The output:

0 - Output