Hallo to together
I have a counter 0 to 9999,that i print with ToString$ ().
The good,the hex up/down is displayed dec. in the display,but if the counter change:
100 display 100
99 display 990
9 display 900
5 display 500
is this normal?
Regards wolfgang
ToString$ ()
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 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: ToString$ ()
Hi Wolfgang
Yes thats normal. What you need to do is print one or two characters of white space after your number to make sure the previous number gets erased.
Eg instead of printing "100" and then "5" which will lead to "500", print this instead "100 " and "5 " which will lead to "5 ".
Yes thats normal. What you need to do is print one or two characters of white space after your number to make sure the previous number gets erased.
Eg instead of printing "100" and then "5" which will lead to "500", print this instead "100 " and "5 " which will lead to "5 ".
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: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: ToString$ ()
Hallo Benj
I understand what you mean,my problem,where i put in the space?
timer_set_00_dec = 901
timer_00_set_wert = ToString$(timer_set_00)
a
timer_set_00_dec = timer_set_00_dec - 1
wait
timer_00_set_wert = ToString$(timer_set_00_dec)
go to a
Regards wolfgang
I understand what you mean,my problem,where i put in the space?
timer_set_00_dec = 901
timer_00_set_wert = ToString$(timer_set_00)
a
timer_set_00_dec = timer_set_00_dec - 1
wait
timer_00_set_wert = ToString$(timer_set_00_dec)
go to a
Regards wolfgang
- 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: ToString$ ()
Hi Wolfgang
For your program
Would become
For your program
Code: Select all
timer_set_00_dec = 901
timer_00_set_wert = ToString$(timer_set_00)
a
timer_set_00_dec = timer_set_00_dec - 1
wait
timer_00_set_wert = ToString$(timer_set_00_dec)
go to a
Code: Select all
timer_set_00_dec = 901
timer_00_set_wert = ToString$(timer_set_00)
timer_00_set_wert = timer_00_set_wert + " "
a
timer_set_00_dec = timer_set_00_dec - 1
wait
timer_00_set_wert = ToString$(timer_set_00_dec)
timer_00_set_wert = timer_00_set_wert + " "
go to a
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