BlocklyProp icon indicating copy to clipboard operation
BlocklyProp copied to clipboard

Enhance Named constants to accept more than just decimal

Open PropGit opened this issue 6 years ago • 4 comments

The named constant block currently only accepts a fixed decimal value. Please enhance to accept a decimal, hexadecimal, binary, or character value block as input.

image

PropGit avatar Nov 07 '18 16:11 PropGit

Can easily be done...how wide should we open it. Hex and Binary, or further, allow any text?

MatzElectronics avatar Nov 07 '18 19:11 MatzElectronics

Blockly itself assumes that the value is numeric... so we have to be careful with this.

MatzElectronics avatar Nov 07 '18 19:11 MatzElectronics

Dec, Hex, Bin, and ASCII Char, assuming the character can be input as a visual character and is stored in the constant as it's ASCII number.

PropGit avatar Nov 07 '18 20:11 PropGit

like 'a' or 'Q' or '*' ? Dec, bin, hex are easy because it's just a regex filter, but filtering chars it's going to take me a while to figure out...

MatzElectronics avatar Nov 22 '18 01:11 MatzElectronics