forked from rebolsource/r3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SWITCH uses EQUAL?+STRICT-EQUAL?, more...
After adding functionality to make datatypes compare EQUAL? to the word for their type symbol, this drew attention to the fact that switch was not using EQUAL? or STRICT-EQUAL? comparison. It also did not have a /CASE refinement. This started as a rewrite of switch to handle those issues, adding /STRICT. So long as switch was being updated in terms of its comparison, the code was easy enough to put a couple of other differences in These behaviors can be disabled with legacy switches, and permit the evaluation of GET-WORD!, GET-PATH!, and PAREN!. Another setting controls the ability to have the switch value "fall out" the bottom if there is no block to catch it. This can be an alternate way to express a default. (Previously such cases would just be a No-Op and return NONE! as the result, which was not very useful.)
- Loading branch information
1 parent
3db9d64
commit 46c1d1f
Showing
4 changed files
with
133 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters