LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2015, 03:27 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Rep: Reputation: Disabled
Error message in Gfortran compilation needs interpretation.


My environment is Ubuntu 14.04 (just updated from 12.04), with the default gfortran 4.8.2.

I have this block of code:

Code:
    mod1 = MOD(couZero,100)
    if (mod1 == 0)                 <=== error         
      write (6,*) "couZero = ", couZero          
    endif
    if (MOD(couOne,100) .eq. 0)    <=== error
      write (6,*) "couOne = ", couOne
    endif
I get identical error messages on statements marked with left oriented arrows:

Code:
Error: Cannot assign to a named constant at (1)
What does the compiler want? How can I change this simple expression?

Thanks, - Alex
 
Old 04-05-2015, 03:38 PM   #2
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
Sorry, it was a simple error. The code should be:

Code:
mod1 = MOD(couZero,100)
    if (mod1 == 0)  then                    
      write (6,*) "couZero = ", couZero          
    endif
    if (MOD(couOne,100) .eq. 0) then  
      write (6,*) "couOne = ", couOne
    endif
Keep forgetting once in a while.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] INterpretation of Compile time error message in GFortran. AlexBB Linux - Newbie 2 01-03-2015 07:36 PM
[SOLVED] Gfortran compilation error. Why? AlexBB Linux - Newbie 2 05-04-2014 10:33 AM
xchm compilation error interpretation uncle-c Linux - Newbie 1 03-22-2007 02:44 PM
Error message need interpretation Scallawag Linux - Software 3 02-03-2005 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration