Binary String to Number
Description
This object is being used to convert a binary string into a number.
App Builder Object
Source Code
function execute() {
switch (trigger) {
case 0:
return [parseInt(inPorts[1].value, 2)];
default:
break;
}
return [];
}
Examples
Position | Initialize | Binary String | Number |
---|---|---|---|
1 | Trigger | 101100 | 44 |
2 | Trigger | 1011 | 11 |
3 | Trigger | 100011 | 35 |
In Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | Trigger | Trigger | This port is being used to trigger the 'Binary String to Number' object. |
2 | Binary | String | This port is being used to receive a string. |
Out Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | Number | Number | This port is being used to sent out the number that has been converted by the 'Binary String to Number' object. |
Properties
Name | Description |
---|---|
Object Name | The name on the object on the canvas. |
Show Code View | The switch to turn on code view for the Code Object |
Duplicate Code into custom Code Object |