1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Help with FORTRAN error message

  1. Feb 1, 2013 #1
    1. The problem statement, all variables and given/known data

    I get the follwing error message in the FORTRAN program I am trying to code.

    Error: Invalid character in name at (1)

    I assume this means there is something it doesn't like about 2*Pi but I can't work out what it is.

    Any help would be appreciated.
  2. jcsd
  3. Feb 1, 2013 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    1 Pi should be defined elsewhere in your program, as should the constant e.
    2. the character ^ is not used for exponentiation. The double * is the proper operator, thus x*x = x**2.
  4. Feb 1, 2013 #3
    Well that was abvious :rolleyes:

    forgot that '**' is used to creates powers.

    Thanks for that :)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook