显示模式属性

通过{attribute’displaymode’}指令的帮助,单变量的显示模式能被定义。此设置会覆盖所有监视变量的显示模式的全局设置,d可以通过子菜单的命令 “显示模式”实现 (默认在在线菜单中)。

此指令必须放在包含变量声明的行之前。

句法:

{attribute 'displaymode':=<displaymode>}

以下定义可用:

- 显示双重格式:

{attribute 'displaymode':='bin'}

{attribute 'displaymode':='binary'}

- 显示六角格式:

{attribute 'displaymode':='dec'}

{attribute 'displaymode':='decimal'}

- 显示六角格式:

{attribute 'displaymode':='hex'}

{attribute 'displaymode':='hexadecimal'}

例子:

VAR

   {attribute 'displaymode':='hex'}

   dwVar1: DWORD;

END_VAR