At 01:13 18-06-2000 -0400, Peter Shenkin <[log in to unmask]> wrote:
>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
It also exists on Salford FTN95.
>
>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 )
BTW
1: This is a non portable way of declaring.
I admit that IF a ONE BYTE logical exists the kind type parameter
most problably has the value ONE.
2: There seems to be no standard conforming way to inquire about the
existence of
non-intrinsic logical types, like selected_LOG_TYPE(?).
I guess that even
integer, parameter :: Byte = selected_INT_TYPE(R=1)
logical(kind=Byte) :: Switch(1000)
is non-standard or at leasr non portable ?.
> 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....
This programme works without any modification on Salford FTN95
giving the same results.
>-P.
---
Meilleures Salutations,
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays-Bas
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|