


      INTRO(3)                                                 INTRO(3)



      NAME
           intro - introduction to subroutines and libraries

      SYNTAX
           #include <stdio.h>

           #include <math.h>

      DESCRIPTION
           This section describes functions found in various libraries,
           other than those functions that directly invoke UNIX system
           primitives, which are described in Section 2 of this volume.
           Certain major collections are identified by a letter after
           the section number:

           (3C)  These functions, together with those of Section 2 and
                 those marked (3S), constitute the Standard C Library
                 libc, which is automatically loaded by the C, FORTRAN
                 and Pascal compilers, rc(1), rf(1) and rp(1).  The
                 link editor ld(1) searches this library under the -lc
                 option.  Declarations for some of these functions may
                 be obtained from #include files indicated on the
                 appropriate pages.
           (3F)  See the Bull-SPS9 Risc-Optimized FORTRAN Compiler
                 Manual.
           (3M)  These functions constitute the Math Library, libm.
                 They are automatically loaded as needed by the FORTRAN
                 and Pascal compilers.  They are not automatically
                 loaded by the C compiler; however, the link editor
                 searches this library under the -lm option.
                 Declarations for these functions may be obtained from
                 the #include file <math.h>.
           (3S)  These functions constitute the ``standard I/O
                 package'' (see stdio(3S)).  These functions are in the
                 library libc, already mentioned.  Declarations for
                 these functions may be obtained from the #include file
                 <stdio.h>.
           (3X)  Various specialized libraries.  The files in which
                 these libraries are found are given on the appropriate
                 pages.

           Note that Pascal and C use the same calling conventions.
           Therefore, any system call usable from C can also be called
           from Pascal.  Only the C interface is described.

      DEFINITIONS
           A character is any bit pattern able to fit into a byte on
           the machine.  The null character is a character with value
           0, represented in the C language as '\0'.  A character array
           is a sequence of characters.  A null-terminated character
           array is a sequence of characters, the last of which is the
           null character.  A string is a designation for a null-



      Page 1                                         (73 A2 02MTA REV1)






      INTRO(3)                                                 INTRO(3)



           terminated character array.  The null string  is a character
           array containing only the null character.  A NULL pointer is
           the value that is obtained by casting 0 into a pointer.  The
           C language guarantees that this value will not match that of
           any legitimate pointer, so many functions that return
           pointers return it to indicate an error.  NULL is defined as
           0 in <stdio.h>; the user can include his own definition if
           he is not using <stdio.h>.

           Many groups of FORTRAN intrinsic functions have generic
           function names that do not require explicit or implicit type
           declaration.  The type of the function will be determined by
           the type of its argument(s).  For example, the generic
           function max will return an integer value if given integer
           arguments (max0), a real value if given real arguments
           (amax1), or a double-precision value if given double-
           precision arguments (dmax1).

      FILES
           /lib/libc.a
           /lib/libm.a

      SEE ALSO
           ar(1), ld(1), nm(1), rc(1), rf(1), rp(1), intro(2),
           stdio(3S).






























      Page 2                                         (73 A2 02MTA REV1)






      INTRO(3)                                                 INTRO(3)



      DIAGNOSTICS
           Functions in the Math Library (3M) may return 0 or INF (see
           the AS section in the ROS Programmer's Guide) when the
           function is undefined for the given arguments or when the
           value is not representable.  In these cases, the external
           variable errno (see intro(2)) is set to the value EDOM or
           ERANGE.  As many of the FORTRAN intrinsic functions use the
           routines found in the Math Library, the same conventions
           apply.














































      Page 3                                         (73 A2 02MTA REV1)



