【机器视觉】 case算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數
- 06. 結果
- 07. 附錄
01. 概述
case - 跳轉標記,在switch段內開啟一個分支。
02. 簽名
case( : : Constant : )
03. 描述
? case定義了一個switch段的跳轉標記。 如果switch語句的控制表達式的值與Constant中定義的常量整數表達式相匹配,它將執行分支的內容。 對于這個參數,只接受常量整數表達式。 變量表達式和其他數據類型是不可行的。
如果在編程語言C,C ++和C#中,case語句不打開在下一個case或default語句中自動留下的塊(As in the programming languages C, C++, and C# the case statement does not open a block that is automatically left at the next case or default statement. )。 相反,它就像一個goto標記,如果標記匹配,就可以訪問。 為了離開一個case分支并在switch段結束后繼續執行,break語句可以在switch段的任何地方使用。
原文描述:
case defines a jump label within a switch block. It starts a branch that is executed if the value of the control expression of the switch statement matches the constant integer expression that is defined in Constant. For this parameter only constant integer expressions are accepted. Variable expressions and other data types are not allowed.
As in the programming languages C, C++, and C# the case statement does not open a block that is automatically left at the next case or default statement. In contrast, it works just like a goto label that is accessed if the label matches. In order to leave a case branch and continue execution after the end of the switch block, the break statement can be used anywhere within the switch block.
04. 注意
無
05. 參數
Constant (input_control) integer → (integer)
用于確定訪問分支的switch控制表達式的哪個值的常量整數表達式。
Default value: 1
06. 結果
case(作為算子)總是返回2(H_MSG_TRUE)。
HDevelop例程
switch_case.hdev Use switch/case statement for a multiway branch
程序示例
07. 附錄
7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497
總結
以上是生活随笔為你收集整理的【机器视觉】 case算子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 break算子
- 下一篇: 【机器视觉】 catch算子