Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - English

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

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

Scilab help >> Files : Input/Output functions > mputl


writes strings in a text file

Calling Sequence

r = mputl(txt, file_desc)



returns %t or %f to check if function has correctly wrote on the file.


a character string giving the name of the file or

an integer scalar: a file descriptor returned by mopen function.


a vector of strings.


mputl function allows to write a vector of strings as a sequence of lines in a text file.

mputl supports strings encoded as ANSI/ASCII and UTF-8.


fd = mopen(TMPDIR+'/text_mputl.txt','wt');
mputl('Hello World',fd);

mputl('Simple Hello World',TMPDIR+"/text_mputl_simple.txt");

fd = mopen(TMPDIR+'/text_mputl.txt','rt');

See Also

  • mget — reads byte or word in a given binary format and converts to a double type
  • mgetl — reads lines from an text file
  • mclose — closes an opened file
  • mfprintf — converts, formats, and writes data to a file
  • mput — writes byte or word in a given binary format
  • mputstr — writes a character string in a file
  • mopen — opens a file in Scilab
  • write — write in a formatted file
Report an issue
<< mput Files : Input/Output functions mputstr >>

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:
Mon Oct 01 17:34:52 CEST 2012