# readLine {#readline}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`readLine(handle)`

## Arguments {#arguments}

**handle** is the handle of the file to read.

## Examples {#examples}

Read a line from the given file. The return line doesn't include the line delimiter. If the file reaches the end, the function will return a null object which can be tested by the [isVoid](../i/isVoid.md) function.

## Examples {#examples-1}

```
x=`IBM`MSFT`GOOG`YHOO`ORCL;
eachRight(writeLine, file("test.txt","w"), x);
// output: [1,1,1,1,1]

 fin = file("test.txt")
 do{
 x=fin.readLine()
 if(x.isVoid()) break
 print x
 }while(true);

/* output:
IBM
MSFT
GOOG
YHOO
ORCL
*/
```

Related function: [writeLine](../w/writeLine.md)

