Compilation: Display One Screen at a Time

G

Guest

Hello;
1. In compiling a DOS application in Win XP OS, the Fortran compiler g95
produces a very large number of warning and error messages.
2. The scroll bar in the command prompt window allows only for 3 additional
lines to be seen at the end of compilation, and I'm unable to use the MORE
feature properly to display one screen at a time of the compilation errors.
3. The DOS help on more (>help more) doesn't clearly show how to use MORE
4. For compiling test.for, one enters:
...>g95 -o test test.for
Q1: Where should one place MORE in the above command line (with or without
switches) ?? (years ago, it used to be !more at the end)
Q2: If MORE is applicable only to files and not to commands, how can one
redirect the results of the compilation to a file so that it may be viewed
later ??

Your help would be greatly appreciated.
 
T

Thomas Wendell

monir said:
Hello;
1. In compiling a DOS application in Win XP OS, the Fortran compiler
g95 produces a very large number of warning and error messages.
2. The scroll bar in the command prompt window allows only for 3
additional lines to be seen at the end of compilation, and I'm unable
to use the MORE feature properly to display one screen at a time of
the compilation errors.
3. The DOS help on more (>help more) doesn't clearly show how to use
MORE
4. For compiling test.for, one enters:
...>g95 -o test test.for
Q1: Where should one place MORE in the above command line (with or
without switches) ?? (years ago, it used to be !more at the end)
Q2: If MORE is applicable only to files and not to commands, how can
one redirect the results of the compilation to a file so that it may
be viewed later ??

Your help would be greatly appreciated.

Open a DOS-prompt, Rclick on title bar, choose defaults, then settings. When
there, change number of rows in buffer to a bigger one...
Then you can scroll up and down in the DOS windows...


--
Tumppi
=================================
A lot learned from these newsgroups
Helsinki, FINLAND
(translations from/to FI not always accurate
=================================
 
P

Poprivet

monir said:
Hello;
1. In compiling a DOS application in Win XP OS, the Fortran compiler
g95 produces a very large number of warning and error messages.
2. The scroll bar in the command prompt window allows only for 3
additional lines to be seen at the end of compilation, and I'm unable
to use the MORE feature properly to display one screen at a time of
the compilation errors.
3. The DOS help on more (>help more) doesn't clearly show how to use
MORE
4. For compiling test.for, one enters:
...>g95 -o test test.for
Q1: Where should one place MORE in the above command line (with or
without switches) ?? (years ago, it used to be !more at the end)
Q2: If MORE is applicable only to files and not to commands, how can
one redirect the results of the compilation to a file so that it may
be viewed later ??

Your help would be greatly appreciated.

More is a pipe and needs the pipe symbol, plus place it at the end of the
command.

ex: dir /s | more "|" mean to pipe-thru the proglram more.exe.

Also follow the other post about expanding your buffers if needed.

You're inthe wrong group. See a batch group.
 
G

Guest

Hi Thomas;
Thank you for your suggestion.
In DOS prompt window::defaults::layout
increasing the Screen Buffer size width 120
................................................height 4200
...............................window size width 116
................................................height 36
would allow scroll up and down the DOS wondow, but the height of the prompt
window is far exceeding the height of the screen!!
So, in the in the DOS prompt window::properties::layout
..............same Screen Buffer size width 120
................................................height 4200
.................I reduced window size width 116 (from 120)
................................................height 36 (from 70)
and checked "Modify shortcut that started this window.
Closed the Dos window.
Clicked the DOS shortcut. No change! The DOS window heoght is larger than
the height of the screen!!
Should I re-start the computer after setting the DOS window defaults ??
Actually, I've just done that. No change in the defaults properties, but
command prompt properties keep going back to:
...............................window size width 120 (not 116)
................................................height 70 (not 36)

Any suggection(s)??
Thank you.
 
G

Guest

Hi Poprivet;
Thank you for your suggestion.
I tried:
....>g95 -o test test.for | more
Still, could not get it to display the compilation warning/error messages
one screen at a time!! Expanding the buffer, has improved the situation, but
the DOS window height is exceeding the height of the screen. (please refer to
my reply to Thomas)

Regards.

Incidentally, I apologize if this is not the appropriate discussion geoup
for my inquiry. Some contributors advised earlier that all DOS (Win XP)
questions should be posted in this group.
 
B

Beliavsky

Hello;
1. In compiling a DOS application in Win XP OS, theFortrancompiler g95
produces a very large number of warning and error messages.
2. The scroll bar in the command prompt window allows only for 3 additional
lines to be seen at the end of compilation, and I'm unable to use the MORE
feature properly to display one screen at a time of the compilation errors.

You can redirect compiler messages to a file using "2> some_file.txt"
and then inspect the file. For example,

c:\fortran>g95 -c -Wall -Wextra xfilter_sub_system.f90
In file xfilter_sub_system.f90:1528

character (len=100) :: dummy
1
Warning (112): Variable 'dummy' at (1) is set but never used

c:\fortran>g95 -c -Wall -Wextra 2> temp_msg.txt xfilter_sub_system.f90

c:\fortran>type temp_msg.txt
In file xfilter_sub_system.f90:1528

character (len=100) :: dummy
1
Warning (112): Variable 'dummy' at (1) is set but never used
 
G

Guest

Hi Beliavsky;
Great ... that's the way to re-direct compiler messages from DOS window to a
file!
....>g95 -c -Wextra 2> temp_msg.txt test.for

Thank you very much for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top