home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.fortran      Putting John Backus on a giant pedestal      5,127 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,742 of 5,127   
   R Daneel Olivaw to Thomas Koenig   
   Re: Is there a way in Fortran to designa   
   13 Oct 24 17:21:38   
   
   From: Danny@hyperspace.vogon.gov   
      
   Thomas Koenig wrote:   
   > R Daneel Olivaw  schrieb:   
   >   
   >> Equivalences are an effective way of building data structures, you can   
   >> do that with Common as well but sometimes equivalence is more suitable.   
   >   
   > Can you give an example? I have a hard time imagining what it would   
   > be useful for.   
   >   
      
         integer record (100), reckey, reccod   
   c or integer*4   
         character*40 recnam, recstr, rectwn   
   c   
         equivalence (record, reckey), (record (2), recnam)   
         equivalence (record (12), recstr), (record (22), rectwn)   
         equivalence (record (32), reccod)   
   c               and so on   
      
   I have used constructs like that to handle database structures, although   
   obviously we were restricted to whole-word fields and multiple-word   
   fields - with everything being on word boundaries.   
   One Fortran implementation I used for years allowed us to use statement   
   functions to implement partial-word fields, these functions could be   
   used on the left or the right sides of an assignment.   
   That permitted far more fine tuning.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca