[Resolved] Problem with PB Demo Version
[Resolved] Problem with PB Demo Version
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?
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?
Last edited by akj on Mon Sep 21, 2009 8:56 pm, edited 1 time in total.
Anthony Jordan
Re: Problem with PB Demo Version
Half joking, half serious: teach them what constants are and how to use them. 

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: Problem with PB Demo Version
@ 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.
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.
Anthony Jordan
Re: Problem with PB Demo Version
> 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.
: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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: Problem with PB Demo Version
#Black is an API constant.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.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Re: Problem with PB Demo Version
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
Code: Select all
#CRLF$ = Chr(13) + Chr(10)
would be much less work that building up an include with all the constants you think you miss...
[edit]
Typo corrected
Last edited by Kaeru Gaman on Mon Sep 21, 2009 11:48 pm, edited 2 times in total.
oh... and have a nice day.
- Rook Zimbabwe
- Addict
- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
Re: Problem with PB Demo Version
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
@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?
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?
Anthony Jordan
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Problem with PB Demo Version
See freak's post here.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?
Regards, Little John
Re: Problem with PB Demo Version
@Little John:
Thanks very much for your help, I managed - at long last - to get 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.
Thanks very much for your help, I managed - at long last - to get
Code: Select all
pbcompiler.exe source.pb /RESIDENT residentfile.res
I think I am now ready to teach the PB programming course.
Anthony Jordan
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Problem with PB Demo Version
Hi akj,
you're welcome!
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.

I wish you success!
Regards, Little John
you're welcome!
Hmmm ... I only can say that it works fine for me on Windows, using PB 4.31.akj wrote:not with the current PB compiler which produced a .RES file consisting only of header and trailer records
For instance, I just converted
Code: Select all
#Today$ = "Monday"
#Test = 1234
IMHO PB is well suited for that purpose, and I imagine it might be fun for the teacher and for the students as well.akj wrote:I think I am now ready to teach the PB programming course.

I wish you success!
Regards, Little John