HP SunSoft Pascal 4.0 Manual de usuario Pagina 34

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 333
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 33
10 Pascal 4.0 Users Guide
2
Now run the program by typing the name of the executable file. The output
follows:
An Interactive Pascal Program
In Pascal, the predefined file variable, input, is equivalent to the operating
system standard input file, stdin. Similarly, the file variable, output, is
equivalent to the standard output file, stdout.
Following is a Pascal program that copies input to output. Use an editor to
type the code on your system and store it in a file called copy.p:
hostname% temp
Fahrenheit Celsius
---------- -------
32 0.00
33 0.56
34 1.11
..
..
..
program copy(input, output);
{ This program copies input to output. }
var
c: char;
begin
while not eof do begin
while not eoln do begin
read(c);
write(c)
end;
readln;
writeln
end
end. { copy }
Vista de pagina 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 332 333

Comentarios a estos manuales

Sin comentarios