ToString$ ()

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

ToString$ ()

Post by saschech@gmx.de »

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

User avatar
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$ ()

Post by Benj »

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 ".

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: ToString$ ()

Post by Steve »

Or clear the display before printing the number.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: ToString$ ()

Post by saschech@gmx.de »

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

User avatar
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$ ()

Post by Benj »

Hi Wolfgang

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
Would become

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

Post Reply