In FORTRAN, windows and Lunix have different results.

Source: Internet
Author: User
Tags lunix

I made a C-to-FORTRAN program a few days ago. I compiled it in windows and ran the result. I didn't expect the result to be wrong in Lunix. After searching for a long time, I thought it was the cause of the global variable. I didn't expect it to be the initial value problem in do while. Integer nNew I didn't set the initial value on wndows, but the operation is correct. I don't know what the initial value is in Lunix. At the same time, the running of do while in FORTRAN is not the same as that in C. If you get it done by yourself, I don't know the specific reason. I hope you won't make the same mistake.

 

Do While (nNew> 0) nNew = 0 do inew = 1, ncur, 1 xcn = nmatx (inew) ycn = nmaty (inew) zcn = nmatz (inew)
 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.