Page 1 of 1
[Resolved] Problem with PB Demo Version
Posted: Mon Sep 21, 2009 9:08 am
by akj
I own the full version of PB, however I am shortly intending to use the PB 4.31 32-bit demo version to teach programming to a group of people on a voluntary (i.e. non-commercial) basis. It will need to be the demo version because the students will be encouraged to download and use it at home to aid their learning and I guess they would not be willing to pay - at such an early stage in their programming career - for the full version.
But I have hit a major problem. The demo version is not recognising most [non-API] constants such as #Black #TAB #TAB$ and #CRLF$ which will be vital to the teaching. Is there any way I can legally enhance the demo version (perhaps by adding some sort of resource file) to get all the missing constants to be fully recognised?
Also AutoComplete does not seem to be functional in the demo version. Can anyone confirm this?
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 10:40 am
by PB
Half joking, half serious: teach them what constants are and how to use them.

Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 10:52 am
by akj
@ PB:
Your reply does not help.
I want the students to be able to freely use constants such as #Black or #Yellow or #CRLF$ without my having to go through the theory of RGB colours or Ascii codes, etc. The course is for programming beginners and because of time pressures I will have to severly limit the amount of 'behind the scenes' theory that can be covered.
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 10:58 am
by PB
> Your reply does not help
:roll: Where's your sense of humor?
I assume that the constants are missing for a reason, because the demo is meant to be limited.
You want a helpful answer? Make your own constants file then with common values, and install that with each demo that they use. Perfectly legal as long as you don't re-distribute the demo with them.
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 5:44 pm
by Trond
akj wrote:The demo version is not recognising most [non-API] constants such as #Black #TAB #TAB$ and #CRLF$ which will be vital to the teaching.
#Black is an API constant.
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 5:52 pm
by Kaeru Gaman
If I were you, I would leave those constants out and explain 6-digit-Hex-notation of colors and the Chr() function to them rightaway.
could be lesson for constants
and ASCII
and Chr-function.
would be much less work that building up an include with all the constants you think you miss...
[edit]
Typo corrected
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 6:20 pm
by Rook Zimbabwe
Constants, Variables, and Data were about 1/2 hour when I taught Introduction to Programming in 6th Grade Computer Science... The other 1/2 was BINARY MATH and the IDE we were using... 2nd day stuff...

Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 6:31 pm
by akj
@Trond:
Thank you. I have now come to realise that all the constants I'm missing are deemed to be Windows constants.
@Kaeru Gaman:
As it happens, I have today written a quick program (about 130 lines) to extract the constants I need (and more) from the two binary residents files Windows.res and WindowsUnicode.res. I extracted all constants whose names did not exceed 7 characters and did not include any underscores "_".
The resulting list (saved in a disc file) has 306 constant definitions which I could reduce further but it hardly seems worth the effort. It compiles in PB 4.40B3 without any error.
The only problem now is how to compile this list to a .RES file and then include it in the PB Demo residents folder. Anyone any idea how to do this compilation?
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 7:08 pm
by Little John
akj wrote:The only problem now is how to compile this list to a .RES file and then include it in the PB Demo residents folder. Anyone any idea how to do this compilation?
See
freak's post here.
Regards, Little John
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 8:36 pm
by akj
@Little John:
Thanks very much for your help, I managed - at long last - to get
Code: Select all
pbcompiler.exe source.pb /RESIDENT residentfile.res
to work, not with the current PB compiler which produced a .RES file consisting only of header and trailer records, but with version 3.94 of the compiler which produced a good .RES file.
I think I am now ready to teach the PB programming course.
Re: Problem with PB Demo Version
Posted: Mon Sep 21, 2009 10:12 pm
by Little John
Hi akj,
you're welcome!
akj wrote:not with the current PB compiler which produced a .RES file consisting only of header and trailer records
Hmmm ... I only can say that it works fine for me on Windows, using PB 4.31.
For instance, I just converted
to a .RES file, and moved it to the concerning directory. Then I was able to use these constants exactly like the built-in PB constants.
akj wrote:I think I am now ready to teach the PB programming course.
IMHO PB is well suited for that purpose, and I imagine it might be fun for the teacher and for the students as well.

I wish you success!
Regards, Little John