Powerbasic Museum 2020-B

General Category => Third-Party Add-Ons => Topic started by: Theo Gottwald on August 12, 2013, 06:11:36 PM

Title: LJ's complete Console
Post by: Theo Gottwald on August 12, 2013, 06:11:36 PM
Just found this nice documented AddOn:

LJ's complete Console (http://www.laurencejackson.com/LJ-CC/index.html)

QuoteLJ's Complete Console (LJ-CC) for PB/Win


A Comprehensive Set of Commands and Functions Supporting Console I/O
for PB/Win 8, 9 and 10

First issue
August 22, 2011
Title: Re: LJ's complete Console
Post by: Paul Squires on August 12, 2013, 06:21:21 PM
I have long believed that PBCC and PBWIN should be one product, not two. After having used BASIC's like FreeBasic, where the integration of gui and console commands is seamless, it is hard to justify why they are separated in PB. Is the argument that the cost of compiler would be too high if they were combined?

Nevertheless, Laurence Jackson's library does look pretty cool.
Title: Re: LJ's complete Console
Post by: John Spikowski on August 12, 2013, 09:27:38 PM
Can this library be compiled as a DLL? This might be a nice solution for OxygenBasic users.

Title: Re: LJ's complete Console
Post by: Charles Pegge on August 13, 2013, 11:46:52 AM
We have a mini-console header/source (about 4kb) in recent releases of OxygenBasic. It can be included for diagnostics, and simple i/o - often more appropriate than putting up a windows GUI. There are also some console graphics demos from Peter W.

I think the only reason for PB having separate windows and console compilers is a commercial one.
Title: Re: LJ's complete Console
Post by: Theo Gottwald on August 13, 2013, 04:22:41 PM
I agree ... PB Should rather have a 32 and a 64 bit version. But thats another point.
This library is a nice thing and why not ask LJ if you can have it for OB?
His mailadress is available on the site.
Title: Re: LJ's complete Console
Post by: Charles Pegge on August 13, 2013, 10:51:17 PM
It's more than what we need, but I'll take a look.
Title: Re: LJ's complete Console
Post by: Laurence Jackson on August 14, 2013, 11:15:07 PM
Disappointed that you had to "find" it Theo - it was announced on the PB forum when released. It's open source and free so anyone can do anything they want with it, short of the obvious of putting their own name on it, charging for it, etc. But to be honest, it IS a lot more than almost anyone needs - I just got a bit carried away at the time with doing a complete emulation of console compiler functions. I myself use the very stripped down version which I included in my threaded external process library.
Title: Re: LJ's complete Console
Post by: Laurence Jackson on August 15, 2013, 07:43:21 AM
Actually, I've just been informed of a problem with LJ-CC when compiling with PB/Win 10.04. For compatibility of style with PB/CC, I used the "$" suffix on a couple of functions (ConInkey and ConWaitkey). LJ-CC uses macros to adapt itself to use ANSI or wide strings according to the environment in which it is being compiled (something to be particularly aware of if compiling it as a separate DLL). The suffix "$" officially denotes an ANSI string, while "$$" should be used for wide strings. Previous issues of PB/Win 10 allowed this bending of the rules, PB/Win 10.04 doesn't (one for the change log which some have been asking for).

Simply remove the $ suffix from all occurrences of ConInkey and ConWaitkey to resolve this problem while retaining the adaptive compilation.