• epson Robot 指令集合


    *******************************************************************

    目的:定义一个整型数据

    原型:Integer varName[(subscripts)],varName[(subscripts)],...........  

    解释:Integer is used to declare variables as type Integer.  Variables of type Integer can contain(包含) whole numbers with values between -32768 to 32767.  

    Local variables should be declared at the top of a function.  Global and module variables must be declared outside of functions.

    Example:

     Integer A(10) 'Single dimension array of integer 
      Integer B(10, 10) 'Two dimension array of integer
      Integer C(5, 5, 5) 'Three dimension array of integer
      Integer var1, arrayvar(10)
      Integer i

    *****************************************************************************************

    目的:数据的附加修饰。

    原型:

    全局类型数据:Globle [Preserve] dataType varName [(subsricpts)],varName [(subsricpts)],..........

    模块类型数据:

    局部类型数据:

     

    特别说明:对于全局变量还可以继续使用Preserve。 这样这个数据就可以保存下来。。

    Example:

    局部变量的声明 

    Function main

    Integer i

    Fend

    模块内变量的声明

    Integer m_i

    Function main

    Fend

    全部变量(全局保护变量)的声明

    Globle (Preserve) Integer g_i

    Function main

    Fend

    ******

    后记:细心的同学发现了 我在声明 模块变量和全部变量的时候 使用前缀 m_ 和g_   ,这是优秀程序员的基本素养。

    这样以后看到变量的时候 就知道这个什么作用域的变量,提高代码的阅读体验。

    ×××××××××××××××××××××××××××××××××××××××××××××××××××××

  • 相关阅读:
    小程序中阿里图标引入方式
    微信小程序自定义下导航页面切换效果的合理写法
    小程序自定义下导航效果简单实现
    自适应布局all样式
    兼容html5新标签及媒体查询引入插件
    all.css
    一个简单遮罩弹窗效果
    前端代码标准最佳实践:CSS
    复选框常用选中状态判断
    使输入框(input  & textarea)变为只可读状态readonly="readonly",禁用输入框disabled="disabled"
  • 原文地址:https://www.cnblogs.com/wenluderen/p/4317744.html
Copyright © 2020-2023  润新知