example.scm

来自「一个语言识别引擎」· SCM 代码 · 共 26 行

SCM
26
字号
(declare (uses cyarp))

(Network-init)

(define p (new-BufferedPortBottle))

(BufferedPortBottle-open p "/chicken")

(define top 100)
(do ((i 1 (+ i 1)))
    ((> i top) #f) ; return #f at the end
  (let ((bottle (BufferedPortBottle-prepare p)))
    (Bottle-clear bottle)
    (Bottle-addString bottle "count")
    (Bottle-addInt bottle i)
    (Bottle-addString bottle "of")
    (Bottle-addInt bottle top)
    (display "Sending ")
    (display (Bottle-toString bottle))
    (newline)
    (BufferedPortBottle-write p)
    (Time-delay 0.5)))

(Network-fini)

⌨️ 快捷键说明

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