unwanted (and invisible ) characters

Asked by Robert

I added 1 line to the source code of a Fortran program that previously compiled and executed successfully. The line was "CALL PRNTHI". THIS RESULTS IN A high resolution SCREEN DUMP OF the graph shown on the screen. When I attempted to compile (etc), I got 2 fatal error messages. The first was a period (0Ah) following the inserted line. The second error was also a period (hex 0Ah) following the END statement of a function immediately following the modified code, When I returned to the text editor I could not see any periods? I then deleted the inserted line and recompiled. The first error disappeared but there were now 2 periods shown following the END statement? I tried to delete the END statement and re-enter but no change. Any Ideas? Bob T.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Simeon Visser (svisser) said :
#1

0A in hex is the line-leed (LF) character that is used to terminate a line. In Windows, two characters are used to end a line (carriage-return and line-feed, i.e. CR LF) while Unix(-like) systems use LF.

I'd check the documentation of your compiler for any parameters that specify how line endings should be handled. As the problem only occurs for the lines that you've changed, you may need to use a utility to convert all line endings to either CR LF or to LF.

Revision history for this message
CSIKmeyer (kmeyer-csi-international) said :
#2

I use a blank at the end of each line, and then use a hex editor to
replace 200A with 0C0A .. :)

Just have to remember to do that before sending to a Windows user..

Revision history for this message
CSIKmeyer (kmeyer-csi-international) said :
#3

Oops... that should have been 0D0A, not 0C0A ...

Dang typos...

Can you help with this problem?

Provide an answer of your own, or ask Robert for more information if necessary.

To post a message you must log in.