Screen control

At this stage I was only trying to print in the same spot on screen. Dennis has come up with code that works.

Malcolm

--
T M Smith 
Using an ARMX6 and RISC OS 5.21 in the North Riding of Yorkshire
Reply to
T M Smith
Loading thread data ...

When updating a value you are displaying, don't forget to consider formatting of the result. If your numbers change from 3 digits to 2 digits for example, the last digit of the previous value won't be overwritten unless you use a fixed width format with spaces in front for shorter numbers.

--

Rick C 

Viewed the eclipse at Wintercrest Farms, 
on the centerline of totality since 1998
Reply to
rickman

Am 21.10.2017 um 22:04 schrieb T M Smith:

you mean something like

watch ls -la

or

watch df -h

or if you want to watch something changeing

watch date

To stop press ctrl-c

Reply to
Helmut Harnisch

Thanks for making that point Rick. And thanks to everyone who contributed.

Malcolm Smith

--
T M Smith 
Using an ARMX6 and RISC OS 5.21 in the North Riding of Yorkshire
Reply to
T M Smith

There's one point that wasn't noted in all the above... You need to aake sure the line being printed always has the same length (as was in fact the case in the example). Otherwise you'll get garbage left on the right. Simple solution -- add enough trailing spaces to cover all cases...

-- Pete --

Reply to
Pete

Actually it was menti> When updating a value you are displaying, don't forget to consider

Reply to
Rob Morley

Perhaps, but the "trailing spaces" solution is more general-purpose.

--
/~\  cgibbs@kltpzyxm.invalid (Charlie Gibbs) 
\ /  I'm really at ac.dekanfrus if you read it the right way. 
 X   Top-posted messages will probably be ignored.  See RFC1855. 
/ \  HTML will DEFINITELY be ignored.  Join the ASCII ribbon campaign!
Reply to
Charlie Gibbs

But then the number jumps around as the length changes. It's perfectly normal for the higher digits to disappear when they are zero. It's very disturbing to watch the numbers jump around on the screen.

--

Rick C 

Viewed the eclipse at Wintercrest Farms, 
on the centerline of totality since 1998
Reply to
rickman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.