I do alot of writing for CLI applications and I find the console support of Purebasic needing a revisit.
It'd be nice to:
1 - query the screen size
2 - turn on or off screen scroll
3 - support ANSI graphics
4 - And be able to place the cursor anywhere on the screen with simple PRINT@ or LOCATE@ statements.
5 - a clear screen command.
Requst expanded CONSOLE functionality
Re: Requst expanded CONSOLE functionality
Check out the help file under the "Console" topic - e.g. ClearConsole() and ConsoleLocate() are already implemented.
You'll most likely find the other commands you are searching for in this forum. There is plenty of helpful code from other users!
You'll most likely find the other commands you are searching for in this forum. There is plenty of helpful code from other users!

If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Requst expanded CONSOLE functionality
Actually, I did better than that.
I read the documentation for the console library and is says for use in graphic mode. It does not mention text mode, which is what I work in and thus the reason for my suggestion.

I read the documentation for the console library and is says for use in graphic mode. It does not mention text mode, which is what I work in and thus the reason for my suggestion.
Re: Requst expanded CONSOLE functionality
Maybe you can enable the graphic console mode, do a few things then disable it again for your other console stuff.jmcbride wrote:I read the documentation for the console library and is says for use in graphic mode. It does not mention text mode, which is what I work in and thus the reason for my suggestion.
Re: Requst expanded CONSOLE functionality
Afaik text mode can by system default not do the operations you mentioned.

-
- Enthusiast
- Posts: 252
- Joined: Mon Aug 16, 2010 4:29 am
Re: Requst expanded CONSOLE functionality
@jmcbride
Aside from ANSI terminal type graphics, I can not tell what you want PB to do that it does not already do.
For example, "be able to place the cursor anywhere on the screen with simple PRINT@ or LOCATE@ statements" is as easy as
Were you perhaps thinking "Graphical" means you have to use point or pixel coordinates? ConsoleLocate(I,J) works like "I" characters and "J" lines on the screen.
Maybe if you could show a small snippet of what you need that PB can not do, it would be clearer.
Aside from ANSI terminal type graphics, I can not tell what you want PB to do that it does not already do.
For example, "be able to place the cursor anywhere on the screen with simple PRINT@ or LOCATE@ statements" is as easy as
Code: Select all
ConsoleLocate(StartChar , LineNum) : Print(" Some Text")
Maybe if you could show a small snippet of what you need that PB can not do, it would be clearer.