Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Scilab > Control flow > else

else

if-then-elseおよびselect-case-then-elseのキーワード

説明

ifおよびselectで使用されます.

val = %t

if val==%t then
    disp("true");
else
    disp("false");
end

select val
   case %t then
      disp("true");
   case %f then
      disp("false");
   else
      disp("a third variant");
end

参照

  • elseif — if-then-elseのキーワード
  • if — 条件付き実行
  • select — select キーワード
  • &, && — Binary AND between integers. Logical AND over/between booleans and numbers
  • |, || — Binary OR between integers. Logical OR over/between booleans and numbers

履歴

VersionDescription
6.0.0 else is now protected: Assignments like else=1 are no longer possible.
Report an issue
<< do Control flow elseif >>

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:
Tue Feb 25 08:53:17 CET 2020