Skip to content

Conversation

@Affonso-Gui
Copy link
Member

Apparently it can be difficult to know when you can return and when you must use return-from, and in the latter case which blocks are available to be returned from.

I'm not sure if we have demand for this, but I added a sys:list-all-blocks so am sending a PR.

1.eus$ (sys:list-all-blocks)
nil
2.eus$ (block test (sys:list-all-blocks))
(test)
3.eus$ (defun foo () (sys:list-all-blocks))
foo
4.eus$ (foo)
(foo)
5.eus$ (while t (return (sys:list-all-blocks) ))
(nil)
6.eus$ (defclass guiga)
guiga
7.eus$ (defmethod guiga (:foo () (sys:list-all-blocks)))
guiga
8.eus$ (send (instance guiga) :foo)
(:foo)
9.eus$ (block test1 (block test2 (block test3 (sys:list-all-blocks))))
(test3 test2 test1)

@koga-yu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant