[VER] v0.3.6-alpha
[Feat] 增加控制台在线安装器 ! [Impl] 修改ExampleCodes的一些实现,使用最新库 std.io
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import std.io;
|
||||
|
||||
func fib(x:Int) -> Int
|
||||
{
|
||||
if (x <= 1)
|
||||
@@ -8,4 +10,4 @@ func fib(x:Int) -> Int
|
||||
}
|
||||
|
||||
var result := fib(25);
|
||||
__fstdout_println("result: ", result);
|
||||
io.println("result: ", result);
|
||||
@@ -1,3 +1,6 @@
|
||||
import std.io;
|
||||
import std.value;
|
||||
|
||||
var callCnt:Int = 0;
|
||||
func fib(x:Int) -> Int
|
||||
{
|
||||
@@ -10,15 +13,15 @@ func fib(x:Int) -> Int
|
||||
}
|
||||
|
||||
var fibx:Int;
|
||||
__fstdout_print("input an index of fib ");
|
||||
fibx = __fvalue_int_parse(__fstdin_read());
|
||||
io.print("input an index of fib ");
|
||||
fibx = value.int_parse(io.read());
|
||||
|
||||
var cnt:Int = 0;
|
||||
__fstdout_println("test forever");
|
||||
io.println("test forever");
|
||||
while (true)
|
||||
{
|
||||
cnt = cnt + 1;
|
||||
__fstdout_println("test ", cnt,",result: ", fib(fibx));
|
||||
__fstdout_println("func `fib` called ", callCnt);
|
||||
io.println("test ", cnt,",result: ", fib(fibx));
|
||||
io.println("func `fib` called ", callCnt);
|
||||
callCnt = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user