Qbasicnews.com

Full Version: FB Source size limit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I identified it before you blitz :P

INPUT's parser was flux0red, AST tree node was being deleted and the optimizer entered into an infinite loop until the stack overflows.. and XP hides that exception, only a dbg will catch it.

Btw, to get that code to work you need to re-declare 2 functions as byval:

Code:
DECLARE FUNCTION BPAssessment% (byval Feld%, byval Column%, byval row%, byval developed%)
DECLARE FUNCTION WPAssessment% (byval Feld%, byval Column%, byval row%, byval developed%)

For some stupid reason the byref vars are changed when they shouldn't.. QB's trick of using ()'s to create temp vars for functions arguments doesn't work with FB, nor will.
pfft, liar Tongue
Quote:Yes, I mean a 115 Kb .BAS file.

Whar a shame! The author of so many articles about modularizing. using a single huge source!! :rotfl:
Quote:
na_th_an Wrote:Yes, I mean a 115 Kb .BAS file.

Whar a shame! The author of so many articles about modularizing. using a single huge source!! :rotfl:

LOL

Yup Big Grin
Quote:I identified it before you blitz Tongue

INPUT's parser was flux0red, AST tree node was being deleted and the optimizer entered into an infinite loop until the stack overflows.. and XP hides that exception, only a dbg will catch it.

Btw, to get that code to work you need to re-declare 2 functions as byval:

Code:
DECLARE FUNCTION BPAssessment% (byval Feld%, byval Column%, byval row%, byval developed%)
DECLARE FUNCTION WPAssessment% (byval Feld%, byval Column%, byval row%, byval developed%)

For some stupid reason the byref vars are changed when they shouldn't.. QB's trick of using ()'s to create temp vars for functions arguments doesn't work with FB, nor will.

I identified the byval issue it 4 hours after you, v1ctor Big Grin

I agree the () trick is too cheap to be implemented, but could the compiler issue an error when it detects it so code can be modified? It would spare a lot of time to so-called "coders" as me...
Hahahaha Vic, with 32-bit power, WHY should you even bother working extra with modularizing? I mean its for a text adventure...it;s not like we are making a frickin FPS or something Tongue
Quote:
na_th_an Wrote:Yes, I mean a 115 Kb .BAS file.

Whar a shame! The author of so many articles about modularizing. using a single huge source!! :rotfl:
I hate to be the one to tell you the bad news but Minimax is modularized. It is just some some basics don't show it that way.
In the beggining of the program you will find several "SUB" and "FUNCTIONS" all of these are modules. If you can find an old version of Qbasic or QuickBasic you will be able to see all the seperate modules. I have worked with this program for a couple of years now in several different basics but I don't know how to to use FreeBasic.
Let me know if and when you finish as I would love to see it compiled.
Bill
How did you find that old post? Big Grin

MINIMAX for FB ishere

Notice I'm not a chess player, my grandfather taught me the rules but I have not played for 30 years or so.. I just used MINIMAX to test how the early versions of FB (0.09) compiled a complicated QB program. I have only changed the minimum required to make it compatible with FB.

I have not done exhaustive tests to see if al functionalities are presserved, I have not even played a complete game, with that primitive user intreface.

The 1.5 year old code compiled with the latest unstable 0.16 version without a change...
Quote:Hahahaha Vic, with 32-bit power, WHY should you even bother working extra with modularizing? I mean its for a text adventure...it;s not like we are making a frickin FPS or something Tongue

It's got nothing to do with a platform or hardware limits. It's got to do with a programming mindset. Once you start modularizing, reusing code and making it more flexible/transparent becomes a lot easier.
One year and a half late, Eric Big Grin
Pages: 1 2 3