public
Description: ioke is a new language for the JVM, based on Io and other languages.
Homepage: http://ioke.org
Clone URL: git://github.com/olabini/ioke.git
ioke / examples / chinese / account.ik
100644 23 lines (17 sloc) 0.455 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use("mandarin")
 
帐户 = 本 摹拟 做(
  转移 = 法(数量, 自: 自我, 至:,
    自 平衡 -= 数量
    至 平衡 += 数量
  )
 
  打印 = 法(
    "<帐户 名字: #{名字} 平衡: #{平衡}>" 打印行
  )
)
 
箫 = 帐户 带有(名字: "箫", 平衡: 142.0)
俊 = 帐户 带有(名字: "俊", 平衡: 45.7)
 
帐户 转移(23.0, 自: 俊, 至: 箫)
帐户 转移(10.0, 至: 俊, 自: 箫)
俊 转移(57.4, 至: 箫)
 
箫 打印
俊 打印