home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.lbl.gov
/
2014.05.ftp.ee.lbl.gov.tar
/
ftp.ee.lbl.gov
/
mtrek.shar.Z
/
mtrek.shar
/
size.ftn
< prev
next >
Wrap
Text File
|
1990-04-02
|
391b
|
28 lines
FUNCTION IWI(I)
C
C Find the width of the format spec for real and integers
C and allow for signed numbers.
C
INTEGER*2 IWI,IWR,I
REAL X,Y
C Size of an integer
Y=FLOAT(I)
GOTO 10013
C Size of a real
ENTRY IWR(X)
Y=X
10013 IF(Y.EQ.0.0)GOTO 10100
C Find the size
IWI=1+INT(LOG10(ABS(Y)))
IF(Y.LT.0.0)IWI=IWI+1
GOTO 10001
C Width of 'zero'
10100 IWI=1
10001 CONTINUE
RETURN
END