REBOL3 tracker
  0.9.12 beta
Ticket #0000904 User: anonymous

Project:



rss
TypeBug Statusdismissed Date10-Jun-2009 11:22
Versionalpha 56 Categoryn/a Submitted bySunanda
PlatformAll Severitynot a bug Prioritynormal

Summary do exit and quit: inconsistent behavior
Description I am seeing inconsistent behavior:

do "exit" ;; unset!
do [exit] ;; error!

do "quit" ;; none
do [quit] ;; exits interpretor
Example code
do "exit" 
do [exit] 

do "quit"
do [quit] 

Assigned ton/a Fixed in- Last Update10-Jun-2009 18:07


Comments
(0000924)
BrianH
10-Jun-2009 18:06

That's OK, the differences are intended. Strings, files and URL's are scripts - blocks are code. Scripts do more than just executing the code: creating the script header, making modules, etc. One of those things is that they are evaluated in a slightly more secure manner, so EXIT, RETURN, QUIT and HALT are caught. It's a feature :)

Though see #539 for the problem that caused RETURN and EXIT to be added to that list. Even though it may be a good idea to catch RETURN and EXIT in this case, we have no choice at the moment to do otherwise.

Date User Field Action Change
2-Nov-2010 22:23 BrianH Comment : 0000924 Modified -
10-Jun-2009 18:07 BrianH Description Modified -
10-Jun-2009 18:07 BrianH Code Modified -
10-Jun-2009 18:07 BrianH Severity Modified minor => not a bug
10-Jun-2009 18:07 BrianH Status Modified submitted => dismissed
10-Jun-2009 18:06 BrianH Comment : 0000924 Added -
10-Jun-2009 11:22 sunanda Ticket Added -