Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Português

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

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

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

mputl

writes strings in a text file

Syntax

r = mputl(txt, file_desc)

Arguments

r

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

file_desc

a character string giving the name of the file or

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

txt

a vector of strings.

Description

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.

Examples

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

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

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

See also

  • mget — parses numbers in a binary file and returns them as decimals
  • mgetl — reads lines from an text file
  • mclose — closes opened files
  • mfprintf — converts, formats, and writes data to a file
  • mput — writes byte or word in a given binary format
  • mputstr — write a single text in an open file
  • mopen — opens files in Scilab
  • write — Escrita em arquivo formatado
Report an issue
<< mput Arquivos : funções de Entrada/Saída mputstr >>

Copyright (c) 2022-2023 (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 Jan 03 14:35:25 CET 2022