[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
WRITE Ouput Data pp 111
Syntax: WriteLn (Var1,Var2,..VarN) ;
WriteLn (FileVar,Var1,Var2,..VarN) ;
Type: All
Form: Procedure
Purpose: Output formatted or un-formatted data.
Notes: WriteLn will output a CR/LF to either standard output or
a file after the data.
Parms:
:N right justify the output in a field N characters wide.
:N:X use decimal notation right justified in a field N wide
with X digits after the decimal point.
Usage:
CONST
Splat : Char = '*' ;
CharVar : Char = 'A' ;
ByteVar : Byte = 10 ;
IntVar : Integer = 1234 ;
NumVar1 : Real = 12345.67 ;
NumVar2 : Real = 0.1234567 ;
StrVar : String [3] = 'ABC' ;
BEGIN
WriteLn (Splat,CharVar: 2,Splat) ; { '* A*' }
WriteLn (Splat,ByteVar: 4,Splat) ; { '* 10*' }
WriteLn (Splat,IntVar : 3,Splat) ; { '*1234*' }
WriteLn (Splat,NumVar1:12,Splat) ; { '*1.234567+E04*' }
WriteLn (Splat,NumVar1:17,Splat) ; { '* 1.2345670000+E04*' }
WriteLn (Splat,NumVar1:8:2,Splat); { '*12345.67*' }
WriteLn (Splat,NumVar2:8:7,Splat); { '*0.1234567*' }
WriteLn (Splat,StrVar : 5,Splat) ; { '* ABC*' }
END.
See Also:
Form
Write
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson