Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Universal Integer Translator

Post any examples or modules that you want to share here

Universal Integer Translator

Postby trogluddite » Sun Apr 21, 2013 1:26 pm

Hi All,
While I was tinkering with Skull's MIDI gadgets, I realised how much I hate converting hex numbers!
So I made this little 'Universal Integer' box that lets you type in values in decimal, hex, octal or binary and just get the integer straight out without having to use the dreaded Windows calculator!
Integer Universal.fsm
(2.63 KiB) Downloaded 1378 times

To make it even easier to use, it's made so that it doesn't care about the case of letters, and you can put whitespace anywhere within number to separate out the digits - there are a load of examples in the schematic.
The conversion is all handled by a single Ruby code block inside, so feel free to pull that out to use with your own custom edit boxes etc.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Universal Integer Translator

Postby ahcurer » Sat Apr 27, 2013 3:57 am

Trog,

Nice use of RegExp's ... Keep it going!
ahcurer
 
Posts: 7
Joined: Sat Jun 23, 2012 1:55 am

Re: Universal Integer Translator

Postby trogluddite » Sat Apr 27, 2013 3:28 pm

Thanks,mate - yes indeed, I have been forcing myself to learn (slowly!) how RegExp's work. The power they have for string manipulation is really astounding, but that syntax sure does take some getting used to!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Universal Integer Translator

Postby ahcurer » Sun Apr 28, 2013 2:17 am

Yes I couldn't agree more. I have been reading Mastering Regular Expressions Third Edition. The first few chapters really helped me to understand them a little more, always learning though.
I have followed your skills from the SM forum and am in constant amazement on how easy this all seems to come to you.
And now I guess I can follow you over here too.
I spent the $$ and bought RubyMine a while ago to help me learn the Ruby lang. I like the IDE thing as I come from the VC++ environment. Even though Ruby is an interpreted lang, I am still impressed with it (OCRA will make an .exe). Can do a lot with only a little.

Cheers trog man.
ahcurer
 
Posts: 7
Joined: Sat Jun 23, 2012 1:55 am


Return to User Examples

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 14 guests