Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Русский - 日本語
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
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:34:37 CEST 2016