Old FB Program No Longer Works

General FreeBASIC programming questions.
Novice
Posts: 14
Joined: Aug 12, 2008 21:28

Old FB Program No Longer Works

Postby Novice » Jun 02, 2011 2:06

It's been a long time since I checked in here, and I've forgotten a lot of what I learned about programming. But this forum was very helpful to me a few years ago when I was trying to convert my very primitive M-BASIC to Q-BASIC and then to a compiled FB version.

The program, which involves simple FOR-NEXT loops and subroutines, seems to run correctly on the first run-through using one of the many versions I tried when I was first setting it up. but on the subsequent runs, the loop hangs up and returns me to the main menu. I have no idea what to look for, and I've been driving myself nuts trying to find it in the BAS code.


Is there a common mistake that might cause this to happen? (By the way, I'm running in a DOS window within Windows XP.

I'd really appreciate any suggestions you can offer. Thanks.

Novice
Prime Productions
Posts: 147
Joined: May 24, 2009 23:13
Location: Texas, United States, Planet Earth
Contact:

Postby Prime Productions » Jun 02, 2011 2:19

Hmmm, I am not sure what the problem is.

It might help though, if you posted some code. I don't think the fact that you are in text-mode should have any significance.
Richard
Posts: 3047
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Jun 02, 2011 3:24

Two years should not make that much difference.
What version of FB compiler do you now use. If you remember, what was your old version number.
Please post some code that demonstrates the problem.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Postby sir_mud » Jun 02, 2011 5:27

You could also try compiling with -lang fblite, it's more like the older versions of fb.
Novice
Posts: 14
Joined: Aug 12, 2008 21:28

Re: Old FB Program No Longer Works

Postby Novice » Jun 02, 2011 20:34

Richard wrote:Two years should not make that much difference.
What version of FB compiler do you now use. If you remember, what was your old version number.
Please post some code that demonstrates the problem.


I have FreeBasic version 5.1.2600. I'll try to post some of the code, but it's been so long since I've worked on this that I have to figure out just what I was trying to do. It'll take me some time to figure out the right code section to post, but I'll work on it.

Thanks.

Novice
fxm
Posts: 10058
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Old FB Program No Longer Works

Postby fxm » Jun 02, 2011 21:05

Novice wrote:
Richard wrote:Two years should not make that much difference.
What version of FB compiler do you now use. If you remember, what was your old version number.
Please post some code that demonstrates the problem.


I have FreeBasic version 5.1.2600. I'll try to post some of the code, but it's been so long since I've worked on this that I have to figure out just what I was trying to do. It'll take me some time to figure out the right code section to post, but I'll work on it.

Thanks.

Novice

1.
When you edit a post, check the option BBCode to activate the BBcode tags (you can check it per default in your profile).

2.
5.1.2600 is your Microsoft Windows version, and not the FreeBasic compiler version!
Richard
Posts: 3047
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Jun 02, 2011 22:33

@ Novice.
Run this FB code to identify your FB version.

Code: Select all

Print __FB_version__
Sleep


The topic title is that in the first page. It is ignored on later replies.

As fxm suggested; When you write a post you need to enable BBcodes for the [quote../quote] and other BBcodes to work. You can "always enable BBcodes" by Logging in, Select Profile, then change the Bbcode setting near the bottom of the page. [As moderator I enabled your first post BBcode for you.]
Novice
Posts: 14
Joined: Aug 12, 2008 21:28

Postby Novice » Jun 03, 2011 21:09

Richard wrote:@ Novice.
Run this FB code to identify your FB version.

Code: Select all

Print __FB_version__
Sleep


The topic title is that in the first page. It is ignored on later replies.

As fxm suggested; When you write a post you need to enable BBcodes for the [quote../quote] and other BBcodes to work. You can "always enable BBcodes" by Logging in, Select Profile, then change the Bbcode setting near the bottom of the page. [As moderator I enabled your first post BBcode for you.]


Thank you. I have enabled BB codes in my profile. Please excuse my ignorance, but it's been a long time since I did any programming or used FreeBasic in any way. Please refresh my memory about at least how to access the FreeBasic help files/list of available codes and syntax.


Thanks again .

Novice
Richard
Posts: 3047
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Jun 03, 2011 21:13

@ Novice. You are welcome.
Novice
Posts: 14
Joined: Aug 12, 2008 21:28

Postby Novice » Jun 03, 2011 21:43

Richard wrote:@ Novice. You are welcome.


It took me a while, but I think I finally got it right. It looks as if my version of FB has a specific command for "version." When I entered

fbc -version

I got the following:

FreeBasic Compiler - Version 0.20.0 <08-10-2008> for win32 <target:win32>
Copyright <C> 2004-2008 The FreeBasic Development Team
Configured as a standalone

Does that help?


Novice
Richard
Posts: 3047
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Jun 03, 2011 21:56

Yes, a little.
We cannot identify a bug that we cannot see demonstrated.
It would be very helpful to see a listing of the code that you claim does not work. If possible, paste your FB source code into a code box.
Without that we cannot really proceed.
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Postby petan » Jun 04, 2011 9:03

Hi,

Two things:
- You could try to find your possible crashpoint with block comments "/' and '/" .See help file for un/commnenting code

- Why DOS window under XP ?? Use pure FB power, full monitor resolution.No problemo.
And use FB version 0.21.1 or the newest 0.22 instead.

Pete

Return to “General”

Who is online

Users browsing this forum: fxm and 16 guests