GithubHelp home page GithubHelp logo

dataFlowSolver exception about fortran-src HOT 4 CLOSED

dorchard avatar dorchard commented on September 26, 2024
dataFlowSolver exception

from fortran-src.

Comments (4)

dorchard avatar dorchard commented on September 26, 2024

The error here has gotten much better:

$ fortran-src computational-physics-1/fortran77/code214.f -S
fortran-src: An unexpected LHS to an expression assign: ExpFunctionCall () (42:8)-(42:14) (ExpValue () (42:8)-(42:12) (ValVariable "ranf")) Nothing
CallStack (from HasCallStack):
  error, called at src/Language/Fortran/Analysis.hs:239:16 in main:Language.Fortran.Analysis

It seems there is some syntactic construct which we are not expecting on line 42:
RANF() = ISEED/FLOAT(IC)
(this is inside the definition of the function RANF). This is possibly non-standard Fortran so it is not our fault- but we should check the Fortran 77 standard to see if this is allowed or not.

from fortran-src.

mrd avatar mrd commented on September 26, 2024

from fortran-src.

traveltissues avatar traveltissues commented on September 26, 2024

does #72 close this?

from fortran-src.

mrd avatar mrd commented on September 26, 2024

I'm 100% certain this was a typo in code214.f, nothing to do with us.

  FUNCTION RANF()
  DATA IA/16807/,IC/2147483647/,IQ/127773/,IR/2836/
  COMMON /CSEED/ ISEED
    IH = ISEED/IQ
    IL = MOD(ISEED,IQ)
    IT = IA*IL-IR*IH
    IF(IT.GT.0) THEN
      ISEED = IT
    ELSE
      ISEED = IC+IT
    END IF
    RANF() = ISEED/FLOAT(IC)
  RETURN
  END

whereas the same exact function (but for one change) in code213.f:

  FUNCTION RANF()
  DATA IA/16807/,IC/2147483647/,IQ/127773/,IR/2836/
  COMMON /CSEED/ ISEED
    IH = ISEED/IQ
    IL = MOD(ISEED,IQ)
    IT = IA*IL-IR*IH
    IF(IT.GT.0) THEN
      ISEED = IT
    ELSE
      ISEED = IC+IT
    END IF
    RANF = ISEED/FLOAT(IC)
  RETURN
  END

from fortran-src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.