Help with splitting variable

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
CalumS
Posts: 9
Joined: Thu Feb 07, 2019 10:31 pm

Help with splitting variable

Post by CalumS » Fri Feb 08, 2019 12:27 am

Sorry again, I have a set of data that is:
Aberaeron - Harbour (Fourth Groyne North)

How could I make it so if any set of data has over one word that it only shows that one word in my variable.
For example, Aberaeron - Harbour (Fourth Groyne North) would ideally be Aberaeron.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Help with splitting variable

Post by bogs » Fri Feb 08, 2019 10:53 am

Hello CalumS,
While we don't mind helping to un-stick people from problems, we also don't do people's homework assignments for them in general.

The problem your listing here is the same type of problem you listed earlier, you need part of a line of words.

We have already discussed the itemDelimiter and that it can be changed. Aside from that, though, Livecode supports typing at the character, word, chunk, and many more levels.

Crack open either the user guide or dictionary and type in any of the above terms, or even just 'text' , and come back with specific questions that are not your homework assignment :)
Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9661
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Help with splitting variable

Post by dunbarx » Fri Feb 08, 2019 2:38 pm

What Bogs said.

It takes a little while to integrate the basics of LiveCode so that you can use basic tools to do some real work. What Bogs mentioned, and what he implied you need to learn, is that you can isolate virtually any part of a body of text. LiveCode calls that "chunking".

A word is a chunk. So is a character. Word 1 of a line of text is a chunk. Write back with your homework.

Craig Newman

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”