Article View: mod.computers.vax
Article #4047VAX C Printf problem.
From: STEWART_SYS
Date: Thu, 02 Apr 1987 17:49
Date: Thu, 02 Apr 1987 17:49
23 lines
1528 bytes
1528 bytes
I don't know if this has been submitted to the net before, but I've noticed
a pecular occurance when using the SET HOST/LOG sequence to capture output
from C programs using the printf statement. For instance, the following
segment of code will print one line and a carriage return to the screen:
printf("The quick brown ");
printf("fox jumped over ");
printf("the lazy dog.\n");
This results in:
The quick brown fox jumped over the lazy dog.
However, when running the program after doing a SET HOST/LOG, the output
in the log file contains:
The quick brown
fox jumped over
the lazy dog.
...even though the output seen on the screen is correct. Using DEFINE
SYS$OUTPUT PROG.LOG to capture the output works as expected, writing one
line to PROG.LOG.
Anyone got any clues?
Technical Details
Message-ID:
<8704031001.AA22250@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!uta.EDU!STEWART_SYSShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!uta.EDU!STEWART_SYS From: STEWART_SYS@uta.EDU.UUCP Newsgroups: mod.computers.vax Subject: VAX C Printf problem. Message-ID: <8704031001.AA22250@ucbvax.Berkeley.EDU> Date: Thu, 2-Apr-87 12:49:00 EST Article-I.D.: ucbvax.8704031001.AA22250 Posted: Thu Apr 2 12:49:00 1987 Date-Received: Sun, 5-Apr-87 01:02:23 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 23 Approved: info-vax@sri-kl.arpa