Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 18.5 ('OOP Listbox')
Instant purchase and download via GumRoad!

COLUMN

SetClass

Manipulating sets of strings

Issue: 18.5 (September/October 2020)
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): 13,868
Starting Page Number: 90
Article Number: 18506
Resource File(s):

Download Icon project18506.zip Updated: 2020-08-31 22:37:40

Related Link(s): None

Excerpt of article text...

Recently I received an email from "Paul," who had a question about working with sets. In part he wrote:

Let's say I'm looking for five-character words from a list of five-character words with the condition that each of the five letters are restricted to their own set of candidate letters. So the first letter could only be a T, R, P, or M. The second letter could only be a R, K, P, or B, etc. Any words selected from the list would satisfy the condition that the letter in each position of the word is contained in the set of letters for that position.

This requires the ability to create a set of letters or numbers and later be able to add or subtract from that set. Then determine if a "candidate" matches the letters/numbers in the set.

I can see doing this with arrays but I wondered if there were "set functions" that would be more efficient in creating/editing the sets and making comparisons. Like the next step would be to compare two sets and return only select letters/numbers common to both sets.

...End of Excerpt. Please purchase the magazine to read the full article.