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,904 of 5,127   
   Lynn McGuire to Thomas Koenig   
   Re: how do you send a fortran character    
   10 Jan 25 16:32:27   
   
   From: lynnmcguire5@gmail.com   
      
   On 1/2/2025 4:06 AM, Thomas Koenig wrote:   
   > Lynn McGuire  schrieb:   
   >> How do you send a fortran character string from GCC to GFortran ?   
   >>   
   >> I cannot get this to link.  I can do the reverse, send a fortran   
   >> character string from Gfortran to GCC.   
   >   
   > A full, self-contained example would be helpful for somebody trying to   
   > help (especially since you say "link", which seems weird).   
   >   
   > But take a look at   
   >   
   > https://gcc.gnu.org/onlinedocs/gfortran/Naming-and-argument-pa   
   sing-conventions.html   
   >   
   >> I do have the additional complication that I do not know the length of   
   >> the fortran character string being sent from GCC to Gfortran at compile   
   >> time, only run time.  So that is a character*(*) string.   
   >>   
   >> I am not using the ISO C binding.   
   >   
   > It is generally a good idea to use ISO C binding in new code, it   
   > is what it was introduced for.   
   >   
   > But you might also find   
   >   
   > https://gcc.gnu.org/onlinedocs/gfortran/Interoperability-Options.html   
   >   
   > of interest.   
      
   BTW, I have thousands of calls from my Fortran code to my C code.   
   Adding all of the ISO C binding syntax will take a lot of time.  And   
   breakage of what was working code using the Watcom Fortran and C compilers.   
      
   Lynn   
      
   --- 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