BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help

Search "Library Functions"

Contents Navigation

Library Functions

Print-Friendly  Order the PDF version  Order the RTF version
About 2 pages (439 words)
Library (computer science) Summary

Bookmark and Share Know this topic well? Help others and get FREE products!

Library Functions

A library function is a function that can be called by a program to perform some task, but it is not part of the program itself. Typically library functions are collected together into libraries, which comprise suites of functions that are loosely related in some way. An example might be a collection of functions that deal with dates and times and how they can be formatted or represented. Libraries save programmers the bother of writing code to do the same tasks time and time again; in short, libraries encourage code reuse.

The code the library comprises is usually in the form of "machine code" that the computer can understand rather than human-readable source code, although this is not always the case, especially with "open source" libraries like those from the GNU project.

There are two main types of libraries: static libraries that are read by the compiler at compile-time and bound into the final version of the executable code; and dynamic libraries that are referred to by name to the compiler but the code is not actually incorporated into the executable until the program is run. One advantage of dynamic libraries is that they can be updated without having to update the program that calls them.

When programmers want to use a function from a library they call it by name and make sure that the compiler or the run-time environment can see the pre-compiled code or "library file." In C and C++ the programmers also need a "header file" that describes how the library functions should be called so the compiler can carry out its type-checking as it compiles the program. Most compilers also support options or "switches" to allow programmers to create their own libraries from their own code.

Function libraries extend the native language they are written in by providing easily accessible commonly used functionality that the language itself does not directly support. A good example is the C programming language. C by itself has very little functionality other than the raw operators the language supports; however, some functions are so useful and needed so often that they have been packaged into libraries and now form part of the standard distribution of the language. That is, ANSI C comes with "standard libraries" for manipulating character strings and for performing input from the keyboard and output to the monitor, even though these things are not part of the strict definition of the language.

Currently nearly all computer-programming languages have a vast array of libraries, both free and commercial packages, that are available to carry out almost every conceivable function--from manipulating socket connections between computers to performing complex and military-grade cryptographic transformations.

This is the complete article, containing 439 words (approx. 1 page at 300 words per page).

More Information
  • View Library Functions Study Pack
  • Search Results for "Library Functions"
  • Add This to Your Bibliography
  • More Products on This Subject
    Library
    In programming, a library is a collection of precompiled routines that are available for use by pro... more

    Library Constants
    The term library constant is relevant to computer science in the context of programming and program... more


     
    Ask any question on Library (computer science) and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Library Functions from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags




    About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy