CSCI 150, Spring 2003
Home | | Course Schedule | | Assignments | | Lecture NotesIt turns out the the banner is too big to easily cut and paste, the way we have printed other output in the past. To print it (in fact to see the whole thing at once) you'll need to use a DOS feature we have not used before. The feature is called "redirecting the output to a file." Once you think your program is running correctly, you type into a DOS session:
[All of the stuff above can vary. Possibly you have compiled your program into some other directory than P:\csci150, and most likely the name of your program isn't userName_banner. Output.txt is the name I chose for my output file, but you can choose a different one if you want. The extension .txt is a good one to use, because you'll can easily use notepad to print the file. In fact, the only really unchanging part of this example is the greater-than-sign (>) between the DOS command and the name of the file where you want the output stored.]P:\> userName_banner > output.txt
Once you have created the banner file, you can use notepad or PFE to print it.
program banner; {Definitions of your procedures go here!} begin draw_h(10); draw_o(12); draw_l(10); draw_y(5); draw_c(10); draw_r(12); draw_o(12); draw_s(12); draw_s(10); end.
HHHHHHHHHHHHHHHH HHH HHH HHHHHHHHHHHHHHHH ooo o o o o ooo llllllllllllllll ll YYYY YYY YY YYY YYYYYYYYYYY CCCCCCCCCCCCCC CCC CCC CC CC CCC CCC rrrrrrrrrr rr rr rr ooo o o o o ooo sss sssss s s s sss ss ss ssss ss sss sssss s s s sss ss ss ssss ss