Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - 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 Scilab >> Cadeias de Caracteres (Strings) > string

string

conversão para string (cadeia de caracteres)

Seqüência de Chamamento

string(x)
[out, in, text] = string(x)

Parâmetros

x

matriz de reais ou função

Descrição

Converte uma matriz em uma matriz de strings.

Se x é uma função [out, in, text] = string(x) retorna três vetores de strings : out é o vetor de variáveis de saída, in é o vetor de variáveis de entrada, e text é o vetor (coluna) do código fonte da função.

Se x é uma variável lib (bibiloteca), text é um vetor coluna de strings. O primeiro elemento contém o endereço do arquivo biblioteca e o outro o nome da função que ela define.

Strings são definidos como 'string' (entre aspas simples) ou "string" (entre aspas duplas); matrizes de strings são definidas como matrizes de constantes.

Concatenação de strings é feita pela operação +.

Exemplos

string(rand(2, 2))
            
            deff("y = mymacro(x)", "y = x + 1")
            [out, in, text] = string(mymacro)
            x = 123.356; 
            disp("Result is " + string(x));
            
            disp("/" + string(~%t) + "/");
            disp("/" + string(%i+1) + "/");
            disp("/" + string(int16(-123)) + "/");
            disp("/" + string(1 + %s + %s^3) + "/");
            
            string(corelib)
            
            v = format();
            disp(string(%pi))
            format(24);
            disp(string(%pi))
            format(v(2))

Ver Também

  • part — extração de strings
  • length — comprimento de um objeto
  • quote — (') transpose operator, string delimiter
  • evstr — avaliação de expressões
  • execstr — executa código Scilab em strings
  • strsubst — substitui um string por outro dentro de um string
  • strcat — concatena strings
  • strindex — procura posição de um string em outro
  • sci2exp — converte uma expressão para um string
  • format — impressão de números e formato de exibição
Report an issue
<< strindex Cadeias de Caracteres (Strings) strings >>

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 Oct 01 17:39:53 CEST 2012