F77 standard

Ray Osborn ROsborn at anl.gov
Tue Sep 21 20:11:02 BST 1999


I've just looked up on the web what the F77 standard says.  It's a lot more
restrictive than I thought, but then nearly every compiler is much more
tolerant than the standard.  I was right that there are no length
specifications for variables (INTEGER*2, REAL*4 etc).

Here's what it says about EQUIVALENCE of character strings.

> 8.2.3  Equivalence_of_Character_Entities.  An entity of
>           type  character  may  be  equivalenced  only with other
>           entities  of  type  character.  The  lengths   of   the
>           equivalenced entities are not required to be the same.
>
>           An EQUIVALENCE statement  specifies  that  the  storage
>           sequences  of the character entities whose names appear
>           in a list nlist_____ have the same first  character  storage
>           unit.   This  causes the association of the entities in
>           the list nlist_____  and  may  cause  association  of  other
>           entities   (17.1).   Any  adjacent  characters  in  the
>           associated entities may also have  the  same  character
>           storage  unit  and thus may also be associated.  In the
>           example:
>
>                      CHARACTER A*4, B*4, C(2)*3
>                      EQUIVALENCE (A,C(1)), (B,C(2))
>
>           the association of A,  B,  and  C  can  be  graphically
>           illustrated as:
>
>                    | 01|  02|  03|  04
> 7                                      |  05|  06|  07|
>
>                    | --------A--------|
>                                     --------B--------|
>                      ----C(1)----   ----C(2)----
> 7                   |
> 7                                 |8|
> 8                                                |

Finally, common blocks are just as restrictive :

>           If a character variable or  character  array  is  in  a
>           common  block, all of the entities in that common block
>           must be of type character.

The bottom line is that we have no chance of being genuinely
standard-conforming (unlike the F90 case); we just have to follow common
conventions.

Ray
--
Ray Osborn <ROsborn at anl.gov>
Materials Science Division
Argonne National Laboratory



More information about the NeXus-developers mailing list