March 28, 2024, 11:43:41 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


1st Icon on Cbasic's Toolbar?

Started by Zooker, February 19, 2008, 08:04:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zooker

When I press this button it puts images(windows) on scren numbered Cbasic 1, Cbasic2 ect, ect. Are These the equivalent of VB's Modules. How many can you use in 1 program and how big can a single 1 get?

Just a Thought! If someone could Jot down the l i m i  tations of creative basic, How many forms if there are any, do you need a Sub mainor main module ect it would be a great help and probably would save some one a great deal of time trying to do the impossible! :)

REDEBOLT

February 19, 2008, 10:02:59 PM #1 Last Edit: March 20, 2008, 02:56:28 PM by REDEBOLT
[deleted]
Regards,
Bob

Ionic Wind Support Team

CBasic supports precompiled subroutines files called "components" which you can add to the current source being compiled.   It's in the users guide.
Ionic Wind Support Team

GWS

March 20, 2008, 01:03:54 PM #3 Last Edit: March 20, 2008, 02:01:39 PM by GWS
Zooker,

Forget VB - Creative is not like that. :)

No-ne has come up against any limitations that I recall .. and it's been used for hundreds of different applications over the years.
Those that are in the language itself - like the max number of characters in a 'string' variable (254) - are noted in the user guide.

You can have as many Windows and controls as you like.

The icon you mention, simply sets up the editor to work with more than one program at a time.

Each program (application) is best kept in it's own folder, along with any support files like images or sounds.  Each program is an independent entity, although you can import dll's if you wish.

A program can have as many Subroutines as you like to keep the program neat and logical.

You don't need a 'Main' sub, or an 'entry point'.  Each program starts usually with variable definitions and any function definitions, and then enters straight away to the first instructions of the program.

These usually, set up the Windows and their controls to suit your program.  Normally, the first Window you define is the main program window - other windows can be child windows or separate.  You can have as many windows as you like, (subject to exhausting Windows resources).

When the first window is closed, the program ends -  other windows and graphics should be closed before ending.
Closing the main window if there are any 'child' windows in an MDI application, will close those automatically.

Key subroutines are those called by their associated Window (if there are more than one).  Each Window definition specifies the name of it's asociated Message Handling subroutine.  This is the routine that catches all the Window's messages as controls are clicked, the mouse is moved, a key is pressed or whatever.  It's in these message handling routines that you deal with the events as they happen.

That's where the main functionality of your program is coded.

Edit:  Just for completeness, I ought to say that if you have an application requiring Database, COM or OOP facilities, or which requires the latest 2D and 3D graphics developed on this site, you should use EBasic - ie. the professional compiler.

CBasic is perfectly competent for many applications, as you can see if you check out the examples.  However it does not yet have the ability to compile to native machine code, and it's 2D graphics need updating to give access to graphics buffers.  Other than that, there are no known limitations.  The World's your oyster ..  :)

Hope that helps, :)

Graham





Tomorrow may be too late ..