Qbasicnews.com
January 17, 2021, 06:32:18 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Back to Qbasicnews.com
|
QB Online Help
|
FAQ
|
Chat
|
All Basic Code
|
QB Knowledge Base
Home
Help
Search
Login
Register
Qbasicnews.com
>
QBasic
>
QB Discussion & Programming Help
>
Library help
Pages: [
1
]
« previous
next »
Print
Author
Topic: Library help (Read 3178 times)
zoasterboy
Guru
Posts: 295
Personal Text!
Library help
«
on:
November 03, 2006, 09:35:19 PM »
How do you create/use a library in QB?
Logged
-yah
zoasterboy
Guru
Posts: 295
Personal Text!
Library help
«
Reply #1 on:
November 04, 2006, 08:31:01 PM »
Fine... Ill find a tutorial somwhere.
Logged
-yah
E.K.Virtanen
Senior Member
Posts: 166
Library help
«
Reply #2 on:
November 06, 2006, 07:48:09 PM »
Quote from: "
www.ascii-world.com
"
Itīs not just once or twice when some one have asked that why and how to use and make library with QBasic.
You can use libraryes as you use Subīs and Functionīs.
Library is really easy to create and you can add there routines and codes that are used
in your programs often, just as you use Subīs and Functions.
Well, why use own library instead of Subīs or Functions?
In QBasic is a limit that all knowīs. Itīs called 64K barrier.
But using your own libraryes, you can avoid it.
EXEīs are created on QBasic with two program co-operation.
At first it will be compiled as a OBJ file with BC.EXE and after that
it will be linked to EXE with LINK.EXE.
Libraryes are added on your program on linking part, after BC.EXE compileīs your program to OBJ.
64K limit is on BC.EXE program not on LINK.EXE anymore (when libraryes are added also) so basicly
you can do this way programs what sizeīs can be more than 64K. In matter affact, there are
no limits then.
Here is a simple example how to create and use your own library.
Start QB.EXE with no parameters.
Code:
Sub PrintMe
Print " I made it!!!"
End Sub
Now you gotta make it as a library. Just go on "Run" and choose "MAKE LIBRARY..."
Ok, so now you got a library there.
Now quit your QBasic and re-start it with parameter
QB.EXE /L YourLibrary.QLB
Now, type these line and you see how it works.
Code:
Declare Sub PrintMe Alias "PrintMe" ()
Print "Now we move on library..."
Call PrintMe
Print "...and now we are back on main program."
End
Now, press F5 and see what happends
Logged
url=http://www.ascii-world.com]ASCII-World.com[/url]
Yeah, nick changed from lurah, but bullshit's are the same.
zoasterboy
Guru
Posts: 295
Personal Text!
Library help
«
Reply #3 on:
November 07, 2006, 01:22:12 AM »
Kewl thanks.
Logged
-yah
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forum has moved
-----------------------------
=> Forum has moved
-----------------------------
QbasicNews.Com
-----------------------------
=> QB/FB News
=> Site/Forum Issues
=> Challenges
-----------------------------
QBasic
-----------------------------
=> QB Discussion & Programming Help
=> QB Projects
-----------------------------
Qbasic "like" compilers/interpreters
-----------------------------
=> General QB "like"
=> QB64
=> FB Discussion & Programming Help
===> FB Projects
===> FB Documentation
-----------------------------
General
-----------------------------
=> General/Misc
===> Art & Music
===> General Programming
Loading...