Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 1675
Number of posts: 4764

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
CALL ABSOLUTE under QuickBasic 4.5 Posted by Matthew Gross on 20 Sept 1998 at 10:17 PM
I'm trying to port my WAV player library to QuickBasic 4.5, and I've<br>
encountered a problem... The help guide says it uses the same format as any<br>
other BASIC does, i.e. the parameter of an integer to say which memory location<br>
to call.<br>
However, when I try running my program, it gives me the error "Subprogram not defined"<br>
at the CALL statement. It apparently doesn't recognize the CALL ABSOLUTE as it's <br>
own type of function.<br>
Does anyone know the correct way the use CALL ABSOLUTE under QuickBasic 4.5?


URL:http://acheronx.ml.org/home/

Edit Report
Re: CALL ABSOLUTE under QuickBasic 4.5 Posted by Andrew Smith on 22 Sept 1998 at 4:25 AM
: I'm trying to port my WAV player library to QuickBasic 4.5, and I've<br>
: encountered a problem... The help guide says it uses the same format as any<br>
: other BASIC does, i.e. the parameter of an integer to say which memory location<br>
: to call.<br>
: However, when I try running my program, it gives me the error "Subprogram not defined"<br>
: at the CALL statement. It apparently doesn't recognize the CALL ABSOLUTE as it's <br>
: own type of function.<br>
: Does anyone know the correct way the use CALL ABSOLUTE under QuickBasic 4.5?<p>
Hi Matt,<p>
It is Andrew Smith here. What you are doing wrong is that<br>
you are not loading the QB library. If you try at the command prompt:<br>
qb /l it will load the library (/l) and the program will work.<p>
Hope it helps,<br>
Andrew<p>



Edit Report
Thanks! Posted by Matthew Gross on 22 Sept 1998 at 10:29 AM
That was exactly the problem... turns out I don't even<br>
have to alter anything from QBASIC... Any particular reason<br>
you need to specify to load the library? If it's so vital to<br>
program operation, you'd think they'd do it automatically...<p>
Matthew Gross<br>
Acheron@Hotmail.com


URL:http://acheronx.ml.org/home/

Edit Report
I agree about the library Posted by Andrew Smith on 23 Sept 1998 at 3:02 AM
Hi Matt,<br>
I agree with you on the automatic load of the library. It is<br>
not SO important because it is only used with mous routines, wav<br>
stuff etc. I think mainly with interaction of other languages.<br>
But for e.g. the mouse - The qb library has the picture of the<br>
cursor so you just use that instead of drawing it.<p>
If you have a link of Qbasic in Win95 (say on the desktop), just right-click<br>
and choose properties. Then for the shorcut instead of qb.exe, make<br>
it qb.exe /l because then it will always load the library.<p>
The only prob I was wondering was when you compile it, will it add the library functions?<p>
Anyway, like to be of assistance, <br>
Andrew<p>



Edit Report
Re: I agree about the library Posted by Mark Meijer on 25 Sept 1998 at 4:11 AM
: The only prob I was wondering was when you compile it, will it add the library functions?<p>
<br>
Hi,<p>
The QB45 IDE has the 'Make EXE' option from the Run menu. If you use this to make an EXE, the .LIB versions of any QuickLibrary you specified on the command line to QB will automatically be included in the link, provided that the .LIB is available. In the case of CALL ABSOLUTE, it means that you will need QB.QLB to you run your program from the interpreter, and QB.LIB if you decide to compile. This works the same for any QLB/LIB you want to include (you can use the /l switch to include other libraries as well, but you will need to declare any subs/functions you use from QB. Note that this is another way you can use routines from another programming language, provided that you use the PASCAL calling convention and the MEDIUM memory model).<p>
One small question from me: Does any of you know how QuickBasic represents its strings? I would like to know for when I need to create routines in another language that require a string as parameter. Thanks, and I hope my information was useful.<p>
Happy programming :)<br>
Mark


Edit Report
Re: CALL ABSOLUTE under QuickBasic 4.5 Posted by Jeffrey Spidle on 4 Nov 1998 at 1:44 PM
Start QB like this: QB /L<p>
NOTE: QB doesent have call absolute,<br>
but when you type QB /L then it loads a library<br>
file containing the ABSOLUTE function





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.