00. 目录

01. 概述

stop - 停止程序执行。

02. 签名

stop( : : : )

03. 描述

stop算子停止HDevelop程序的连续程序执行。 如果发生这种情况,即使下面有大量的注释或其他不可执行的程序行,PC(程序计数器)仍停留在stop语句(而不是放在下一个可执行程序行),以便直接显示程序中断的原因。

算子相当于菜单栏中的stop行动(F9)。 程序可以通过run(F5)继续。

可以通过在首选项对话框(preferences dialog)中设置时间参数来重新定义行为。 执行不会停止,而是在等待指定的时间段后继续执行。 在这段时间内,程序可以被F9中断或者由一个运行命令继续。 这由程序窗口第一列中的图标标记。

原文描述

The stop operator stops the continuous program execution of the HDevelop program. If this happens the PC remains on the stop statement (instead of being placed at the next executable program line) in order to show directly the reason for the program interruption even if numerous comments or other not executable program lines follow.

The operator is equivalent to the Stop action (F9) in the menu bar. The program can easily be continued by the Run action (F5).

It is possible to redefine the behavior by setting a time parameter in the preferences dialog. The execution will not stop but continue after waiting the specified period of time. Within this period of time the program can be interrupted by F9 or continued by one of the run commands. This is marked by an icon in the first column of the program window.

04. 注意

此算子不支持代码导出。

05. 参数

06. 结果

如果程序在stop语句处停止,则保留前一个算子的返回状态。 如果程序继续一个stop算子,stop总是返回2(H_MSG_TRUE)。

HDevelop例程

stop.hdev Stop the execution in a loop to view intermediate results
for.hdev Use a for loop to iterate over extracted blobs
display_operators.hdev Visualize results
crystal.hdev Extract hexagonally shaped crystals via local thresholding and region post-processing
comment.hdev Use comments and verbatim code export

程序示例

read_image (Image, 'fabrik')
regiongrowing (Image, Regions, 3, 3, 6, 100)
count_obj (Regions, Number)
dev_update_window ('off')
for i := 1 to Number by 1
  select_obj (Regions, RegionSelected, i)
  dev_clear_window ()
  dev_display (RegionSelected)
  stop ()
endfor

07. 附录

7.1 机器视觉博客汇总
网址:javascript:void(0)