Modules versus forms versus 1 big mess
-
Hot Pockets
- User

- Posts: 51
- Joined: Mon Jun 01, 2009 3:56 am
Modules versus forms versus 1 big mess
I have used VB 6 and am trying to learn PB but I can't understand how you put together a complete program. I don't understand how you can make more then 1 module or if you were to use the designer how would you tie that in with the 1 module concept? Please enlighten me!!
You start typing at line 1 and when you've finished typing you have a complete program - or a complete mess in my case!I have used VB 6 and am trying to learn PB but I can't understand how you put together a complete program.
Purebasic does not offer 'modules' in the sense of distinct object files. Your complete source is compiled down to a single object file and then linked with all required libraries etc. to create the final exe.
In terms of 'modularising' your code you basically have two choices. Either break your projects down into distinct source files and then tie them together with XIncludeFile or create your own user libraries using Tailbite or Moebius etc. The visual designer you mention will, I think, create separate source files for each window that you design (I could be wrong here as I don't use visual designers). These source files are then tied together with XIncludeFile etc.
Personally I use the source code option. Typical projects of mine bring together all kinds of utilities which I store in a central repository and it all works fine; especially when you consider PB's speed of compilation which never ceases to amaze me! Fred, how the hell have you squeezed so much raw speed out of the compiler?
A piece of advice - the quicker you realise that Purebasic is not VB; the better for your own sanity!
I may look like a mule, but I'm not a complete ass.
Hot Pockets: I recommend you bookmark the PureBasic Survival Guide:
http://www.xs4all.nl/~bluez/datatalk/purebasic.htm
It's made for people like you.
http://www.xs4all.nl/~bluez/datatalk/purebasic.htm
It's made for people like you.
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.
-
Hot Pockets
- User

- Posts: 51
- Joined: Mon Jun 01, 2009 3:56 am
1 Big Mess
I wasn't really adverse to using the 1 big mess philosophy, I just wanted to be sure that's what I was dealing with. Thanks for being so helpful !!
