《通链参考手册》


Special Operator GO

●语法设定:

go tag =>|

●参数和值:

tag---a go tag.

●详情:

go transfers control to the point in the body of an enclosing tagbody form labeled by a tag eql to tag. If there is no such tag in the body, the bodies of lexically containing tagbody forms (if any) are examined as well. If several tags are eql to tag, control is transferred to whichever matching tag is contained in the innermost tagbody form that contains the go. The consequences are undefined if there is no matching tag lexically visible to the point of the go.

The transfer of control initiated by go is performed as described in Section 5.2 (Transfer of Control to an Exit Point).

●例子:

 (tagbody
   (setq val 2)
   (go lp)
   (incf val 3)
   lp (incf val 4)) =>  NIL
 val =>  6 

The following is in error because there is a normal exit of the tagbody before the go is executed.

 (let ((a nil)) 
   (tagbody t (setq a #'(lambda () (go t))))
   (funcall a))

The following is in error because the tagbody is passed over before the go form is executed.

 (funcall (block nil
            (tagbody a (return #'(lambda () (go a))))))

●受制于: 无。

●例外情况: 无。

●更多信息:

tagbody

●说明: 无。


X3J13设计清单非标准部分,可查下面章节:


◇首页 § ◎章节目录 § □内容索引 § ○符号索引 § △术语表 § ※设计草案