*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/char (3)              
Title
Content
Arch
Section
 

Contents


FTYPE(3F)							     FTYPE(3F)


NAME    [Toc]    [Back]

     ftype: int, ifix, iifix, jifix, idint, iqint, real, float,	floati,
     floatj, sngl, dble, dfloti, dflotj, dfloat, qfloat, qfloti, qflotj,
     qflotk, cmplx, dcmplx, qcmplx, ichar, char	- explicit FORTRAN type
     conversion

SYNOPSIS    [Toc]    [Back]

     integer i,	j
     real r, s
     double precision dp, dq
     real*16 qp, qq
     complex cx, cy, cz
     double complex dcx, dcy, dcz
     complex*32	qcx, qcy, qcz
     character*1 ch
     integer*1 i1
     integer*2 ii
     integer*4 ji
     integer*8 ki
     real*4 r1

     i = int(j)
     i = int(r)
     i = int(dp)
     i = int(qp)
     i = int(cx)
     i = int(qcx)
     i = ifix(r)
     ii	= iifix(r1)
     ji	= jifix(r1)
     i = idint(dp)
     i = iqint(qp)

     r = real(i1)
     r = real(i)
     r = real(dp)
     r = real(qp)
     r = real(cx)
     r = real(dcx)
     r = real(qcx)
     r = real(s)
     r = float(i)
     r1	= floati(ii)
     r1	= floatj(ji)
     r = sngl(i)
     r = sngl(dp)
     r = sngl(qp)
     r = sngl(cx)
     r = sngl(dcx)
     r = sngl(qcx)
     r = sngl(s)




									Page 1






FTYPE(3F)							     FTYPE(3F)



     dp	= dble(i)
     dp	= dble(r)
     dp	= dble(dq)
     dp	= dble(qq)
     dp	= dble(cx)
     dp	= dble(dcx)
     dp	= dble(qcx)
     dp	= dfloat(r)
     dp	= dfloat(dp)
     dp	= dfloat(qp)
     dp	= dfloat(cx)
     dp	= dfloat(dcx)
     dp	= dfloat(qcx)
     dp	= dfloti(ii)
     dp	= dflotj(ji)

     qp	= qfloat(r)
     qp	= qfloat(dp)
     qp	= qfloat(qp)
     qp	= qfloat(cx)
     qp	= qfloat(dcx)
     qp	= qfloat(qcx)
     qp	= qfloti(ii)
     qp	= qflotj(ji)
     qp	= qflotk(ki)

     cx	= cmplx(i)
     cx	= cmplx(i, j)
     cx	= cmplx(r)
     cx	= cmplx(r, s)
     cx	= cmplx(dp)
     cx	= cmplx(dp, dq)
     cx	= cmplx(qp)
     cx	= cmplx(qp, qq)
     cx	= cmplx(cy)
     cx	= cmplx(cy, cz)
     cx	= cmplx(dcx)
     cx	= cmplx(dcx, dcy)
     cx	= cmplx(qcx)
     cx	= cmplx(qcx, qcy)

     dcx = dcmplx(i)
     dcx = dcmplx(i, j)
     dcx = dcmplx(r)
     dcx = dcmplx(r, s)
     dcx = dcmplx(dp)
     dcx = dcmplx(dp, dq)
     dcx = dcmplx(qp)
     dcx = dcmplx(qp, qq)
     dcx = dcmplx(cx)
     dcx = dcmplx(cx, cy)
     dcx = dcmplx(dcy)



									Page 2






FTYPE(3F)							     FTYPE(3F)



     dcx = dcmplx(dcy, dcz)
     dcx = dcmplx(qcy)
     dcx = dcmplx(qcy, qcz)

     qcx = qcmplx(i)
     qcx = qcmplx(i, j)
     qcx = qcmplx(r)
     qcx = qcmplx(r, s)
     qcx = qcmplx(dp)
     qcx = qcmplx(dp, dq)
     qcx = qcmplx(qp)
     qcx = qcmplx(qp, qq)
     qcx = qcmplx(cx)
     qcx = qcmplx(cx, cy)
     qcx = qcmplx(dcy)
     qcx = qcmplx(dcy, dcz)
     qcx = qcmplx(qcy)
     qcx = qcmplx(qcy, qcz)

     i = ichar(ch)
     ch	= char(i)

DESCRIPTION    [Toc]    [Back]

     These functions perform conversion	from one data type to another.

     The function int converts to integer from its integer, real*4, double
     precision,	real*16, complex, double complex, or complex*32	argument.  If
     the argument is real, integer, real*4, double precision, or real*16 int
     returns the integer whose magnitude is the	largest	integer	that does not
     exceed the	magnitude of the argument and whose sign is the	same as	the
     sign of the argument (i.e.	truncation). For complex the above rule	is
     applied to	the real part.	ifix converts only real	arguments.  int	and
     ifix return result	type integer*2 if the -i2 option is in effect;
     otherwise,	the result type	is integer*4.  iifix and jifix convert only
     real*4 to integer*2 and integer*4,	respectively.  idint converts double
     precision arguments only.	iqint converts real*16 arguments only.

     The function real converts	to real	from an	integer, integer*1, integer*2,
     integer*4,	real, double precision,	real*16, complex, double complex, or
     complex*32	argument.  If the argument is double precision or real*16, as
     much precision is kept as is possible. If the argument is complex,	the
     real part is returned.  float converts integer arguments only.  floati
     and floatj	convert	integer*2 and integer*4	arguments respectively to
     real*4.  sngl converts integer, real, double, real*16, complex, double
     complex, and complex*32 arguments to real.

     The function dble converts	any integer, real, double, real*16, complex,
     double complex, complex*32, integer*2 or integer*4	argument to double
     precision form.  If the argument is complex, the real part	is returned.
     dfloat converts real, double, real*16, complex, double complex, and
     complex*32	to double.  dfloti and dflotj convert integer*2	and integer*4
     to	real*8.



									Page 3






FTYPE(3F)							     FTYPE(3F)



     qfloti, qflotj, and qflotk	convert	integer*2, integer*4,  and integer*8
     to	real*16.

     The function cmplx	converts its integer, real, double precision, real*16,
     double complex, or	complex*32 argument(s) to complex form.

     The function dcmplx converts to double complex form its integer, real,
     double precision, real*16,	complex, or complex*32 argument(s).

     The function qcmplx converts to complex*32	form its integer, real,	double
     precision,	real*16, complex, or double complex argument(s).

     Either one	or two arguments may be	supplied to cmplx, dmplx, and qcmplx .
     If	there is only one argument, it is taken	as the real part of the
     complex type and an imaginary part	of zero	is supplied. If	two arguments
     are supplied, the first is	taken as the real part and the second as the
     imaginary part.

     The function ichar	converts from a	character to an	integer	depending on
     the character's position in the collating sequence.  ichar	returns	the
     result type integer*2 if the -i2 compile option is	in effect; otherwise
     the result	type is	integer*4.

     The function char returns the character in	the ith	position in the
     processor collating sequence where	i is the supplied argument.



























									Page 4






CHAR(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     CHAR, ICHAR - Converts integer to character and vice versa

SYNOPSIS    [Toc]    [Back]

     CHAR([I=]i, [KIND=]kind)

     ICHAR([C=]c)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     CHAR and ICHAR are	inverse	functions.

     CHAR converts an integer or Boolean argument to a character specified
     by	the ASCII collating sequence.  ICHAR converts a	character argument
     to	an integer based on the	character position in the collating
     sequence.

     These intrinsic functions accept the following arguments:

     i	   Must	be of type integer or Boolean.	If of type integer, i must
	   be in the range 0 <=	i <= 255.

     kind  Must	be a scalar integer initialization expression.

     c	   Must	be of type character and of length one.

     The type conversion routines assign the appropriate type to Boolean
     arguments without shifting	or manipulating	the bit	patterns they
     represent.	 For example, CHAR(i) returns the ith character	in the
     collating sequence.

     CHAR and ICHAR are	elemental functions.  The names	of these intrinsics
     cannot be passed as arguments.

RETURN VALUES    [Toc]    [Back]

     For CHAR, the result is a character of length one.	 If the	kind
     parameter is present, the kind type parameter is that specified by
     kind.  Otherwise the kind type parameter is that of the default
     character type.  The result is the	character in position i	of the
     ASCII collating sequence associated with the specified kind type
     parameter.

     For ICHAR,	the result is the position c in	the collating sequence
     associated	with the kind type parameter of	c and is in the	range
     0 <= ICHAR(c) <= 255.  For	any characters C and D capable of being
     represented, C .LE. D is true if and only if ICHAR	(C) .LE. ICHAR(D)
     is	true and C .EQ.	D is true if and only if ICHAR(C) .EQ. ICHAR(D)	is
     true.

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

CHAR(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     CHAR, ICHAR - Converts integer to character and vice versa

SYNOPSIS    [Toc]    [Back]

     CHAR([I=]i, [KIND=]kind)

     ICHAR([C=]c)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     CHAR and ICHAR are	inverse	functions.

     CHAR converts an integer or Boolean argument to a character specified
     by	the ASCII collating sequence.  ICHAR converts a	character argument
     to	an integer based on the	character position in the collating
     sequence.

     These intrinsic functions accept the following arguments:

     i	   Must	be of type integer or Boolean.	If of type integer, i must
	   be in the range 0 <=	i <= 255.

     kind  Must	be a scalar integer initialization expression.

     c	   Must	be of type character and of length one.

     The type conversion routines assign the appropriate type to Boolean
     arguments without shifting	or manipulating	the bit	patterns they
     represent.	 For example, CHAR(i) returns the ith character	in the
     collating sequence.

     CHAR and ICHAR are	elemental functions.  The names	of these intrinsics
     cannot be passed as arguments.

RETURN VALUES    [Toc]    [Back]

     For CHAR, the result is a character of length one.	 If the	kind
     parameter is present, the kind type parameter is that specified by
     kind.  Otherwise the kind type parameter is that of the default
     character type.  The result is the	character in position i	of the
     ASCII collating sequence associated with the specified kind type
     parameter.

     For ICHAR,	the result is the position c in	the collating sequence
     associated	with the kind type parameter of	c and is in the	range
     0 <= ICHAR(c) <= 255.  For	any characters C and D capable of being
     represented, C .LE. D is true if and only if ICHAR	(C) .LE. ICHAR(D)
     is	true and C .EQ.	D is true if and only if ICHAR(C) .EQ. ICHAR(D)	is
     true.

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

[ Back ]
 Similar pages
Name OS Title
cry2mips IRIX Converts Fortran data types between Cray Fortran data types and MIPS IEEE Fortran data types
font2c Linux Write PostScript Type 0 or Type 1 font as C code
XmRepTypeGetNameList Tru64 A representation type manager function that generates a list of values for a representation type
XmRepTypeValidValue IRIX A representation type manager function that tests the validity of a numerical value of a representation type r
XmRepTypeGetId IRIX A representation type manager function that retrieves the identification number of a representation type
XmRepTypeValidValue HP-UX A representation type manager function that tests the validity of a numerical value of a representation type r
XmRepTypeGetNameList HP-UX A representation type manager function that generates a list of values for a representation type
XmRepTypeGetId HP-UX A representation type manager function that retrieves the identification number of a representation type
XmRepTypeGetNameList IRIX A representation type manager function that generates a list of values for a representation type
XmRepTypeGetRecord IRIX A representation type manager function that returns information about a representation type
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service