📄 tst019.mal
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -