Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - Русский

Change language to:
English - Français - 日本語 - Português -

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

Справка Scilab >> Scilab > Ключевые слова Scilab > комментарии

комментарии

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

Описание

Два последовательных слэша // за пределами определения строкового значения обозначают начало комментария. Слэши, как и все последующие символы вплоть до конца строки, не интерпретируются.

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.

Внутри функции первые строки, вплоть до первой инструкции или пустой строки могут использоваться для указания содержимого для функции help.

Примеры

g=9.81// ускорение свободного падения

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 вычисляет y=x^2+1
  // x должен быть вектором или матрицей
  y=x^2+1
endfunction

help myfunction

Смотрите также

Report an issue
<< запятая Ключевые слова Scilab сравнение >>

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:
Tue Feb 14 15:13:18 CET 2017