Illegal function in exe file

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
germarin
Newbie
Posts: 4
Joined: Thu Feb 03, 2011 2:32 pm

Illegal function in exe file

Post by germarin »

The QB4.5 file in the Run mode works correctly. As soon I have made an exe file, an error: Illegal function Call in line No line number in module REGN at adtress 1192:05A6 , appears.
How can I find the illegal fuction by means of that adres?
In my opinion I was trying almost everything!
please help
Gerhard
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

What is REGN? A register number, a program or BAS file or what?

If you have an ON ERROR handler in the program, it may continue with RESUME NEXT. Try running it with and without an error handler.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
germarin
Newbie
Posts: 4
Joined: Thu Feb 03, 2011 2:32 pm

Post by germarin »

REGN.exe is a program. The REGN.bas file works correctly wthout errors, but the exe file gives error: illegal function call in line NO lines number in module REGN at adress 1192:05A6
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Post the code or email it. If it uses other files, include them too. NO EXE FILES!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
germarin
Newbie
Posts: 4
Joined: Thu Feb 03, 2011 2:32 pm

Illegal fuction call

Post by germarin »

hello,
the error message is, like I mentioned before. No other code. No programs linked. The *bas version works correctly, without errors.
regards Gerhard
OPRESION
Veteran
Posts: 61
Joined: Tue Jan 16, 2007 4:15 am
Location: Mexico

Re: Illegal function in exe file

Post by OPRESION »

germarin wrote:... How can I find the illegal fuction by means of that adres?...
THOSE ADDRESSES ARE THE LOCATION INTO THE EXECUTABLE.

I WOULD BEGIN DOING THESE THINGS:

(A) TO RELOAD THE SOURCE USING: QB.EXE /AH/L OR QBX.EXE /AH/L

(B) TO PUT NUMBERLINES TO THE CODELINES SO THE MESSAGE
COULD TELL ME THE EXACT ERROR LINE

(C) TO PRINT A NUMBER ON THE SCREEN EVERY CERTAIN NUMBER
OF LINES, SO, WHEN THE ERROR MESSAGE APPEARS IT WILL
BE AFTER THE LAST NUMBER APPEARED IN THE SCREEN.
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
germarin
Newbie
Posts: 4
Joined: Thu Feb 03, 2011 2:32 pm

Post by germarin »

Thanks for your answer. Reloading gives no change. I hoped that with the adress in the error message, it should be in some way possible to find the location in the *.bas file. To print numbers has in this case no effect. The *.exe program starts in a normal way and is asking for the first input. As soon the input input$(1) is realized, the illegal function appears. When I write a line number at the beginning of a line, is that at the same time a label? Have you any experience with a source file which is working normally,and when making an exe file it gives no severe errors, starting as an exe file normally, prints the tittle correctly, but fails with the first input? I programmed a lot in QB4.5, but it never happens before.
Gerhard
OPRESION
Veteran
Posts: 61
Joined: Tue Jan 16, 2007 4:15 am
Location: Mexico

Post by OPRESION »

... When I write a line number at the beginning of a line, is that at the same time a label? ...
YES, LABELS ALSO CAN BE JUST NUMBERS, THE ERROR MESSAGE
WOULD TELL YOU THE LINE WHERE IT'S LOCATED THE ERROR.

... As soon the input input$(1) is realized, the illegal function appears ...
I THINK THE ERROR IT'S RIGHT AFTER THE INPUT$(1),
WHAT KEY DO YOU PRESS? HOW DO YOU PROCESS THAT KEY?
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
Post Reply