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

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ヘルプ >> Development tools > Assert > assert_checkfalse

assert_checkfalse

条件が false であることを確認する.

呼び出し手順

flag = assert_checkfalse ( condition )
flag = assert_checkfalse ( condition )
[flag,errmsg] = assert_checkfalse ( condition )

パラメータ

condition:

論理値の行列

flag :

1行1列の論理値行列, 条件が falseの場合に %t, そうでない場合に %f

errmsg :

1行1列の文字列行列,エラーメッセージ. flag==%t の場合, errmsg="". flag==%f の場合, errmsgにはエラーメッセージが代入されます.

説明

condition の全エントリがfalseの場合に そのまま実行されます.

conditionのエントリのどれかがtrueの場合に エラーが発生します. conditionが論理値でない場合にエラーが発生します.

conditionのエントリのどれかがtrueの場合,

  • 出力変数errmsgが使用されない場合,エラーが出力され,

  • 出力変数errmsgが使用される場合,エラーは出力されません.

// テストはパスする
assert_checkfalse ( %f );
flag = assert_checkfalse ( %f )
[flag,errmsg] = assert_checkfalse ( %f )
[flag,errmsg] = assert_checkfalse ( [%f %f] );
// テストは失敗する
assert_checkfalse ( [%t %f] );
flag = assert_checkfalse ( [%t %f] )
// エラーは生成されない
[flag,errmsg] = assert_checkfalse ( [%t %f] )
// 誤ったコール
assert_checkfalse ( "a" )

履歴

バージョン記述
5.4.0 関数が導入されました
Report an issue
<< assert_checkerror Assert assert_checkfilesequal >>

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:
Thu Feb 14 15:02:37 CET 2019