Library routines
Library programs
Library programs are available on most modern operating systems such as Windows and Linux. They are programs that have been written by experienced programmers. The programs carry out specific jobs that may be frequently needed by the developers of new applications.
For example, a user may be developing a new application that needs to be able to:
-
- write data to a storage device
- transfer data from one storage device to another
- open a Window with a menu on it
- send a file to a printer
- use a scanner.
Because these actions are so common, a library of programs are written and then made available to users. They may come as part of an operating system or they may be bought, loaded onto a computer or network and then be made available to users. All a developer has to do is ‘CALL’ a particular program when they need it from within their own program. Using library routines is a great idea! The code for any particular function in a library has already been written and therefore time and money doesn’t have to be spent ‘reinventing the wheel’ by writing the code again.
The code in a library program will have been written by experienced programmers and will have undergone thorough testing. It is therefore likely that the library program will not contain any programming errors, known as ‘bugs’. It can be relied on to work. Because the library programs are called up only when they are needed and already present on the computer, a new application being developed will be smaller in size than if it had to have its own code to do particular functions. This means that it needs less storage space on the hard drive and less RAM when it is being run.