Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Português


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

  • functions — procedimentos Scilab e objetos Scilab
  • names — scilab names syntax
  • symbols — nomes dos operadores Scilab
  • gettext — indexes or/and translates some indexed english messages
Report an issue
<< tilde Scilab palavra-chave Control flow >>

Copyright (c) 2022-2024 (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:
Thu Oct 24 11:16:49 CEST 2024