Pascal/Turbo Pascal - como imprimir en turbo pascal 1.5 para windows

 
Vista:
sin imagen de perfil
Val: 1
Ha disminuido su posición en 20 puestos en Pascal/Turbo Pascal (en relación al último mes)
Gráfica de Pascal/Turbo Pascal

como imprimir en turbo pascal 1.5 para windows

Publicado por carlos edu (2 intervenciones) el 01/10/2021 18:01:23
hice este codigo para turbo pascal para dos 7.0
y en el sistema operativo windows xp y imprime
correctamente, reconoce el parametro lst.
program Welcome;
uses
Crt,printer;
begin
Writeln(lst,'Welcome to Turbo Pascal for dos');
end.

hice este otro codigo para turbo pascal para windows 1.5
y lo hice funcionar en el sistema operativo windows xp
pero no reconoce el parametro "lst", alguien sabe cual
es el parametro que usa turbo pascal 1.5 para windows
para imprimir.
program Welcome;
uses
WinCrt,print;
begin
Writeln(lst,'Welcome to Turbo Pascal 1.5 for Windows');
end.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

como imprimir en turbo pascal 1.5 para windows

Publicado por geergon (4 intervenciones) el 15/10/2021 04:10:25
Hola,

http://computer-programming-forum.com/29-pascal/236add10f9a4d035.htm

Whigdo> How can I Print Output in Turbo Pascal for Windows v. 1.5?

Rob Morewo > from Turbo Pascal for Windows 1.5:

I'm sure I've answered this question monthly for the last year!
We need to put it in the FAQ. (TPW seems to be different from TP.)

In TPW, just open the printer as a text file and write to it:

Var Printer:Text;
Begin
Assign(Printer,'LPT1:'); {or LPT2: or LPT3: if you have them!}
Rewrite(Printer);
WriteLn(Printer,'This will be printed.');
Close(Printer);
end.

If you want the same code to printer either to the screen or to
the printer, a text file can be assigned to the screen with AssignCRT:

Var Output:Text;
Begin
Write('Screen or Printer output (S/P): ');
If UpCase(ReadKey)='S'
Then AssignCRT(Output)
Else Assign(Output,'LPT1:');
Rewrite(Output);
WriteLn(Output,'This will appear either on screen or printer.');
Close(Output);
end.

If you want screen output echoed to the printer you could override
the WriteLn command, but that is a pain. Probably better to modify
the WinCRT unit to echo to the printer. The souce code for the
WinCRT unit is included with TPW1.5 (but it is NOT a great example
of good style). I rewrite it before letting my students see it.
_
|/|\/| || Maths & Computer Science

(Canada)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar