home *** CD-ROM | disk | FTP | other *** search
- { FORMAT1.PAS
- Demonstrates use of the Turbo Vision FormatStr procedure using a
- parameter record.
- }
-
- program DemoFormat;
-
- uses
- Drivers, Objects;
-
- type
- TParamRec = record
- FName : PString;
- FBytes: LongInt;
- end;
-
- var
- ParamRec : TParamRec;
- ResultStr: String;
-
- begin
-
- ParamRec.FName := NewStr('SAMPLE.TXT');
- ParamRec.FBytes := 654321;
-
- FormatStr( ResultStr, 'File %s is %d bytes in size.', ParamRec );
-
- Writeln( ResultStr );
- Write('Press Enter to Continue.');
- Readln;
- end.