[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'System' (#rtl)

# ReadStr

Read variables from a string

## Declaration

Source position: system.fpd line 71

`procedure ReadStr(`
`const S: string;`
`Args: Arguments`
`);`

## Description

ReadStr behaves like Read, except that it reads its input from the string variable S instead of a file. Semantically, the ReadStr call is equivalent to writing the string to a file using the Write call, and then reading them into the various arguments Arg using the Read call from the same file:

    var
      F : Text;
    begin
      Rewrite(F);
      Write(F,S);
      Close(F);
      Reset(F);
      Read(F,Args);
      Close(F);
    end;

Obviously, the ReadStr call does not use a temporary file.

ReadStr is defined in the ISO Extended Pascal standard. More information on the allowed arguments and the behaviour of the arguments can be found in the description of Read.

## See also

Read |  | Read from a text file into variable
WriteStr |  | Write variables to a string
Write |  | Write variable to a text file

Documentation generated on: Feb 26 2014