Hi,
As a followup to earlier inquiry of mine:
By means of compiling and running the following simple program,
I've found that the following platforms available to me have
LOGICAL(KIND=1). In all cases, this is one byte long; that
is, INTEGER is 4x the length of LOGICAL(KIND=1).
Since I know INTEGER to be 32-bit on the machines in question
(the way I ran the compiler), the conclusion that LOGICAL(KIND=1)
is 8 bits long follows.
SGI
AIX
TRU64
Solaris/SPARC
HP
LINUX/Intel/Absoft
These are quite recent compilers on all, though not necessarily the
very latest. I can say that all were the latest sometime over the
past year.
The program is:
LOGICAL(KIND=1) :: L( 8 )
INTEGER :: I(8), II, IL
INQUIRE( IOLENGTH=IL) L
INQUIRE( IOLENGTH=II) I
WRITE( 6, * )'II, IL= ', II, IL
WRITE( 6, * )'II/IL= ', II/REAL( IL )
END
A typical output is:
II, IL= 32, 8
II/IL= 4.
That is, the "typical" platform reports lengths in bytes. TRU64,
however, reports length in INTEGER-size words. Still, of course,
the ratio II/IL is 4.
I'd be curious to hear results from other platforms....
-P.
--
** Whether the playing field is level depends on the coordinate system. ***
********* Peter S. Shenkin; Schrodinger, Inc.; (201)433-2014 x111 *********
*********** [log in to unmask]; http://www.schrodinger.com ***********
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|