XPost: comp.lang.c++   
   From: lynnmcguire5@gmail.com   
      
   On 2/7/2026 1:15 PM, Thomas Koenig wrote:   
   > Lynn McGuire schrieb:   
   >   
   >> The only conversion problem that I am worried about is that I have   
   >> Fortran 66 interpreter built into my software for my customers to write   
   >> custom calculations embedded in their datasets attached to any type of   
   >> object. I will need to write a converter for the F66 format statements   
   >> to C formats.   
   >   
   > I haven't used your software, but I have used Aspen (only very   
   > little) and found it horrible. How it is possible for a solution to   
   > diverge when the starting solution is already converged is beyond   
   > me, all explanations that occur to me could be considered insults,   
   > so I am not toing to go into that. That was worst; I hope your   
   > software does better.   
   >   
   > But the F66 interpreter in Aspen was a close second; IIRC, it was   
   > not even possible to declare variables. Argh.   
   >   
   >> Not a big deal though. Some of my customers have over   
   >> 10,000 lines of F66 code in their datasets. And yes, the F66 parser is   
   >> written in F77 code, we wrote that back in 1982.   
   >   
   > If you used Fortran 77's runtime including internal formats,   
   > that must have made your job a lot easier. Converting this to   
   > C formats... well, that is tricky. Consider   
   >   
   > REAL A   
   > DIMENSION A(10)   
   > READ (10,'(4F12.5)') A   
   >   
   > It is not possible to translate this into C printf formats   
   > (which you seem to imply above), you need logic to handle   
   > the format reversion. Also, the handling of field overflow   
   > (C just extends things, Fortran inserts asterisks) is tricky.   
   >   
   > Why not just use the f2c runtime?   
      
   We force all loops in simulations to go through a minimum of three   
   iterations. What appears to be converged may not be converged in reality.   
      
   The f2c runtime is an undocumented mishmash of a nightmare given that   
   they started with the unix f77 compiler. I would prefer not to use it   
   but, I could be forced into it from a time aspect.   
      
   Lynn   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|