小编TBK*_*TBK的帖子

SML How to check variable type?

Is there any way to check/test the type of a variable?

I want to use it like this:

if x = int then foo
else if x = real then bar
else if x = string then ...
     else .....
Run Code Online (Sandbox Code Playgroud)

sml

10
推荐指数
2
解决办法
8735
查看次数

标签 统计

sml ×1