Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Aide Scilab >> Entrées/Sorties [fichiers] > fscanf


converts formatted input read on a file. This function is obsolete.

Calling Sequence

[v_1, ..., v_n] = fscanf(file, format)



a character string: specifies the format conversion.


a character string giving the file name or an integer giving a logical unit returned by mopen.


This function is obsolete and will be removed in Scilab 5.5.0, use preferably the mfscanf function which is more efficient and is more compatible with the C fscanf procedure.

The fscanf function reads character data on the file specified by the file argument, interprets 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.


5.4.1 Function tagged as obsolete. Will be removed in 5.5.0.

See Also

  • mprintf — converts, formats, and writes data to the main scilab window
  • read — matrices read
  • scanf — converts formatted input on standard input
  • sscanf — converts formatted input given by a string. This function is obsolete.
  • mfscanf — reads input from the stream pointer stream (interface to the C fscanf function)
  • scanf_conversion — mscanf, msscanf, mfscanf conversion specifications
Report an issue
<< fprintfMat Entrées/Sorties [fichiers] fscanfMat >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:46 CEST 2013