Whats a library ???
-
- Newbie
- Posts: 6
- Joined: Sat Mar 26, 2005 11:14 am
Whats a library ???
i keep on hearing talk about a library what exactly is a library and what does it do????
Well, with my english it might be hard to explain shortly.
Check this
It might give you a little help for start.
Check this
It might give you a little help for start.
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
A library, typically, is a file that contains a set of functions and subroutines that pertain to a given task. They are all grouped in a bas module and can be compiled with the compiler as a lib or a quick library (to be loaded in the IDE of the Basic implementation that you use).
In other words, libraries are a good thing for organizing your code into functional groups for one thing.
In other words, libraries are a good thing for organizing your code into functional groups for one thing.
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
- ShadowWolf
- Veteran
- Posts: 56
- Joined: Thu Mar 04, 2004 1:32 pm
- Contact:
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
No, this is defining a sub or function:
That's the definition of a sub or a function....
This is how you call a sub or function:
In Mystiks terms he was refering to the declarations which are the ACCUAL subs or functions in the program, the definitions just define them, the computer doesn't go to the definitions when it is called:
Those ARE the terms...I definatly remeber that....MystikShadows WAS right but I was just correcting him on his terms....
Code: Select all
SUB MySub (A, B, C)
B = A + B
C = B + C
A = A + B * C
'other code
END SUB
This is how you call a sub or function:
Code: Select all
MySub A, B, C
Code: Select all
DECLARE SUB MySub (A, B, C)
"But...It was so beutifully done"
Incorrect. A library is a binary file which is a collection of procedures that is linked into the program with the linker. The definitions are kept elsewhere, usually in a header file. I believe you're getting things confused with how FB works...and even there, the concept of a library is still the same...it's just that some people believe .a files to be libraries when they're not always libraries but sometimes simply definitions.Mitth'raw'nuruodo wrote:NO!
A library generally has DEFINITIONS of functions + subs. There's a difference.
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact: