Fortran [FORTRAN] Strange Characters in output

AI Thread Summary
The discussion revolves around issues encountered while compiling a Fortran program, specifically blisw.for, which generates errors and odd characters in the output when an input file, blisw.inp, is used. The user reports that the program compiled successfully in the past but fails with the current compilation, producing corrupted output file names and an "invalid number" error. Multiple compilers have been tried, including in a Unix environment, but the problem persists. Suggestions include posting the code and input file for further assistance and modifying the program by adding specific lines to define input and output names, which may help eliminate the junk characters appearing in the output.
zstratto
Messages
6
Reaction score
0
Hi, I am trying to compile a code that should work fine, but I am getting errors and also some odd characters are printing on the screen. This is the output:


ENTER INPUT FILE NAME (INCLUDE EXTENSION NAME)
blisw.inp
YOUR INPUT FILE IS
blisw.inp
THIS PROGRAM CURV.EXE WILL GENERATE SEVERAL OUTPUT FILES:
1. OUTPUT FILE NAME
bliswOUT.TXT5ø…àV5P
@
2. SUMMARY OUTPUT FILE NAME
bliswSUMMARYOUT.TXTtaßé*ƒ`
3. EXTERNAL VELOCITY IN FILE FORT.11
4. VELOCITY PROFILE IN FILE FORT.12
5. VELOCITY PROFILE along Stream Line coordinate System in File fort.10
6. Shape Factor,Rtheta Reynolds number based on momentum
thickness along external strea, in File FORT.88
invalid number: incomprehensible list input
apparent state: unit 55 named blisw.inp
last format: list io
lately reading direct formatted external IO
Aborted (core dumped)

The strange thing is that the code has been compiled before (its from a book), and that executable works fine when I specify the input, its only when I compile the source code that I get this error. I have tried several compilers so far (unix environment, silverfrost, g77) and this same thing happens. Any help with this would be very appreciated, thank you.
 
Technology news on Phys.org
It would help if you posted the code.
It would help if you posted the content of the input file ( blisw.inp ? )
 
Hi Gsal,

The code and input can be found here: http://extras.springer.com/2004/978-3-540-20160-1/document/BLISW_stp3d

The program I am trying to compile is blisw.for, and the input is blisw.inp. Thanks.
 
The code would never have worked properly in standard Fortran, except by good luck.

You could try adding
Code:
INPUT_NAME = " "
OUTPUT_NAME = " "
SUMMARY_NAME = " "
at the start of the program. That might get rid of the "junk" characters.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
2
Views
2K
Replies
3
Views
3K
Replies
6
Views
3K
Replies
5
Views
2K
Replies
59
Views
11K
Replies
2
Views
3K
Replies
1
Views
4K
Replies
8
Views
3K
Replies
1
Views
3K
Back
Top