Article Preview
Buy Now
COLUMN
Sets and Zips
Trying out Xojo 2023r3's new features
Issue: 21.6 (November/December 2023)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 19,333
Starting Page Number: 67
Article Number: 21606
Resource File(s):
project21606.zip Updated: 2023-10-31 23:51:23
Related Web Link(s):
http://www.xdevmag.com/browse/18.5/18506/
http://www.xdevmag.com/browse/21.2/21204/
http://www.tempel.org/rb/
Excerpt of article text...
I love how Xojo is regularly adding new language features. Two I hadn't expected in the latest update are support for
setsandZiparchive files. I thought today I'd explore both of those.Sets
I wrote about Sets in the past (see
xDev 18.5,http://www.xdevmag.com/browse/18.5/18506/), using a customSetClassclass I wrote. But now with Xojo 2023r3,Setsare a standard part of the language. How does it compare?Most importantly, note that my
SetClasswas limited to strings and only had a few functions. Xojo's implementation is far more powerful, usingvariantsas its datatype so you can store just about anything into aset.There are more comparison commands, too, such as
complementanddifferences, in addition to the standardunionandintersection.There are also many more routines for getting data into and out of
setobjects. For example, you can use aset'sfromDictionarymethod to bring in all the keys from adictionaryas items into thatset. Likewise, there's atoDictionarycommand that exports thesetitems into adictionary.
...End of Excerpt. Please purchase the magazine to read the full article.







