⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 longest1.groovy

📁 大名鼎鼎的java动态脚本语言。已经通过了sun的认证
💻 GROOVY
字号:
package gls.ch03.s02

/**
 * GLS 3.2: The longest possible translation is used at each step, even if the 
 * result does not ultimately make a correct program while another lexical 
 * translation would.
 * 
 * This is fundamental to the way the lexer works. If there is a problem with
 * it, other tests (e.g. to test functionality of operators or identifier
 * names) would expose it quickly. Nevertheless, we test some combinations
 * here for consistency.
 *
 * @author Alan Green
 */
class Longest1 extends GroovyTestCase {

    // Increment and decrement operators
    void testPrefixIncDec() {
        def a = 20
        def b = 10
        def c = a - b
        //c = a -- b // @fail:parse 
        //c = a ++ b // @fail:parse
        //c = a +- b // @pass
        //c = a -+ b // @pass
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -