Scilab Function

mgetl - read lines from an ascii file

### Sequence d'appel

  `txt=mgetl(file_desc [,m])`

### Parametres

- `file_desc` :a character string giving the file name or a logical unit returned by mopen
- `m` : an integer scalar. Default value is -1.
- `txt` : a column vector of string

### Description

`mgetl` function allows to read a lines from an ascii file.

If `m` is omitted or is `-1` all lines till end of file occurs are read.

If `m` is given `mgetl` tries to read exactly m lines, if an end of file occurs before `m` lines are read an error is issued. This option is useful to sequentialy read part of a file as follow

`mgetl` allows to read files coming from Unix, Windows, or Mac operating systems.

### Exemples

    mgetl('SCI/scilab.star',5)

    mgetl SCI/macros/elem/erf.sci

    fd=mopen('SCI/scilab.star','r')
    mgetl(fd,10)
    mclose(fd)

### Voir aussi

`mputl` `mclose` `mfscanf` `mget` `mgetstr` `mopen` `read`

### Auteur

S. Steer