none
CODE writen by Compaq Fortran FAIL in VS2017 RRS feed

  • Question

  • My professor gave me his code writen by compaq 10 years ago and I build a new project in VS2017(I have Intel Fortran installed) and add the code to it. After compiling, the code could run but a few seconds later, the result of the code is full of 'NaN'  while it doesn't happen when i compile and run by compaq. 
    Wednesday, September 11, 2019 9:29 AM

All replies

  • Hi friend,

    Welcome to the MSDN forum.

    According to your description, what is your development IDE that developed your initial source code or was  compaq a development IDE? 

    For these two different ides, there may be subtle differences in the syntax they write and the project they compile, and there may be differences in the identification of I code, which is the product of two different companies.

    For older vs projects to migrate to the new version of vs, it is possible to automatically upgrade the project and run without problems. However, the migration of projects between different release development tools is not easy to say.

    Besides, in response to this problem, it seems to be a problem with the syntax before different development tools. There are some  we recommend that you use Code Analyzer in VS to locate errors. Please open the menu Build-> Run Code Analysis on Solution in vs so that you can double click on the error and it will locate the specific error line.

    ###but a few seconds later, the result of the code is full of 'NaN'  while it doesn't happen when i compile and run by compaq. 

    > > such as :

    this will be an error in vs

    if(result == double .NaN)
    {
    ....
    }

    and this will success.

     if(double .IsNaN(result))
    {
    .......
    }
    So please check your codes carefully if you still want to build it in VS.

    > >About this error in VS, you can refer to this article for more information 

    https://blogs.msdn.microsoft.com/habibh/2009/07/16/code-analysis-and-nan-not-a-number/

    Hope it could help you.

    Best Regards,

    Perry



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com



    Thursday, September 12, 2019 2:44 AM
  • Hi friend,

    Did your issue solve? If your issue still persists, please feel free to let us know. We will give you further support.

    If your answer is solved, please post your answer here and mark it as answer.

    Thanks for your understanding.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Monday, September 16, 2019 4:26 AM