Is it possible to suppress leading zeros within a standard 7 segment multiplexed display routine (as sample MELABS http://melabs.com/resources/samples/pbp/7segment.pbp)?
A pointer in the right direction would be appreciated
Thanks
Adrian
Printable View
Is it possible to suppress leading zeros within a standard 7 segment multiplexed display routine (as sample MELABS http://melabs.com/resources/samples/pbp/7segment.pbp)?
A pointer in the right direction would be appreciated
Thanks
Adrian
Hi,
suppose we have 4 digits ...
IF Value < 1000 ... first digit = 0 ... so, do not show it ( or print blank ! )
IF Value < 100 ... second digit = 0 ... so, do not show it
IF Value < 10 ... Third digit = 0 ...
or use a flag ...
for digit 1 to 4
IF Digit = 0 AND Flag = 0 then
... do not show it : Flag = 0
ELSE
... Show it : Flag = 1
ENDIF
Next digit
Alain
You're a star..many thanks
Adrian
Hi, Sayzer
Would " If digit_value ... " help you to understand how this test is supposed to work ???
I know PbP is case insensitive, "for digit 1 to 4" is not a PbP correct writing, only here to explain things ...but ... May I suppose you need further explanation ... ???
Alain