Looking for work? Check out our jobs area.

View \WRITELNX.PAS

This is the second disk of the PASCAL TUTOR system. It has the

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


(* 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.

corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.