[UP]


Manual Reference Pages  - number (3)

NAME

number(3f) - [M_calcomp:basic] plots a floating-point number (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example
License

SYNOPSIS

subroutine number(xpage,ypage,height,fpn,angle,+-ndec)

DESCRIPTION

Subroutine NUMBER plots a floating-point number; using the specified number of decimals in the mantissa (Using FORTRAN F-type format).

The routine is very similar to SYMBOL, with the exception that a numeric value, not a string, is to be plotted.

OPTIONS

XPAGE,YPAGE,
  are the same as those arguments described for subroutine
HEIGHT,ANGLE
  SYMBOL. The continuation feature, where XPAGE or YPAGE equals 999.0, may be used.
FPN is the floating-point number that is to be converted and plotted.
+-NDEC controls the precision of the conversion of the number FPN. If the value of NDEC>0, it specifies the number of digits to the right of the decimal point that are to be converted and plotted, after proper rounding. For example, assume an internal value of - 0.12345678 x 10**3. If NDEC were 2, the plotted number would be -123.46.0

If NDEC=0, only the number’s integer portion and a decimal point are plotted, after rounding.

If NDEC=-1, only the number’s integer portion is plotted, after rounding. (The above example would be plotted as -123 with no decimal point). If NDEC < -1, ABS(NDEC) -1 digits are truncated from the integer portion, after rounding.

The magnitude of NDEC should not exceed 9 .

EXAMPLE

Sample program:

   program demo_number
   use M_calcomp
   implicit none
   character(len=28),parameter :: ichr4=’EXAMPLE OF NUMBER SUBROUTINE’
   real,parameter              :: znum(4)=[10293.84756,193.75,-204.86,-12345.6789]
   real                        :: y
   integer                     :: ia, ib
   integer                     :: inteq
      call plots(0.0,10.0,0.0,10.0)
      y=9.5
      ! the following tests the NUMBER(3f) subroutine for precision
      call symbol(0.5,2.5,.20,ichr4,inteq,90.0,28)
      y=10.0
      do ia=1,4
         do ib=1,11
            call number(1.0,y,0.14,znum(ia),0.0,ib-6)
            y=y-0.2
         enddo
         y=y-0.3
      enddo
      call nframe()
      call plot(0.0,0.0,999)
   end program demo_number

LICENSE

Public Domain


number (3) March 11, 2021
Generated by manServer 1.08 from 5d3c0f74-4893-47e4-aca8-17547581b9c3 using man macros.