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 > dot

dot

(.) símbolo de ponto

Seqüência de Chamamento

123.33

a.*b
a .*. b

%pi * (%e + ..
%i)

cd ..
dir ..

Descrição

.

É usado para marcar pontos (vírgulas) decimais em números: 3.25 e 0.001

.<op>

usado em conjunto com outros símbolos de operadores ( *, /, \, ^, ' ), forma outros operadores. Operações multiplicativas elemento a elemento são obtidas utilizando-se .* , .^ , ./ , .\ ou .' . Por exemplo, C = A ./ B é a matriz com elementos c(i,j) = a(i,j)/b(i,j). O produto de Kronecker é notado por.*. . Note que quando o ponto segue um número, é sempre parte deste 2.*x é avaliado como 2.0*x e 2 .*x (há um espaço entre 2 e .) é avaliado como (2).*x

..

Marca de continuação. Dois ou mais pontos ao fim de uma linha (ou seguidos por um comentário) indicam que a próxima linha será uma continuação.

Linhas de continuação são manipuladas por um processador que constrói uma linha lógica longa de uma dada seqüência de linhas de continuação. Então, marcas de continuação podem ser usadas para cortar uma linha em qualquer ponto.

The following function foo:

function foo()
    plot2d()
    xtitle(["General title"; "It can be multiline, so quite long"], ..
            "This is the X-axis title", "Y title")
endfunction

is equivalent to:

function foo()
    plot2d()

    xtitle(["General title"; "It can be multiline, so quite long"], "This is the X-axis title", "Y title")
endfunction

The logical line formed by physical line 3 and physical line 4 is built as if it was entirely written in the physical line 4 while physical line 3 would be empty. This is done this way because continuation marks can be put anywhere even inside an expression.

The difference between logical and physical lines is of importance when dealing with edition (scinotes, edit) and within error messages (whereami), when the line number is provided or displayed.

".." parameter

When functions are used in a console-oriented way, .. is not considered as a continuation mark but as a simple argument. The most common usage is with cd .., dir .. or ls .. actually standing for cd(".."), etc.

Exemplos

//ponto decimal
1.345

//usado como parte de um operador
x=[1 2 3];x.^2 .*x // um espaço é requerido entre 2 e o ponto

// When writing rows of a matrix on different lines, ".." can be used but are not mandatory.
N = [   ..
    63.    89.    3.   ..
    91.    56.    22.  ..
    15.    64.    40.  ..
    ]
// It can be more simply entered as (or copied/pasted from/to console or script), without appending ".."
N = [
    63.    89.    3.
    91.    56.    22.
    15.    64.    40.
    ]

// Within very long instructions like when creating uicontrol where many properties must be set,
// continuation marks are almost mandatory and allow to write and set one property per line
// in a readable way. A single huge line would not comply with Scilab coding style:
fig = figure("figure_name", "FIGURE", ..
             "dockable",    "off", ..
             "axes_size",   [990,670], ..
             "infobar_visible", "off", ..
             "toolbar",     "none", ..
             "menubar_visible", "on", ..
             "menubar",     "none", ..
             "default_axes","off", ..
             "layout",      "border", ..
             "background",  color(244,244,244), ..
             "tag",         "figure_1", ..
             "visible",     "on");

// Console-oriented calls with some ".." argument
d = pwd(); cd SCI/contrib
cd ..   // stands for cd("..") and expects nothing on the next line
cd(d)   // Go back to your working directory

// This expression does not work anymore in Scilab 6
a = "here I start a very long string...  //but I'm not in the mood of continuing
     - and here I go on"
// This one is the correct expression now
a = "here I start a very long string"+...  //but I'm not in the mood of continuing
    "    - and here I go on"
// This expression is not allowed anymore in Scilab 6: scalar number must be written on one line
y = 12..
45

History

VersãoDescrição
6.0.0

It is not possible anymore to cut a scalar number.

To cut a single string, "+.." operators must be used.

In console-oriented calls, myfun .. no longer expects a continuation on the next line.

Report an issue
<< dollar Scilab palavra-chave equal >>

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