Io 学习(1)

1.安装io解释器

从http://iolanguage.org/下载binaries,解压后运行.exe

运行io.exe,发现缺少libgcc_s_dw2-1.dll,google之,从http://www.dll-files.com/dllindex/dll-files.shtml?libgcc_s_dw2-1 找到下载,放到和io.exe一个文件夹下,之后就顺利运行Io解释器了。


2.从文件运行Io程序

google, run io from file 后,找到http://en.wikibooks.org/wiki/Io_Programming 以下内容,If you want to write code to be reused, simply put it in a text file and run it withio <filename>, where <filename> is the name of the file you use.

新建文件run_from_file.io,键入以下代码:

x := 1
y := 2
writeln("x is ", x)
writeln("y is ", y)
x = x + y
writeln("x + y = ", x)

控制台下键入:io run_from_file.io

显示:

x is 1

y is 2

x + y = 3


notice: If you noticed, I used a .io file extension. This is in no way mandated, it is merely a convention. Something happened differently this time then when we did it from a file, if you noticed. Unlike before, we didn't see what each function returned. Instead, we only saw what was explicitly output bywrite.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值