标签: sml
if (1=1) then print "sdfsdfs" and print "sdfsdfsdfsdf" else print "sdfsdf";
这会出错。如果条件匹配,我想做两件事。我怎么能这样做?
答案 0 :(得分:2)
将命令括号并用分号分隔:
if 1=1 then (print "sdfsdfs"; print "sdfsdfsdfsdf") else print "sdfsdf"