LispEx icon indicating copy to clipboard operation
LispEx copied to clipboard

scheme代码中含有;注释行的时候会陷入死循环

Open insionng opened this issue 8 years ago • 0 comments

(define (func x)  
    (if (and  
            (or  
                (and (> x 10) (< x 20))  
                (and (< x -10) (> x -20))  
            )  
            (and (not (= x 15)) (not (= x -15)))  
        )  
        10000  
        -10000  
    )  
)  
;Value: func  
(func 11)  
;Value: 10000  
(func 20)  
;Value: -10000  
(func -11)  
;Value: 10000  
(func 15)  
;Value: -10000  
(func -15)  
;Value: -10000  

以上代码带注释的时候无法执行,去掉所有注释之后就正常了。

insionng avatar Mar 06 '16 05:03 insionng