Name: NXPOSN  18
The function  NXPOSN converts X user coordinates to plot coordi-
nates.
The call is:  IXP = NXPOSN (X)                        level 2, 3
         or:  int   nxposn ();
IXP           is the plot coordinate returned by NXPOSN.
X             is the user coordinate to be converted.
Name: NYPOSN  18
The function  NYPOSN converts Y user coordinates to plot coordi-
nates.
The call is:  IYP = NYPOSN (Y)                        level 2, 3
         or:  int   nyposn ();
IYP           is the plot coordinate returned by NYPOSN.
Y             is the user coordinate to be converted.
Name: XPOSN   18
The function XPOSN converts X user coordinates to plot coordina-
tes.
The call is:  XP  = XPOSN (X)                         level 2, 3
         or:  float xposn ();
XP            is the plot coordinate returned by XPOSN.
X             is the user coordinate to be converted.
Name: YPOSN   18
The function YPOSN converts Y user coordinates to plot coordina-
tes.
The call is:  YP  = YPOSN (Y)                         level 2, 3
         or:  float ypson ();
YP            is the plot coordinate returned by YPOSN.
Y             is the user coordinate to be converted.
Name: XINVRS  18
The function  XINVRS converts X plot coordinates to user coordi-
nates.
The call is:  X  =  XINVRS (NXP)                      level 2, 3
         or:  float xinvrs (nxp);
X             is the user coordinate returned by XINVRS.
NXP           is the plot coordinate to be converted.
Name: YINVRS  18
The function  YINVRS converts Y plot coordinates to user coordi-
nates.
The call is:  Y  =  YINVRS (NYP)                      level 2, 3
         or:  float yinvrs (nyp);
Y             is the user coordinate returned by YINVRS.
NYP           is the plot coordinate to be converted.
Name: TRFREL  18
TRFREL converts user coordinates to plot coordinates.
The call is:  CALL TRFREL (XRAY, YRAY, N)             level 2, 3
         or:  void trfrel (float *xray, float *yray, int n);
XRAY, YRAY    are arrays containing the user coordinates.  After
              the call, they contain the calculated plot coordi-
              nates.
N             is the number of points.
Name: TRFCO1  18
The routine TRFCO1 converts one-dimensional coordinates.
The call is:  CALL TRFCO1 (XRAY, N, CFROM, CTO) level 0, 1, 2, 3
XRAY          is an array containing angles expressed in radians
              or degrees.  After a call to TRFCO1, XRAY contains
              the converted coordinates.
N             is the number of coordinates.
CFROM, CTO    are  character strings  that  can have  the values 
              'DEGREES' and 'RADIANS'.
Name: TRFCO2  18
The routine TRFCO2 converts two-dimensional coordinates.
The call is:  CALL TRFCO2 (XRAY, YRAY, N, CFROM, CTO)
                                                level 0, 1, 2, 3
XRAY, YRAY    are arrays containing rectangular or polar coordi-
              nates.  For  polar coordinates,  XRAY contains the
              angles measured in degrees and YRAY the radii.
N             is the number of coordinates.
CFROM, CTO    are  character strings  that  can  have the values
              'RECT' and 'POLAR'. 
Name: TRFCO3  18
The routine TRFCO3 converts three-dimensional coordinates.
The call is:  CALL TRFCO3 (XRAY, YRAY, ZRAY, N, CFROM, CTO)
                                                level 0, 1, 2, 3
XRAY, YRAY,   are arrays  containing rectangular,  spherical  or
    ZRAY      cylindrical  coordinates.   Spherical  coordinates
              must be in the form  (longitude, latitude, radius)
              where
                       0 <= longitude <= 360   and
                     -90 <= latitude  <=  90.
              Cylindrical  coordinates  must  be in  the  form
              (angle, radius, z).
N             is the number of coordinates.
CFROM, CTO    are  character strings  that can  have  the values
              'RECT','SPHER' and 'CYLI'. 

Name: NLMESS  19
The function  NLMESS returns the length  of text in plot coordi-
nates.
The call is:  NL = NLMESS (CSTR)                   level 1, 2, 3
         or:  int  nlmess (cstr);
CSTR          is a character string (<= 256 characters).
NL            is the length in plot coordinates.
Name: TRMLEN  19
The function TRMLEN  returns the number of  characters in a cha-
racter string.
The call is:  NL = TRMLEN (CSTR)                level 0, 1, 2, 3
         or:  int  trmlen (cstr);
CSTR          is a character string.
NL            is the number of characters.
Name: UPSTR   19
UPSTR converts a character string to uppercase letters.
The call is:  CALL UPSTR (CSTR)                 level 0, 1, 2, 3
         or:  void upstr (char *cstr);
CSTR          is a character string to be converted.
Name: NLNUMB  19
NLNUMB calculates the length of numbers in plot coordinates.
The call is:  NL = NLNUMB (X, NDIG)                level 1, 2, 3
         or:  int  nlnumb (float x, int ndig);
X             is a real number.
NDIG          is the number of decimal places (>= -1).
NL            is the length in plot coordinates.
Name: INTLEN  19
INTLEN calculates the number of digits in integers.
The call is:  CALL INTLEN (NX, NL)              level 0, 1, 2, 3
         or:  int  intlen (int nx);
NX            is an integer.
NL            is the number of digits.
Name: FLEN    19
FLEN calculates the number of digits in real numbers.
The call is:  CALL FLEN (X, NDIG, NL)           level 0, 1, 2, 3
         or:  int  flen (float x, int ndig);
X             is a real number.
NDIG          is the number of decimal places (>= -1).
NL            is the  number  of digits  including  the  decimal
              point.
              For negative numbers, it includes the minus sign.
Name: INTCHA  19
INTCHA converts integers to character strings.
The call is:  CALL INTCHA (NX, NL, CSTR)        level 0, 1, 2, 3
         or:  int  intcha (int nx, char *cstr);
NX            is the integer to be converted.
NL            is the number of digits in NX returned by INTCHA.
CSTR          is the character string containing the integer.
Name: FCHA    19
FCHA converts real numbers to character strings.
The call is:  CALL FCHA (X, NDIG, NL, CSTR)     level 0, 1, 2, 3
         or:  int  fcha (float x, int ndig, char *cstr);
X             is the real number to be converted.
NDIG          is the number of decimal places to  be  considered
              (>= -1). The last digit will be rounded up.
NL            is the number of digits returned by FCHA.
CSTR          is  the character string  containing the real num-
              ber.
Name: SORTR1  19
SORTR1 sorts real numbers.
The call is:  CALL SORTR1 (XRAY, N, COPT)       level 0, 1, 2, 3
         or:  void sortr1 (float *xray, int n, char *copt);
XRAY          is an array containing real numbers.
N             is the dimension of XRAY.
COPT          defines the sorting  direction. IF COPT = 'A', the
              numbers will be sorted in ascending order; if COPT
              = 'D', they will be sorted in descending order.
Name: SORTR2  19
SORTR2 sorts two-dimensional points in the X-direction.
The call is:  CALL SORTR2 (XRAY, YRAY, N, COPT) level 0, 1, 2, 3
         or:  void sortr2 (float *xray, float *yray, int n, 
                                                    char *copt);
XRAY, YRAY    are arrays containing the coordinates.
N             is the number of points.
COPT          defines the sorting direction.  IF COPT = 'A', the
              numbers will be sorted in ascending order; if COPT
              = 'D', they will be sorted in descending order.
Note:         The Shell-algorithm is used for sorting.
Name: SPLINE  19
SPLINE calculates splined points used in CURVE to plot a spline.
The call is:  CALL SPLINE (XRAY, YRAY, N, XSRAY, XSRAY, NSPL)
                                                   level 1, 2, 3
         or:  void spline (float *xray,  float *yray,  int n,
                          float *xsray, float *ysray, int *nspl)
XRAY, YRAY    are arrays containing points of the curve.
N             is the dimension of XRAY and YRAY.
XSRAY, YSRAY  are the splined points returned by SPLINE.
NSPL          is  the number  of calculated  splined points  re-
              turned by SPLINE.  By default,  NSPL has the value
              201.
Note:         The number of interpolated points and the order of
              the polynomials can be modified with SPLMOD.
Name: BEZIER  19
The routine BEZIER calculates a Bezier interpolation.
The call is:  CALL BEZIER (XRAY, YRAY, N, XPRAY, YPRAY, NP) 
                                                   level 1, 2, 3
         or:  void bezier (float *xray,  float *yray,  int n,
                            float *xpray, float *ypray, int np);   
XRAY, YRAY    are arrays containing points of the curve.
N             is the dimension of XRAY and YRAY (1 < N < 21).
XPRAY, YPRAY  are the Bezier points returned by BEZIER.
NP            is the number of calculated  points defined by the
              user.
Name: HISTOG  19
The routine HISTOG calculates a histogram.
The call is:  CALL HISTOG (XRAY, N, XHRAY, YHRAY, NH)
                                                level 0, 1, 2, 3
         or:  void histog (float *xray, int n,
                           float *xhray, float *yhray, int *nh);  
XRAY          is an array containing floatingpoint numbers.
N             is the dimension of XRAY.
XHRAY, YHRAY  are arrays containing the calculated histogram.  
              XHRAY contains distinct values from XRAY sorted in
              ascending order.  YHRAY contains the  frequency of
              points.
NH            is the  number of  points in  XHRAY  and YHRAY re-
              turned by HISTOG.
Name: BITSI2  19
The routine BITSI2 allows bit manipulation on 16 bit variables.
The call is:  CALL BITSI2 (NBITS, NINP, IINP, NOUT, IOUT, IOPT)
                                               level 0, 1, 2, 3
         or:  short bitsi2 (int nbits, short ninp, int iinp,
                            short nout, int iout);
NBITS         is the number of bits to be shifted.
NINP          is a 16 bit variable from which to extract the bit
              field.
IINP          is the bit position of the leftmost bit of the bit
              field. The bits are numbered 0 - 15 where 0 is the
              most significant bit.
NOUT          is a 16 bit variable  into which the bit  field is
              placed (is returned for C).        
IOUT          is the bit  position where  to  put the bit field.
IOPT          controls whether the bits outside of the field are
              set to zero or not. If IOPT equal 0,  the bits are
              set to zero.  If IOPT  not equal 0,  the  bits are
              left as they are.
Name: BITSI4  19
The routine BITSI4 allows bit manipulation on 32 bit variables.
The call is:  CALL BITSI4 (NBITS, NINP, IINP, NOUT, IOUT, IOPT)
                                                level 0, 1, 2, 3
         or:  short bitsi4 (int nbits, int ninp, int iinp,
                            int nout, int iout);
NBITS         is the number of bits to be shifted.
NINP          is a 32 bit variable from which to extract the bit
              field.
IINP          is the bit position of the leftmost bit of the bit
              field. The bits are numbered 0 - 31 where 0 is the
              most significant bit.
NOUT          is a 32 bit variable  into which the bit  field is
              placed (is returned for C).        
IOUT          is the bit  position where  to  put the bit field.
IOPT          controls whether the bits outside of the field are
              set to zero or not. If IOPT equal 0,  the bits are
              set to zero.  If IOPT  not equal 0,  the  bits are
              left as they are.
Name: SWAPI2  19        
The routine SWAPI2 swaps the bytes of 16 bit integer variables.
The call is:  CALL SWAPI2 (IRAY, N)             level 0, 1, 2, 3 
         or:  void swapi2 (short *iray, int n);
IRAY          is an array containing the 16 bit variables.
N             is the number of variables.
Name: SWAPI4  19        
The routine SWAPI4 swaps the bytes of 32 bit integer variables.
The call is:  CALL SWAPI4 (IRAY, N)             level 0, 1, 2, 3 
         or:  void swapi4 (int *iray, int n);
IRAY          is an array containing the 32 bit variables.
N             is the number of variables.
Name: OPENFL  19
The routine OPENFL opens a file for binary I/O.
The call is:  CALL OPENFL (CFILE, NLU, IRW, ISTAT)
                                                level 0, 1, 2, 3
         or:  int openfl  (char *cfile, int nlu, int nrw);
CFILE         is a character string  containing the filename.
NLU           is the logical unit for the I/O  (0 <= NLU <= 99).
              The units 15 and 16 are reserved for DISLIN. 
IRW           defines  the  file access mode (0: READ, 1: WRITE,
              2: APPEND).
ISTAT         is the returned status (0: no errors). 
Name: CLOSFL  19
The routine CLOSFL closes a file.
The call is:  CALL CLOSFL (NLU)                 level 0, 1, 2, 3  
         or:  int  closfl (int nlu);
NLU           is the logical unit.
Name: READFL  19
The routine READFL reads a given number of bytes.
The call is:  CALL READFL (NLU, IBUF, NBYT, ISTAT) 
                                                level 0, 1, 2, 3  
         or:  int  readfl (int *nlu, char *ibuf, int nbyt);
NLU           is the logical unit.
IBUF          is an array where to read the bytes.
NBYT          is the number of bytes. 
ISTAT         is the number of bytes read (0 means end of file). 
Name: WRITFL  19    
The routine WRITFL writes a number of bytes.
The call is:  CALL WRITFL (NLU, IBUF, NBYT, ISTAT) 
                                                level 0, 1, 2, 3  
         or:  int writfl  (int nlu, char *ibuf, int nbyt);
NLU           is the logical unit.
IBUF          is an array containing the bytes.
NBYT          is the number of bytes. 
ISTAT         is the number of bytes written (0 means an error). 
Name: SKIPFL  19
The routine  SKIPFL skips a number of bytes from the current po-
sition.
The call is:  CALL SKIPFL (NLU, NBYT, ISTAT)
                                                level 0, 1, 2, 3  
         or:  int  skipfl (int nlu, int nbyt);
NLU           is the logical unit.
NBYT          is the number of bytes. 
ISTAT         is the returned status (0: OK).
Name: TELLFL  19
The routine TELLFL returns the current position in bytes.
The call is:  CALL TELLFL (NLU, NBYT)           level 0, 1, 2, 3  
         or:  int  tellfl (int nlu);
NLU           is the logical unit.
NBYT          is the  returned position in bytes where byte num-
              bering  begins with zero.  NBYT = -1, if an  error
              occurs. 
Name: POSIFL  19
The routine  POSIFL  skips to a certain position relative to the
start.
The call is:  CALL POSIFL (NLU, NBYT, ISTAT)    level 0, 1, 2, 3
         or:  int  posifl (int nlu, int nbyt);  
NLU           is the logical unit.
NBYT          defines  the position. Byte numbering begins  with
              zero. 
ISTAT         is the returned status (0: OK).


