Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!uflorida!travis!hcx2.ssd.csd.harris.com!bill From: bill@hcx2.ssd.csd.harris.com (Bill Leonard) Newsgroups: comp.lang.fortran Subject: Re: More on EQUIVALENCE (and CHARACTER) Message-ID: <3626@travis.csd.harris.com> Date: 10 Jun 91 15:01:52 GMT References: <1991Jun1.171914.802@weyrich.UUCP> <91159.121142FC138001@ysub.ysu.edu> Sender: news@travis.csd.harris.com Reply-To: bill@hcx2.ssd.csd.harris.com (Bill Leonard) Distribution: na Organization: Harris Computer Systems Division, Fort Lauderdale, FL Lines: 32 In article <91159.121142FC138001@ysub.ysu.edu>, FC138001@ysub.ysu.edu (Phil Munro) writes: > The above discussion raises questions for me. Will the following code > be portable? Might it cause problems on some compilers when trying to > pick off part of whole and overlay storage? I know in the case of the > VS compiler that character storage allows this sort of thing. > > character*14 whole > character*4 part > data whole /'part and so on'/ > equivalence (whole,part) > > Or, here is another simpler example which I have used: > > character*8 blank8 > character*4 blank > equivalence (blank8,blank) > data blank8 /' '/ Both examples are standard conforming. EQUIVALENCE between two CHARACTER entities is defined by the standard. What the standard _disallows_ is EQUIVALENCE between CHARACTER and other data types. -- Bill Leonard Harris Computer Systems Division 2101 W. Cypress Creek Road Fort Lauderdale, FL 33309 bill@ssd.csd.harris.com --------------------------------------------------------------------------- "Chronologically gifted" -- new government term for "old". Does this make babies "chronologically deprived"? ---------------------------------------------------------------------------