CALL ABSOLUTE error "Sub Program Not Defined"

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
User avatar
coma8coma1
Veteran
Posts: 100
Joined: Sat Dec 08, 2007 5:29 pm
Location: Maryland, USA

CALL ABSOLUTE error "Sub Program Not Defined"

Post by coma8coma1 »

I recently moved all my projects to a different system. In the past I was developing on an old Compaq running Win95. Now I've put that old thing away I started working on my fresh install of WinXP on my main system.

Made the identical folders and just copied everything over, code, notes, QB7.1, everything, identical to how it was on the old system. That's how I've always done it. Always works.

Everything's going fine and dandy until I try to incorporate my mouse routines into this new project. QuickBasic Extended is returning a "Sub Program Not Defined" error at the CALL ABSOLUTE line in my mouse code when I try to run it. I go back and check other code from other projects that I KNOW works and same thing; error. won't run. ???!?

I've seen this error from CALL ABSOLUTE before, but that's usually in QBASIC, not QuickBASIC 7.1, so what gives? The only thing that I cant think that's different is the operating system. I'm pulling my hair out here trying to think of what it could be.

And what really gets me is that I've had these programs running on this machine before. New windows install now, doesn' work. Executables work, of course. But QBX chokes on the code.

halp me plz! thanks in advance!
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

This is one of the most commonly asked questions with QB. What you have to do is start up the IDE with the default quicklibrary loaded. In the case of 7.1, it should be:

Code: Select all

qbx /l
to load the default quicklibrary.

Perhaps before you had a method of loading the library automagically...
User avatar
coma8coma1
Veteran
Posts: 100
Joined: Sat Dec 08, 2007 5:29 pm
Location: Maryland, USA

Post by coma8coma1 »

ha! that's it. thanks bro

i knew it was somethnig obvious. and i was about to give up! thanks again

-coma8coma1
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Qbasic does not need a library to run ABSOLUTE!

Post by burger2227 »

Quickbasic 4.5 and 7.1 require a library for Absolute and Interrupt routines. Qbasic cannot run Interrupt routines.

Make a shortcut to QBX.EXE and add a space /L at the end of the command line in properties. You will have to use the File - Open program menu to run a program using a shortcut.

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
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

A better way is to create a batch file.

Code: Select all

@qbx /l qbx.qlb %1
User avatar
coma8coma1
Veteran
Posts: 100
Joined: Sat Dec 08, 2007 5:29 pm
Location: Maryland, USA

Post by coma8coma1 »

funny, it works fine when i double click qbx.exe and load my programs from within, but i cannot double click a .bas file (which i told windows to open with qbx) and run it from there, it still gives the error that way.

i want to be able to doubleclick my bas files like i used to :(

how does one go about making a batch file?
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

A batch file is merely a text file that you rename the extension to .bat. The file contains normal command line instructions. You could associate .BAS files with the batch file that you would use to start up QBX with the default library loaded.
User avatar
coma8coma1
Veteran
Posts: 100
Joined: Sat Dec 08, 2007 5:29 pm
Location: Maryland, USA

Post by coma8coma1 »

i just made my first file yo!

;)
Post Reply