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 >> Scilab > Scilab palavra-chave > comments

comments

(// or /*...*/) comments

Descrição

Uma seqüência de duas barras // fora de uma definição de string marca o início de um comentário. As barras, tanto quanto o restante dos caracteres até o fim das linhas não são interpretados.

Another way to comment a block of code is to use /* at the beginning and */ at the end. It is more useful than // which must be positioned at the beginning of each line to comment.

Dentro de uma função, as primeiras linhas de comentário até a primeira instrução ou linha vazia podem ser usadas para fornecer o conteúdo padrão para a documentação de ajuda da função ("help" da função).

Exemplos

g=9.81// a gravidade

text='a//b'

/* As this comment is quite long to be on many lines,
the symbols slash and star to start the comment
and star and slash to end the comment are used */

function y=myfunction(x)
//  myfunction computa y=x^2+1
// x deve ser um vetor ou uma matriz
  y=x^2+1
endfunction

help myfunction

Ver Também

  • head_comments — exibe comentários do cabeçalho da função Scilab
  • slash — (/) divisão esquerda-direita e feedback ("resposta")
  • backslash — (\) divisão matricial direita-esquerda: exact or least square solution

Histórico

VersãoDescrição
6.0 /* .. */ block comments introduced.
Report an issue
<< comma Scilab palavra-chave comparison >>

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:18 CET 2022