Re:Newbie needs help with code for Printing in tp 7.0
emb...@pixi.com said:
( On Thu Dec 12 22:31:00 1996 )
( Msg-Id was: <58q1hk$...@rigel.pixi.com> )
Quote
>I am very new at pascal and would like to know the code to allow a program to
>print. I am taking a class and if I get this program to print it will help
>my grade. I need all the help I can get. I would appreciate any help from
>anyone that has anything to offer. Thanks.
Well... let me see...
1-) do you know what does WriteLn do???
2-) do you know some basic printing codes? (as ^L )
3-) do you know how to include units? (with uses)
4-) Then you've got everything you need...
Just do the following:
{========Printing.pas===============}
Program make_some_printing_output;
Uses
printer, CRT;
Const
Nxt_Pg = #12;
Var
Sarasa : string;
begin
Write ('What do you want to send to the printer?: ');
ReadLn (sarasa);
Wrtie (LST, sarasa);
{in this case LST is our printer, defined in printer unit.}
{but I think that you also can do a Write (PRN, sarasa), without unit
printer}
{in pascal, that's the way to redirect the input and the output, you put
in the}
{Writeln sentence 'where' you want to write, and what (for reading is the
same thing} end.
{========Printing.pas===============}
Hope it helps. IF you want to be a step ahead, start studying the conditional
structures, loop controls, etc (if, for, while, case, etc.) if you do
understand them, then you'll be a Hero for your girl-class-fellows (english
from dictionary...jejeje...), and you'll be a Nerd to your
male-class-fellows... (that's what happens to me... ;-(... )
-\ >> andres mosto apexe...@interactive.com.ar
--\ >> team os/2 xeuz international co. ltd. ---\
Quote
>> buenos aires - argentina - south america