Odd behavior when running a compiled .bas file

General FreeBASIC programming questions.
Post Reply
ionheavens
Posts: 2
Joined: Jun 02, 2021 23:25

Odd behavior when running a compiled .bas file

Post by ionheavens »

I am having odd problems after installing FreeBASIC-107.3. It has been a few years since I have compiled anything in fbc. I updated to latest version and attempted to compile and run an old program and I am getting odd behavior. After troubleshooting, I found it aborts the compiled program when I attempt to close a file, like CLOSE #1, which is open. It also will end a FOR loop, after which I have a test PRINT "xxx" command and the program just ends without doing the test print command (also feels like an abort).

At first I thought I had a privilege issue but that does not seem to be the case.

Any ideas why such odd behavior.

I am running a 64 bit Windows system but could not find a .exe install file. So I installed the 32 bit version FreeBASIC-1.07.3-win32.exe.

thx -art-
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Odd behavior when running a compiled .bas file

Post by Imortis »

Have you tried compiling with runtime error checking turned on? The compile command line would need the "-exx" option added. That may give a bit better info on what the issue it.

Other than that, it is difficult to say what the issue might be without some code that duplicates the issue.
ionheavens
Posts: 2
Joined: Jun 02, 2021 23:25

Re: Odd behavior when running a compiled .bas file

Post by ionheavens »

Thanks! That did the trick. I was blowing thru the end of an array because I had a misspelling in a variable in the DIM statement. Not sure why it worked sometimes but I was also getting corruption in other variables. That explains why! Great job! Thanks again. -art-
Post Reply