home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!caen!batcomputer!ghost.dsi.unimi.it!univ-lyon1.fr!cismibm.univ-lyon1.fr!ppollet
- From: ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
- Newsgroups: comp.lang.pascal
- Subject: Re: HOW USE PRINTER FROM A PROGRAM....
- Date: Mon, 14 Dec 1992 15:52:32 GMT
- Organization: INSA CENTRE INFORMATIQUE DU 1er CYCLE
- Lines: 77
- Message-ID: <ppollet.70.724348352@cismibm.univ-lyon1.fr>
- References: <1992Dec14.135919.12430@tolten.puc.cl>
- NNTP-Posting-Host: 134.214.232.25
-
- In article <1992Dec14.135919.12430@tolten.puc.cl> icarus@ing.puc.cl (Eduardo Jimenez) writes:
- >From: icarus@ing.puc.cl (Eduardo Jimenez)
- >Subject: HOW USE PRINTER FROM A PROGRAM....
- >Date: Mon, 14 Dec 1992 13:59:19 GMT
-
- > hello, well i just have two problems programing pascal.(I'm a novice),
- > i want to know how to print a txt file from a program wrote in pascal,
- > ......
-
- Two ways (by standard Pascal )plus many others using Dos,Bios....
-
- - Include a Uses printer atop of your program and dump the Text file to
- it:
- such as :
- var MyText:Text;
- aLine:String;
-
- Assign(MyText,'TEXTFIL.TXT');
- Reset(MyText);
- While Not Eof(MyText) do
- begin
- Readln(MyText,aLine);
- Writeln(lst,aLine);
- ^^^ a text file automatically associated to PRN:
- by the unit Printer
- end;
- Close(MyText);
-
- -Otherwise you may use a second text file say MyOutput:Text and
- assign it to 'PRN'
- .....
- Assign(MyOutPut,'PRN');
- Rewrite(MyOutPut);
- While Not Eof(MyText) do
- begin
- readln(MyText,aLine);
- writeln(MyOutput,aLine);
- end;
- Close(MyText);Close(MyOutput)
- .......
-
-
- > The second problem is how to call others program from other, for instance I
- >have to make a program more big than 64k, so I split it in few parts, then
- >i'll call them, but how...?
- > Pd: im working with Turbo Pascal 6.0
-
- With TP6 there is no need to split programs that are bigger than 64K.
- You can use Units, and Get a limit a 64K of compiled code per unit
- Furthermore, with overlays, the size of your program may exceed the
- available memory... So why bother ?
-
- Nevertheless, if you want to call another program, check in your
- manual for instruction Exec(NameofTheProgram,CommandLine).
- There is no problem calling another program off Turbo. To make them
- communicate , say with common variables.... is another story. You have time
- to learn it .....
-
-
- > If somebody can help me I'll be gratefull
-
-
- > Eduardo J. Aleuy
- > ICARUS@MALLOCO.ING.PUC.CL
-
-
- ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
- --------------------------------------------------------
- Dr Patrick L.Pollet
- Institut National des Sciences Appliquées
- Centre Informatique du 1er Cycle Bat 110
- 20 Avenue A.Einstein
- 69621 Villeurbanne Cedex France
- --------------------------------------------------------
- Phone: 72 43 83 80 - la premiere erreur c'est
- Fax : 72 43 85 33 - de se lever le matin ... GASTON
- -------------------------------------------------------
-