parsefloat
This block is part of the number group and was last modified in core v10.4.28.
parsefloat v10.4.28 In pins 1
- value required
value
Out pins 2
- number
number - succes
condition
Parses the value pin like JavaScript parseFloat: numbers and booleans pass through (true=1), and strings are parsed from their longest leading numeric prefix, so trailing junk is ignored. On success outputs the parsed number plus condition/success true; on failure (no leading digits) outputs condition/success false and leaves the number pin unwritten. Example: value=" 3.5kg" -> 3.5 with success=true; value="kg" -> success=false.
A typical wiring for parseFloat: the number out pin feeds cast to value.
Version history
Introduced in v10.4.28.
Back to
number Return to the main group to view all sub-groups Back to parse Return to the group to view all blocks within this group 