WriteStr
Write variables to a string
Declaration
Source position: system.fpd line 87
procedure WriteStr(out S: string; Args: Arguments);
Description
WriteStr behaves like Write , except that it stores its output in the string variable S instead of a file. Semantically, the WriteStr call is equivalent to writing the arguments to a file using the Write call, and then reading them into S using the Read call from the same file:
var
F : Text;
begin
Rewrite(F);
Write(F,Args);
Close(F);
Reset(F);
Read(F,S);
Close(F);
end;
Obviously, the WriteStr call does not use a temporary file.
WriteStr is defined in the ISO Extended Pascal standard. More information on the allowed arguments and the possible formatting can be found in the description of Write .
See also
Name | Description |
---|---|
Read | Read from a text file into variable |
ReadStr | Read variables from a string |
Write | Write variable to a text file or standard output |