rebol中的do函数似乎接受无限制的参数。我可以使用自己的函数(不使用参数块)吗?
答案 0 :(得分:4)
无法定义具有可变数量参数的函数。此Rebol邮件列表主题http://www.rebol.org/ml-display-thread.r?m=rmlDTXB中的最后一条消息有解释。
do函数也只接受一个参数:
>> ? do
USAGE:
DO value /args arg /next
DESCRIPTION:
Evaluates a block, file, URL, function, word, or any other value.
DO is a native value.
ARGUMENTS:
value -- Normally a file name, URL, or block (Type: any)
REFINEMENTS:
/args -- If value is a script, this will set its system/script/args
arg -- Args passed to a script. Normally a string. (Type: any)
/next -- Do next expression only. Return block with result and new position.
答案 1 :(得分:2)