SWITCH Function Changed SWITCH function is now native, and adds two important features: 1) evaluates the first block found after the switch case value, 2) adds the /all refinement to evaluate all matching cases. See example section below.
SWITCH Discussion
Here are examples to show the new SWITCH behavior:
>> val: 'a
>> switch val [a b [print 'xx] c [print 'yy] d]
xx
>> val: 'b
>> switch val [a b [print 'xx] c [print 'yy] d]
xx
>> val: 'c
>> switch val [a b [print 'xx] c [print 'yy] d]
yy
>> switch val [a b c [print 'xx] c [print 'yy] d]
xx
>> switch/all val [a b c [print 'xx] c [print 'yy] d]
xx
yy
>> val: 'd
>> switch val [a b [print 'xx] c [print 'yy] d]
== none
>> switch/default val [a b [print 'xx] c [print 'yy] d] [print 'zz]
zz
>> val: 'e
>> switch val [a b [print 'xx] c [print 'yy] d]
== none
>> switch/default val [a b [print 'xx] c [print 'yy] d] [print 'zz]
zz
RAMBO
These changes were made:
#4148, #4147, #4139:
fixed the bugs in the IMAP protocol handler; added support for servers with a hierarchy delimiter different from "/": added port/locals/hierarchy-delimiter (none until the server is queried for the hierarchy delimiter - any LIST query that produces results will set it), no longer assumes "*" as mailbox name when doing a LIST and no name is provided (this allows doing a LIST "" "" query, that results in the hierarchy delimiter in port/locals/hierarchy-delimiter), LIST will now return a block of strings instead of a block of files (file! would be confusing if the hierarchy delimiter is not "/"). (not tested) (may break old code)
#3861:
center-face now defaults to centering relative to the face's parent face, and the help strings are made clearer.
#3477:
TAB and shift-TAB reveals hidden field: fixed.
#4172:
decimal type not set in grow-facets VID func: fixed the typo.
#4143:
new SWITCH function, also added /ALL refinement; rest of mezz code has been updated to take advantage of it. (may break old code)
#3868, #4108:
implemented better ESMTP support. (not tested)
Thanks
Thank you Gabriele Santilli for writing/collecting and supervising the above changes.