[VER] v0.3.6-alpha
Some checks failed
Release Build / build-linux-x64 (push) Failing after 26s
Release Build / build-windows-x64 (push) Failing after 34s

[Feat] 增加控制台在线安装器 !
[Impl] 修改ExampleCodes的一些实现,使用最新库 std.io
This commit is contained in:
2026-01-04 00:51:11 +08:00
parent 893eb1050f
commit c93840af5f
10 changed files with 223 additions and 14 deletions

View File

@@ -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);

View File

@@ -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;
}