[Resolved] Problem with PB Demo Version

Everything else that doesn't fall into one of the other PB categories.
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

[Resolved] Problem with PB Demo Version

Post 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?
Last edited by akj on Mon Sep 21, 2009 8:56 pm, edited 1 time in total.
Anthony Jordan
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Problem with PB Demo Version

Post by PB »

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.
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Re: Problem with PB Demo Version

Post 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.
Anthony Jordan
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Problem with PB Demo Version

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Problem with PB Demo Version

Post 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.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Problem with PB Demo Version

Post 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.

Code: Select all

#CRLF$ = Chr(13) + Chr(10)
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
Last edited by Kaeru Gaman on Mon Sep 21, 2009 11:48 pm, edited 2 times in total.
oh... and have a nice day.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Problem with PB Demo Version

Post 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... :mrgreen:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Re: Problem with PB Demo Version

Post 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?
Anthony Jordan
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Problem with PB Demo Version

Post 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
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Re: Problem with PB Demo Version

Post 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.
Anthony Jordan
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Problem with PB Demo Version

Post 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

Code: Select all

#Today$ = "Monday"
#Test = 1234
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. :D
I wish you success!

Regards, Little John
Post Reply