O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

TextStream.ReadLine Method

Syntax

                  oTextStreamObj
                  .ReadLine

Return Value

A String.

Availability

R

Description

Reads a line of the text file or input stream into memory, from the start of the current line up to the character immediately preceding the next end-of-line marker.

Rules at a Glance

  • Files opened for writing or appending can’t be read; you must first close the file and reopen it using the ForRead constant.

  • The ReadLine method causes the file pointer to advance to the beginning of the next line, if there is one.

  • When used to retrieve standard input from the keyboard, the ReadLine method pauses program execution and waits until the end-of-line character (i.e., the Enter key) has been pressed. Unless your script expects to retrieve just one line of input, it’s best to call the ReadLine method repeatedly in a loop.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required