www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Scrolling up and down in MSDOS command window

↑ ↓ ← "Antwan Williams" <antwan799 attbi.com> writes:
Does anyone know how to scroll up and down in a MSDOS command prompt window?
If I print a list or my program has a lot of bugs in it and runs through the
whole screen, what can I do to see the all the errors that are not in the
immediate window?
Jan 30 2003
Jan Knepper <jan smartsoft.us> writes:
Which operating system are you using?
In Windows XP I have a command prompt configured with.
Options:
    Cursor Size: Small
    Display Options: Window
    Command History
        Buffer Size 999
        Number of Buffers 4

Font:
    Size: 8 x 12

Layout:
    Screen Buffer Size:
        Width: 80
        Height: 1024 (you can scroll SEVERAL pages back with this.
    Window Size:
        Width: 80
        Height: 48

HTH
Jan



Antwan Williams wrote:

 Does anyone know how to scroll up and down in a MSDOS command prompt window?
 If I print a list or my program has a lot of bugs in it and runs through the
 whole screen, what can I do to see the all the errors that are not in the
 immediate window?

Jan 30 2003
↑ ↓ → "Antwan Williams" <antwan799 attbi.com> writes:
I have Windows 98.
"Jan Knepper" <jan smartsoft.us> wrote in message
news:3E39A5F8.7F195530 smartsoft.us...
 Which operating system are you using?
 In Windows XP I have a command prompt configured with.
 Options:
     Cursor Size: Small
     Display Options: Window
     Command History
         Buffer Size 999
         Number of Buffers 4

 Font:
     Size: 8 x 12

 Layout:
     Screen Buffer Size:
         Width: 80
         Height: 1024 (you can scroll SEVERAL pages back with this.
     Window Size:
         Width: 80
         Height: 48

 HTH
 Jan



 Antwan Williams wrote:

 Does anyone know how to scroll up and down in a MSDOS command prompt


 If I print a list or my program has a lot of bugs in it and runs through


 whole screen, what can I do to see the all the errors that are not in


 immediate window?


Jan 30 2003
→ "KarL" <someone somewhere.org> writes:
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

If you are using MS-DOS (and Windows Console and Unix),
the easiest way of redirecting your all printf and fprintf is to
add this in the beginning of your program:
freopen("wherestdoutgoes.txt", stdout);freopen("wherestderrgoes.txt", =
stderr);
This way, you can keep a record of all the text generated by your =
program
using printf(...) and fprintf(stderr, ...) including system errors.

You may chose to only redirect stderr only since stdout is for
normal screen output.


"Antwan Williams" <antwan799 attbi.com> wrote in message =
news:b1c24i$19g1$1 digitaldaemon.com...
 Does anyone know how to scroll up and down in a MSDOS command prompt =

 If I print a list or my program has a lot of bugs in it and runs =

 whole screen, what can I do to see the all the errors that are not in =

 immediate window?
=20
=20

Jan 30 2003
"Nic Tiger" <nictiger progtech.ru> writes:
I can simply redirect output to file and then view this file wherever you
want: Far, Notepad, etc.

To redirect file add "> filename"  (without quotes) at the end of command
line, e.g..:
  sc test.cpp > err.log

The same can be done for your own program:
  test.exe > exe.log

Nic Tiger.

"Antwan Williams" <antwan799 attbi.com> сообщил/сообщила в новостях
следующее: news:b1c24i$19g1$1 digitaldaemon.com...
 Does anyone know how to scroll up and down in a MSDOS command prompt

 If I print a list or my program has a lot of bugs in it and runs through

 whole screen, what can I do to see the all the errors that are not in the
 immediate window?

Jan 30 2003
↑ ↓ "KarL" <someone somewhere.org> writes:
Yes, but not for stderr

"Nic Tiger" <nictiger progtech.ru> wrote in message
news:b1cung$2jlu$1 digitaldaemon.com...
 I can simply redirect output to file and then view this file wherever you
 want: Far, Notepad, etc.

 To redirect file add "> filename"  (without quotes) at the end of command
 line, e.g..:
   sc test.cpp > err.log

 The same can be done for your own program:
   test.exe > exe.log

 Nic Tiger.

 "Antwan Williams" <antwan799 attbi.com> сообщил/сообщила в новостях
 следующее: news:b1c24i$19g1$1 digitaldaemon.com...
 Does anyone know how to scroll up and down in a MSDOS command prompt

 If I print a list or my program has a lot of bugs in it and runs through

 whole screen, what can I do to see the all the errors that are not in the
 immediate window?


Feb 03 2003
"Rajiv Bhagwat" <dataflow vsnl.com> writes:
Under Linux, you can do:

make  2>  err.log

for redirecting stderr to a file. ('1' for stdout). Too bad this does not
work in dos.
- Rajiv Bhagwat

"KarL" <someone somewhere.org> wrote in message
news:b1nl8t$sre$1 digitaldaemon.com...
 Yes, but not for stderr

 "Nic Tiger" <nictiger progtech.ru> wrote in message
 news:b1cung$2jlu$1 digitaldaemon.com...
 I can simply redirect output to file and then view this file wherever


 want: Far, Notepad, etc.

 To redirect file add "> filename"  (without quotes) at the end of


 line, e.g..:
   sc test.cpp > err.log

 The same can be done for your own program:
   test.exe > exe.log

 Nic Tiger.

 "Antwan Williams" <antwan799 attbi.com> сообщил/сообщила в новостях
 следующее: news:b1c24i$19g1$1 digitaldaemon.com...
 Does anyone know how to scroll up and down in a MSDOS command prompt

 If I print a list or my program has a lot of bugs in it and runs



 the
 whole screen, what can I do to see the all the errors that are not in



 immediate window?



Feb 03 2003
→ Laurentiu Pancescu <plaur crosswinds.net> writes:
Rajiv Bhagwat wrote:
 Under Linux, you can do:
 
 make  2>  err.log
 
 for redirecting stderr to a file. ('1' for stdout). Too bad this does not
 work in dos.
 - Rajiv Bhagwat
 

AFAIK, it does work with CMD (WinNT/2k/XP) command shell. If not, one could use an alternative shell, like zsh from UnxUtils (http://unxutils.sourceforge.net). HTH, Laurentiu
Feb 04 2003
→ "KarL" <someone somewhere.org> writes:
Sigh.....  The title says MS-DOS, please.... I know you are trying to be
helpful.

"Rajiv Bhagwat" <dataflow vsnl.com> wrote in message
news:b1nr7c$vub$1 digitaldaemon.com...
 Under Linux, you can do:

 make  2>  err.log

 for redirecting stderr to a file. ('1' for stdout). Too bad this does not
 work in dos.
 - Rajiv Bhagwat

 "KarL" <someone somewhere.org> wrote in message
 news:b1nl8t$sre$1 digitaldaemon.com...
 Yes, but not for stderr

 "Nic Tiger" <nictiger progtech.ru> wrote in message
 news:b1cung$2jlu$1 digitaldaemon.com...
 I can simply redirect output to file and then view this file wherever


 want: Far, Notepad, etc.

 To redirect file add "> filename"  (without quotes) at the end of


 line, e.g..:
   sc test.cpp > err.log

 The same can be done for your own program:
   test.exe > exe.log

 Nic Tiger.

 "Antwan Williams" <antwan799 attbi.com> сообщил/сообщила в новостях
 следующее: news:b1c24i$19g1$1 digitaldaemon.com...
 Does anyone know how to scroll up and down in a MSDOS command prompt

 If I print a list or my program has a lot of bugs in it and runs



 the
 whole screen, what can I do to see the all the errors that are not in



 immediate window?




Feb 05 2003
Larry Brasfield <larry_brasfield snotmail.com> writes:
In article <b1nl8t$sre$1 digitaldaemon.com>, 
KarL (someone somewhere.org) says...
 Yes, but not for stderr

The cmd.exe shell redirects stderr when fed tokens as shown in the following session: C:\Work>dir NotAFilename 2>yap Volume in drive C has no label. Volume Serial Number is 5C76-EEA2 Directory of C:\Work C:\Work>type yap File Not Found C:\Work>dir NotAFilename >yap 2>&1 C:\Work>type yap Volume in drive C has no label. Volume Serial Number is 5C76-EEA2 Directory of C:\Work File Not Found C:\Work> If you are using command.com, then there is no hope of doing anything sensible with it. -- -Larry Brasfield (address munged, s/sn/h/ to reply)
Feb 05 2003
↑ ↓ "Gisle Vanem" <gisle war.hell.no> writes:
"Larry Brasfield" <larry_brasfield snotmail.com>:

 If you are using command.com, then there is
 no hope of doing anything sensible with it.

Doesn't all DOS power-users use 4DOS? Is so it's easy: "command >&> file". -- Gisle V. Not what you think it is; http://www.nice-tits.org
Feb 05 2003
→ Heinz Saathoff <hsaat bre.ipnet.de> writes:
Gisle Vanem schrieb...
 
 Doesn't all DOS power-users use 4DOS? Is so it's easy:
 "command >&> file".

Not only on DOS. I use 4NT on NT4 and have 3 console windows open. It's still a very good tool. - Heinz
Feb 06 2003
→ Larry Brasfield <larry_brasfield snotmail.com> writes:
In article <b1st1h$147o$1 digitaldaemon.com>, 
Gisle Vanem (gisle war.hell.no) says...
 "Larry Brasfield" <larry_brasfield snotmail.com>:
 
 If you are using command.com, then there is
 no hope of doing anything sensible with it.

Doesn't all DOS power-users use 4DOS? Is so it's easy: "command >&> file".

I almost put in a plug for JP Software's CLI shells, but decided to stick to the subject. I find it easier on my brain to stick with the redirection syntax used by cmd.exe, (also accepted by 4NT), since from time to time I have to use some crippled system that lacks a decent shell. -- -Larry Brasfield (address munged, s/sn/h/ to reply)
Feb 06 2003