Number Conversions

From Flowcode Help
Jump to navigationJump to search

<sidebar>Sidebar: Flowcode Help Overview:ComponentCreation</sidebar>

When starting out with programming the jump from Decimal to Binary can be a hard one. We have Hexadecimal which is a good way of representing binary values in short hand without having to write/count all the 1s and 0s but again converting between Hex and Decimal can be tricky.


The Windows calculator has a programmer mode which can convert between Decimal, Hex and Binary for us. However we can do the same thing using the Flowcode engine.


Conversions.jpg


Here is a short tutorial on how to create a Flowcode component to provide the same Decimal, Hex and Binary conversions as provided by the calculator. This should be a handy guide for anyone using Flowcode v6 or v7 on how to add your own custom helper tools and get started with component creation. The project also contains some string manipulation routines which may be useful including hex string to number, binary string to number and number to binary string conversions.


YouTube video


The source code for this project is available here.

Forums