My program shall write
Calculating [Number] /
Then delete the line and write
Calculating [Number] -
Then delete again and write
Calculating [Number] \
Then
Calculating [Number] |
etc.
How to do?
Hi Kiba,
Console programs are very limited as a user interface.
You can clear the whole screen using 'CLS' and write stuff again .. a bit of a sledgehammer approach .. :)
or you can use 'LOCATE y,x' to position where you will print - and overwrite what was there before .. so you could 'backtrack on what you wrote previously.
The only other thing is to place a comma at the end of a print line to keep printing on the same line.
Those are your only options I think .. probably the 'LOCATE y,x' being the most useful.
If you want more control over colors and user presentation, consider using a simple window instead .. they are not too difficult to use, and look much nicer .. :)
all the best,
Graham
I was searching for something like \r in C.
Hi,
I just noticed I'm off limits here in Aurora territory .. :)
I've posted a small example in the Creative Basic Console section to illustrate the use of 'Locate y,x'.
I imagine it will be much the same in Aurora .. :)
Graham
Thank you, but I think I won't write my tiny program from scratch just to implement that little cosmetics ;)
It's a math science program so beauty is very unimportant :P
in C, \r is compilled as \13 or \x0d, so try thisprint("position is ", counter, "\x0d",)
// or
printf("position is %d\x0d", counter); // #include "stdio.inc"
// or
printf("position is %d%c", counter, 13);
I tried this but it didn't work. Anyway I now use GWS' method (coded my own ConsoleLine "manager" ^^ I love this language :P).