tst019.mal

来自「一个内存数据库的源代码这是服务器端还有客户端」· MAL 代码 · 共 45 行

MAL
45
字号
function welcome(lim:int):void;    i:= 2;    w:="hello";    return w;   # should produce a type errorend welcome;function welcome0(lim:int):str;    i:= 2;    w:="hello";    return (w,i);   # should produce a type errorend welcome0;function welcome1(lim:int):str;    i:= 2;    return w:="hello"; end welcome1;function welcome2(lim:int):str;    i:= 2;    w:="hello";     return w;end welcome2;function welcome3(lim:int)(w:str,i:int);    i:= 2;    return w:="hello"; #illegal return statementend welcome3;function welcome4(lim:int)(w:str,i:int);    i:= 2;    return (w,i):="hello"; #illegal return statementend welcome4;function welcome5(lim:int)(:str,:int);    i:= 2;    return (w,i):=("hello",2); end welcome5;y:= user.welcome1(1);io.print(y);y:= user.welcome2(1);io.print(y);(x,y):= user.welcome2(1);

⌨️ 快捷键说明

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