Extract a element of a tuple

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
problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Extract a element of a tuple

Post by problème » Mon Oct 26, 2015 4:41 am

Hello,
I want to know how to extract the first number of this result

Code: Select all

put the mouseLoc
for exemple this code print: X,Y
i want to extract X

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: Extract a element of a tuple

Post by ClipArtGuy » Mon Oct 26, 2015 4:45 am

Check out "mouseh" and "mousev" in the dictionary. :wink:

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Extract a element of a tuple

Post by dunbarx » Mon Oct 26, 2015 5:49 am

What clipArtGuy said.

Also know that there are usually many properties that LC contains in its vocabulary that might do what you need, or more, or a little different.

Like "item 1 of the mouseLoc". I only mention this, using "mouseLoc" itself, because you did. You might say, but in any case certainly need to know, that "the mouseLoc" is a 2-tuple, and therefore might lend itself to deconstruction.

Craig Newman

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Extract a element of a tuple

Post by Klaus » Mon Oct 26, 2015 1:00 pm

Bonjour problème,

1. welcome to the forum! :D

2. Please check these stacks to learn more about the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Re: Extract a element of a tuple

Post by problème » Mon Oct 26, 2015 3:02 pm

thanks for the help

Post Reply