Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - 日本語

Please note that the recommended version of Scilab is 6.1.0. This page might be outdated.
See the recommended documentation of this function

Ajuda Scilab >> Arquivos : funções de Entrada/Saída > scanf


Converts formatted input on standard input

Calling Sequence

[v_1,...v_n]=scanf (format);



Specifies the format conversion.


The scanf functions get character data on standard input (%io(1)), interpret it according to a format, and returns the converted results.

The format parameter contains conversion specifications used to interpret the input.

The format parameter can contain white-space characters (blanks, tabs, newline, or formfeed) that, except in the following two cases, read the input up to the next nonwhite-space character. Unless there is a match in the control string, trailing white space (including a newline character) is not read.

  • Any character except % (percent sign), which must match the next character of the input stream.

  • A conversion specification that directs the conversion of the next input field. see scanf_conversion for details.

See Also

  • printf — emulador da função da linguagem C printf
  • read — Leitura de matrizes
  • fscanf — Converts formatted input read on a file
  • sscanf — converte entrada formatada fornecida por um string
  • scanf_conversion — scanf, sscanf, fscanf conversion specifications
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:11:49 CEST 2011