<< тильда Ключевые слова Scilab Управляющая логика >>

Scilab Help >> Scilab > Ключевые слова Scilab > underscore _

underscore _

ignored output argument. gettext() alias

Description

The symbol named _ is treated as a special variable used to assign to nothing.

When calling a function or extracting some values, it is sometimes necessary to skip an output argument. If a variable is named _ the output value will not be assigned.

By default and for compatibility, _() is also an alias to gettext().

Examples

// only output commands, the 2nd output argument
[_, commands] = what()

// multiple list assignment is also supported
[a, _, _, d] = list(1,2,3,4)(:)

// this is also available to user-defined functions
function [a, b, c, d]=myFunc()
  a = 1
  b = 2
  c = 3
  d = 4
endfunction

[a, b, _, d] = myFunc()

See also


Report an issue
<< тильда Ключевые слова Scilab Управляющая логика >>