- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have taken one function from press numerical recipees and...
milenko@milenkons:~/pauel$ ifort -c assert_eq.f90
assert_eq.f90(10): error #5078: Unrecognized token ' ?' skipped
write (*,*) nrerror: an assert_eq failed
-------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
---------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
----------------------^
assert_eq.f90(10): error #5078: Unrecognized token 'failed?' skipped
write (*,*) nrerror: an assert_eq failed
---------------------------------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
----------------------------------------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
-----------------------------------------------------^
assert_eq.f90(10): error #5082: Syntax error, found ':' when expecting one of: , ;
write (*,*) nrerror: an assert_eq failed
------------------------------^
assert_eq.f90(11): error #5078: Unrecognized token ' ?' skipped
STOP program terminated by assert_eq3
------------^
assert_eq.f90(11): error #5078: Unrecognized token '?' skipped
STOP program terminated by assert_eq3
MODULE ASSERT_EQ
CONTAINS
FUNCTION assert_eq3(n1,n2,n3,string)
CHARACTER(LEN=*), INTENT(IN) :: string
INTEGER, INTENT(IN) :: n1,n2,n3
INTEGER :: assert_eq3
if (n1 == n2 .and. n2 == n3) then
assert_eq3=n1
else
write (*,*) nrerror: an assert_eq failed
STOP program terminated by assert_eq3
end if
END FUNCTION assert_eq3
END MODULE
milenko@milenkons:~/pauel$ ifort -c assert_eq.f90
assert_eq.f90(10): error #5078: Unrecognized token ' ?' skipped
write (*,*) nrerror: an assert_eq failed
-------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
---------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
----------------------^
assert_eq.f90(10): error #5078: Unrecognized token 'failed?' skipped
write (*,*) nrerror: an assert_eq failed
---------------------------------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
----------------------------------------------------^
assert_eq.f90(10): error #5078: Unrecognized token '?' skipped
write (*,*) nrerror: an assert_eq failed
-----------------------------------------------------^
assert_eq.f90(10): error #5082: Syntax error, found ':' when expecting one of: ,
write (*,*) nrerror: an assert_eq failed
------------------------------^
assert_eq.f90(11): error #5078: Unrecognized token ' ?' skipped
STOP program terminated by assert_eq3
------------^
assert_eq.f90(11): error #5078: Unrecognized token '?' skipped
STOP program terminated by assert_eq3
MODULE ASSERT_EQ
CONTAINS
FUNCTION assert_eq3(n1,n2,n3,string)
CHARACTER(LEN=*), INTENT(IN) :: string
INTEGER, INTENT(IN) :: n1,n2,n3
INTEGER :: assert_eq3
if (n1 == n2 .and. n2 == n3) then
assert_eq3=n1
else
write (*,*) nrerror: an assert_eq failed
STOP program terminated by assert_eq3
end if
END FUNCTION assert_eq3
END MODULE
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you copied and pasted the code you brought over a character (a fancy single quote) that isn't in the set of characters that the intel compiler recognises. Have a close look at the single quote character that most of the error messages point to and compare it to the character that appears when you press the single quote key.
You need to replace this fancy quote character (and maybe others) with the quote character that is usually generated when you hit the corresponding key on your keyboard.
You need to replace this fancy quote character (and maybe others) with the quote character that is usually generated when you hit the corresponding key on your keyboard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ian,I will try it now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ian, Milenko,
In Fortran, derived fromEnglish speaking world,both the single quote ' and single enquote ' are the same character (a vertical looking single upper "dit"). In other languages the single quote ` is a top side left leaning single upper "dit" mark, and single enquote (I don't have it on my keyboard) is a top side right leaning single upper "dit" mark.
If you captured this code using copy and paste through a text editor (which for some languagesnormally uses leaning single quotes) the text editor may have "done you a favor" by converting the quotes for you. In this case, it is not a favor at all.
Jim Dempsey
In Fortran, derived fromEnglish speaking world,both the single quote ' and single enquote ' are the same character (a vertical looking single upper "dit"). In other languages the single quote ` is a top side left leaning single upper "dit" mark, and single enquote (I don't have it on my keyboard) is a top side right leaning single upper "dit" mark.
If you captured this code using copy and paste through a text editor (which for some languagesnormally uses leaning single quotes) the text editor may have "done you a favor" by converting the quotes for you. In this case, it is not a favor at all.
Jim Dempsey

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page