Electron microscopy
 
Library Functions in DM and C++
- Practical Electron Microscopy and Database -
- An Online Book -
Microanalysis | EM Book                                                                                   http://www.globalsino.com/EM/        


=================================================================================

 

C++ defines a rather large set of functions that are contained in the standard library. These functions are designed to perform many commonly needed tasks such as I/O operations, mathematical computations, and string handling. When a library function is used, the C++ compiler automatically links the object code for that function to the object code of the program. The library functions act as building blocks that is assembled simply. On the other hand, if you write a function which is used again and again, it can also be stored in a library.

Table 1145 shows examples of scripts of libraries and scripts to call libraries. The installation of library scripts on DM is below (the name can be anything you prefer):
                               installation of library scripts on DM

You can execute the script, which is used to call the library scripts, with or without installation of the script itself, even though the library scripts have to be installed in order to be executed.

Table 1145. Examples of scripts of libraries and scripts to call libraries.

Scripts of libraries Scripts to call libraries
◆ Script:

Script file
◆ Script:

◆ The function name in Line 11 has to be the same as the TagGroup name in Line 9 in the DM library, which is GlobalSino() here.
◆ Result of script execution:

Script file

 

 

 

 

 

 

 

 

 

 

=================================================================================