Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In this part of code my compiler gives Error: Invalid character in name.

I cannot understand the sense of this operator * *, is it cycle of multiplication?

do i_lamda = 1, n_lamda_num ! Find and remember characteristic determinant members
                                  ! В этой записи ошибочно записаны TAU вместо 1 / TAU
        r_lamda = r_lamda_beg + (i_lamda - 1) * r_lamda_step
        r_memb_det(1,i_lamda) = -1.0 * (dx(1) % tau_sutky  + r_lamda)
     *                               * (dx(2) % tau_sutky  + r_lamda)
     *                               * (dx(3) % tau_sutky  + r_lamda)
     *                               * (dx(4) % tau_sutky  + r_lamda)
     *                               * (dx(5) % tau_sutky  + r_lamda)
        r_memb_det(2,i_lamda) = -1.0 * (dx(5) % tau_sutky  + r_lamda)


THe same this is about write:
write (nf_res,'(5x,2a/)') 'Values alf_down by sections'
     *                           , ' from 1 to 5:'


What I have tried:

I deleted * * and that helped for write. But for the first part I cant cantch the sence itself.
Posted
Updated 23-Mar-18 3:37am
v2

** is the exponentiation operator - i.e. A ** b raises A to the power of b
Fortran Operators[^]

If that is genuine whitespace between the * * then remove the whitespace - the operator is **
 
Share this answer
 
v2
Comments
Nikolay Yasinskiy 23-Mar-18 10:07am    
** operator I know, Thank you.
Maciej Los 23-Mar-18 15:27pm    
5ed!
Your asterisk are on column 6 which is the line continuation (continuation mark) position. See also Continuation Line - Using and Porting GNU Fortran[^].

They tell the compiler that the statement of the previous line is continued. The character itself is ignored.
 
Share this answer
 
Comments
CHill60 23-Mar-18 9:43am    
Good spot! I haven't used Fortran in xx years and had forgotten all about the continuation character (where xx is > 30!)
Jochen Arndt 23-Mar-18 9:57am    
Last time I have written Fortran code was at university which is nearly 30 years ago.

But I have ported algorithms written in Fortan to C since then sometimes where line continuation is quite common with complex formulas.
Nikolay Yasinskiy 23-Mar-18 10:09am    
Thanks, so I should change it to ampersand? &
Jochen Arndt 23-Mar-18 10:24am    
I don't know why the GNU Fortran compiler complains here.

First ensure that the asterisk are in column 6 and that there are no TABs in your source code files.

But you can try using the "new " Fortran-90 line continuation mode with the ampersand too which requires using the .f90 extension.
Maciej Los 23-Mar-18 15:27pm    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900