【发布时间】:2009-10-11 16:13:13
【问题描述】:
为什么我必须使用 switch 将 typeof 转换为 string 才能使其工作?
这不起作用:
typeof: type? get 'optional
switch typeof [
word! [
print "word"
]
string! [
print "string"
]
]
这行得通:
typeof: type? get 'optional
switch to-string typeof [
"word" [
print "word"
]
"string" [
print "string"
]
]
【问题讨论】:
-
REBOL 是一种简单的语言,但与 Carl Sassenrath 的断言相反,它不一定是一种简单的语言。 :) 简单!= 简单。
-
那么让我们说它是一种优雅的语言:)
标签: rebol