补全:取返回类型
(每道题开头都有同一段:函数类型写作 "(int,str)->bool";fun_type(params, ret) 拼函数类型、ret_of(ft) 取返回类型、call_type(ft, args) 按实参类型列表调用、个数类型都对才回返回类型否则 "ERR"。)
补全 ret_of(ft):从 "(int,str)->bool" 取出 "bool"。
(每道题开头都有同一段:函数类型写作 "(int,str)->bool";fun_type(params, ret) 拼函数类型、ret_of(ft) 取返回类型、call_type(ft, args) 按实参类型列表调用、个数类型都对才回返回类型否则 "ERR"。)
补全 ret_of(ft):从 "(int,str)->bool" 取出 "bool"。
全部评论