Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : WRITELNX.PAS

 
Output of file : WRITELNX.PAS contained in archive : PASTUT.ZIP
(* Chapter 10 - Program 1 *)
program Examples_Of_Write_Statements;

var Index : byte;
Count : real;
What : boolean;
Letter : char;
Name : string[10];

begin
Writeln('Integer');
Index := 17;
Writeln(Index,Index);
Writeln(Index:15,Index:15);

Writeln;
Writeln('Real');
Count := 27.5678;
Writeln(Count,Count);
Writeln(Count:15,Count:15);
Writeln(Count:15:2,Count:15:2);
Writeln(Count:15:3,Count:15:3);
Writeln(Count:15:4,Count:15:4);

Writeln;
Writeln('Boolean');
What := FALSE;
Writeln(What,What);
Writeln(What:15,What:15);

Writeln('Char');
Letter := 'Z';
Writeln(Letter,Letter);
Writeln(Letter:15,Letter:15);

Writeln('String');
Name := 'John Doe';
Writeln(Name,Name);
Writeln(Name:15,Name:15);

Writeln;
Writeln('Text output','Text output');
Writeln('Text output':15,'Text output':15);
end.




{ Result of execution

Integer
1717
17 17

Real
2.7567800000E+01 2.7567800000E+01
2.75678000E+01 2.75678000E+01
27.57 27.57
27.568 27.568
27.5678 27.5678

Boolean
FALSEFALSE
FALSE FALSE
Char
ZZ
Z Z
String
John DoeJohn Doe
John Doe John Doe

Text OutputText Output
Text Output Text Output

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : WRITELNX.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/