hello Ben... okay so another bug...
So I went and looked at the PrintNumber option in the LCD print routine....
and... okay - so...I was wrong.. I used... the wrong command....!!
I should have used... the
PrintFormattedNumber.....!! yay..!!!
However... when I put that into place... it was very exciting....
BUT... Gee then... another bug.!!! jumped out the screen at me....
So in the LUT ... table... I edited the numbers to their correct... exact looks... like 03110 ... and 0116784453 ...
AND damn damn... damn ... the first number comes out as 1608 ...when I print the 2nd number...in the sequence.. it just returned a BIG FAT ZERO.!!!!
So instead of... getting... like 0116784453 as the number... it comes out as a BIG FAT 0...!!!! Damn Damn....Damn....
So just to clarify...I tried the first number in the sequence again... which is 3110... and made it... 03110 ... and then strangely - it returned... 1608 ... why this should be so I do not know...??????
gee it's really frustrating to KEEP FINDING BUGS..!!!!
How does one do anything - really nice with FLOWCODE... when you always - finding bugs..!!!... and then you have to pay for it as well.!!!!!
Hell- I hope I'm wrong... I really do...!!!!..
Kindest Regards
ole Spens...
the LUT .... has these numbers in...
03110,0116784453,03111,0837874453,03112,0717434842,03120,0114761234,
so they have to come out exactly like that ... index 0 = 03110 ... index 1 = 0116784453... index 2 = 03111... index 3 = 0837874453... etc etc..
LUT ... problem..
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LUT ... problem..
Hi Spencer,
It's not a bug.
A number starting with 0 gets treated like octal and not decimal.
Just like 0x is hex and 0b is binary.
I don't believe flowcode is designed to display oct values?
As 3110 dec = 6046 oct
It's not a bug.
A number starting with 0 gets treated like octal and not decimal.
Just like 0x is hex and 0b is binary.
I don't believe flowcode is designed to display oct values?
As 3110 dec = 6046 oct
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: LUT ... problem..
Hello,
If you need the "0" to be printed to the LCD then you can simply print the "0" as a string before then printing the number. e.g. 3110.
If you need the "0" to be printed to the LCD then you can simply print the "0" as a string before then printing the number. e.g. 3110.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 64
- Joined: Mon Sep 28, 2015 8:19 pm
- Has thanked: 14 times
- Been thanked: 10 times
- Contact:
Re: LUT ... problem..
Hey guys - you talking RUBBISH.!!!!
the software - should cater for whatever number I put into the LUT...
IT IS A LOOK UP TABLE.... and so whatever number I put in there - should come out exactly the SAME.!!!.. the LUT is a STORE..!!!!
NOT SO...
What is the use of a LOOK UP TABLE changing the values - THAT's PURE RUBBISH..!!!!
So please....!!! get with it...!!!!!
So I put a number into an EEPROM...!!! OR an SD CARD.... and then you reckon - when I take it out the SD CARD.... it's gonna change...
I hope you never write software - for me anywhere,,!!!!
Thank you - now get to it - !!! FIX THE BLOODY SOFTWARE..!!!!
regards
the software - should cater for whatever number I put into the LUT...
IT IS A LOOK UP TABLE.... and so whatever number I put in there - should come out exactly the SAME.!!!.. the LUT is a STORE..!!!!
NOT SO...
What is the use of a LOOK UP TABLE changing the values - THAT's PURE RUBBISH..!!!!
So please....!!! get with it...!!!!!
So I put a number into an EEPROM...!!! OR an SD CARD.... and then you reckon - when I take it out the SD CARD.... it's gonna change...
I hope you never write software - for me anywhere,,!!!!
Thank you - now get to it - !!! FIX THE BLOODY SOFTWARE..!!!!
regards
-
- Valued Contributor
- Posts: 1189
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 439 times
- Contact:
Re: LUT ... problem..
If you want it to show exactly what you put in then save it as a string.. One byte per digit
Otherwise a number could be
1234
01234
001234
....
By convention numbers are not displayed with leading 0s and of you want it to be so then you'll have to do some of the work yourself.
As mentioned above by convention octal numbers are entered into code using a leading 0 ( because who puts leading 0s onto numbers)
So, no, not a bug.
Martin
Otherwise a number could be
1234
01234
001234
....
By convention numbers are not displayed with leading 0s and of you want it to be so then you'll have to do some of the work yourself.
As mentioned above by convention octal numbers are entered into code using a leading 0 ( because who puts leading 0s onto numbers)
So, no, not a bug.
Martin
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: LUT ... problem..
As Martin mentioned, the LUT is for numeric values, not strings.
https://gcc.gnu.org/onlinedocs/gcc/Bina ... tants.html
https://gcc.gnu.org/onlinedocs/gcc/Bina ... tants.html
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: LUT ... problem..
Hi
Well the solution is easy if you do not like how a component functions Roll out your own that does what you want ,Flowcode give you all the tools to make your own Component in this case a tablethe software - should cater for whatever number I put into the LUT...
IT IS A LOOK UP TABLE.... and so whatever number I put in there - should come out exactly the SAME.!!!.. the LUT is a STORE..!!!!
NOT SO...
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR