日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【机器视觉】 global算子

發(fā)布時間:2024/4/24 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【机器视觉】 global算子 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

00. 目錄

文章目錄

    • 00. 目錄
    • 01. 概述
    • 02. 簽名
    • 03. 描述
    • 04. 注意
    • 05. 參數(shù)
    • 06. 結(jié)果
    • 07. 附錄

01. 概述

global - 聲明一個全局變量。

02. 簽名

global( : : Declaration : )

03. 描述

可以用來聲明一個全局變量。 聲明的全局變量對所有其他程序也是可見的,所有其他程序也需要顯式聲明與全局變量相同的變量。

如果某個變量沒有在程序中顯式聲明為全局變量,則即使存在具有相同名稱的全局變量,該變量也是該程序中的局部變量。

參數(shù)Declaration 由可選關(guān)鍵字’def’,類型’object’或’tuple’,可選關(guān)鍵字’vector’(后接圓括號中的所需維度)和變量名組成的變量聲明等部分組成。

聲明一個圖型變量的類型為’object’,聲明一個控制變量為’tuple’。

關(guān)鍵字’def’將一個聲明顯式標記為變量被定義的地方。 在大多數(shù)情況下,這不是必須的,因為在HDevelop中,變量實例只要在某個地方被聲明就立即創(chuàng)建。 但是,如果將多個程序?qū)С鰹榫幊陶Z言,并且如果這些程序不是導出到一個包含所有程序的輸出文件中,而是導出到單獨的輸出文件中,標記全局變量定義的位置是必須的。 鏈接(引用)到一個庫或應用程序的一組程序?qū)С鑫募仨毎總€全局變量的一個定義,以避免符號未定義和多次定義。

在程序列表中,全局變量聲明需要顯示,并且必須不能輸入括號,以強調(diào)該行是聲明而不是可執(zhí)行的算子。 語法如下:

global [def] {object|tuple} [vector()]

原文描述

The global statement can be used to declare a global variable. By declaring a variable as global the variable becomes visible to all other procedures that also declare the same variable explicitly as global.

If a variable is not explicitly declared as global inside a procedure, the variable is local within that procedure even if there is a global variable with the same name.

The parameter Declaration contains the variable declaration that consists of the optional keyword ‘def’, the type ‘object’ or ‘tuple’, the optional keyword ‘vector’ (followed by the desired dimension in round brackets), and the variable name.

Setting the type to ‘object’ an iconic variable is declared, by setting it to ‘tuple’ a control variable is declared.

The keyword ‘def’ allows to mark one declaration explicitly as the place where the variable is defined. In most cases this will not be necessary because in HDevelop the variable instance is created as soon as it is declared somewhere. However, if several procedures are exported to a programming language and if the procedures are not exported into one output file that contains all procedures together but into separate output files it will become necessary to mark one of the global variable declarations as the place where the variable is defined. A set of procedure export files that are linked to one library or application must contain exactly one definition of each global variable in order to avoid both undefined symbols and multiple definitions.

In the program listing, global variable declarations are displayed and must be entered without parenthesis in order to emphasize that the line is a declaration and not an executable operator. The syntax is as follows:

global [def] {object|tuple} [vector()]

04. 注意

05. 參數(shù)

Declaration (input_control)   string → (string)
全局變量聲明:可選關(guān)鍵字’def’,類型和變量名稱
推薦值: ‘object’, ‘tuple’, ‘def object’, ‘def tuple’, ‘object vector(1)’, ‘tuple vector(1)’, ‘def object vector(1)’, ‘def tuple vector(1)’

06. 結(jié)果

global不會執(zhí)行。

HDevelop例程
variable_types.hdev Define variable types in HDevelop

07. 附錄

7.1 機器視覺博客匯總
網(wǎng)址:https://dengjin.blog.csdn.net/article/details/116837497

總結(jié)

以上是生活随笔為你收集整理的【机器视觉】 global算子的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。