[futurebasic] More on FB^3

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: Jim Henson <vegasswede@...>
Date: Thu, 16 Sep 1999 12:38:02 -0700
Good Afternoon to you U S Mainland folks, Mornin' Derek .. Evenin' 
Jonathon, Phil and any others on the east side of that big Puddle

You Aussies, Japanese and Kiwis .. Good whatever it is there

On a convert from FB II to FB^3 .. You will find that you will be your 
own worst enemy .. I'll bet the farm on it

As Pogo so aptly put it, "We Has Met The Enemy .. And They Is Us"

Your "Unlearning Curve" will be the .. GOTCHA

I say this, Not in jest, but in all sincerity

Here is a GOOD example ..

Due to the Dastardly 32K limit .. You are used to SKADS of Globaled FNs & 
DEF FNs ..

'Cause that was just about the only way you could use an FN in more than 
one place

FB^3 does not have the 32K limit .. That alone knocks out the requirement 
of 95% OR MORE of all those Globaled FNs & DEF FNs .. 

Years ago .. Us Army guys had a saying, "The 7 Ps"

Translated .. "Proper Prior Planning Prevents Pee Poor Performance"

FB^3 is a shining example of where remembrance of this will save you MANY 
Headaches and worse yet .. Line after Line of unneeded code ..

The key to Bare Bones Code is WHERE in the Program Manager you place the 
incl containing the code

The Program Manager that you are used to is a list .. A single list .. 
That the only way to control incl's placement in the Program Manager was 
Their name by/in Alphanumerically Order

FB^3's Program Manager could not care less how you name your incls .. The 
order in which you install you incls is the order in which they stay 
until you move them .. And The Program Manager couldn't care less what 
incl files you have in your Program Folder .. THE ONLY incl files that 
the Program Manager recognizes are the incl files that are installed in it

Did you catch the .. Where YOU INSTALL THEM .. Until you move them

But first a little Basic .. The program Manager uses Group Folders .. So 
this cuts the length of the "List Of Incl" at square one (Added Note here 
regarding Program folders .. In FB II all those UMPTEEN incls had to be 
bare in the Program folder .. A big program had a window so full of 
files, it had be scrolled to find them .. NO MO .. You can .. Should .. 
Make a set of folders in your Program folder that match the folder Name & 
Content of the Program Manager Folders)

My U S History fluctuated between 40 to 50 incls .. Depending on how much 
I consolidated code .. So traveling between incls was a REAL PAIN ..

In FB^3  I have, at present, 9 folders 

The first, Top Of The List folder, contains Standard Multiuse FNs which 
makes them available to EVERY incl that is installed in the Program 
Manager below it/them

Each of the others contain the incl for a Chapter .. Such as:

National Emblems
A Chronology Off U S History
The Presidents
Speeches that Changed History
Treaties with the Indians

They are installed in the Program Manager in the same order as they 
appear in my Program Table Of Contents (The Above are samples of a few 
and not in that order)

AGAIN .. Always remember .. Once an FN is Defined it can be used UMPTEEN 
TIMES in any code/incl below it in the Program Manager

This is where Proper Prior Planing pays off .. In SPADES

FNs that had to be Globaled or DEFed in FB II, so that other incls could 
use them, no longer bear those shackles .. Demise of the 32K freed them

My Program has at present, about 70 multi use FNs .. They Draw PICTs to 
the window, establish a standard set of Btns on a "Page", Paste a STR# 
COLOR TEXT in a window .. and so on.. 

In FB II, All these had to be Globaled .. Now only 3 are DEFed .. because 
they are intertwined and can not be listed in order .. None are Globaled

I have at present .. 106 windows that require a Dialog

Under FB II Every Window HAD to be DEFed .. so that they could be 
"Called" by a Btn click of some other windows Dialog ..

THAT requirement is GONE .. Not one of them has to be DEFed OR Globaled ..

All of the Window Dialogs are in a file JUST BEFORE the Main .. 

The FN DoDialog .. It used be a MUST that it was in the Main header .. Or 
all the Dialogs would have had to be DEFed OR Globaled too ..

Now it is a separate incl, installed between the Dialog Folder and the 
Main ..

FB II had the same requirement for "Mouse Click" ..  NO MO .. The Mouse 
Click FN is between the Main and The DoDialog

Same with "Mouse Over" .. The "Mouse Over" code is tucked away, in with 
the Mouse Click FN

Between the list of INCLUDEs, The list of gSomething& = @FN zSomething, 
The DoDialog, the FN MouseClick with well over a hundred lines and the 
"Mouse Over" .. My main had over 350 lines of code in its header

Now my main has ZERO Lines of code in its header .. 

INCLUDEs & SEGMENT placement .. GONE .. No longer required

gSomething& = @FN zSomething .. GONE .. No longer required

DoDialog, MouseClick & MouseOver .. GONE .. Neatly tucked into the 
Program Manager ..

The Global & def.header Files .. Under FB II I had to have 2 of each 

Now .. A single .. Lean & Mean Global file .. Which has 10 times more 
lines of code defining Constants than lines of Globals ..

It has 3 DEFed FNs and a few Globaled variables that establishes a count 
of something in several places in the Program

All in all .. I've cut over 3000 lines of code & STILL CUTTING

Allmost forgot .. This is to all, but to Lucy especially .. 

External rsrc files .. 

Under FB II .. External rsrc files became a "Satellite" to a Built 
Program ..

With FB^3 .. you have 2 choices

If an External rsrc file is installed into the Program Manager .. All 
resources they contain will be installed in your "Built Program"

If an External rsrc file is not installed into your Program Manager .. It 
will be, as with FB II, a satellite of your "Built Program"

I hope this helps someone over a couple rough spots

Jim Henson,The Vegas Swede, (^_^) s aplenty

Las Vegas is the Number One Fun Capital Of The World
An Oasis Dedicated To Around The Clock Entertainment
Come Often, Enjoy Its Many Pleasures, Stay A Spell
And Bring Lots Of Money, Help Keep Nevada Green