eerm... yes we can.
Bob
On Dec 13, 2011, at 2:20 PM, Mark Wieder wrote:
> in the same
> way that we can't just say "add 1 to x"
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage yo
Richard-
Tuesday, December 13, 2011, 1:48:56 PM, you wrote:
> There are others, and they wind up consuming a fair amount of time when
> I'm teaching someone LiveCode for the first time.
> Exceptions require memorization, and with a language this broad it can
> helpful to keep the rule set as sma
Mark Wieder wrote:
Richard-
Good points all. I'm not requesting that the sort command be smart
enough to handle all situations, but this is enough of a confusing
point that I think the engine could benefit from some extra smarts. A
simple parsing optimization for cases like
sort tVar by length
Richard-
Good points all. I'm not requesting that the sort command be smart
enough to handle all situations, but this is enough of a confusing
point that I think the engine could benefit from some extra smarts. A
simple parsing optimization for cases like
sort tVar by length(each)
could insert t
stephen-
Tuesday, December 13, 2011, 11:32:30 AM, you wrote:
> A downside with plain english style programming code methods is that this
> can lead to uncontrolled bouts of alliteration, pun-making and double
> entendre. Basic and COBOL people don't talk that way.
CONTINUE.
--
-Mark Wieder
mw
Pete-
Tuesday, December 13, 2011, 10:05:05 AM, you wrote:
> I think Mark's point is specifically to do with the length function which
> can only return a numeric value. The suggestion is that the sort command
> should be smart enough to know that and automatically use a numeric sort
> (unless ov
A downside with plain english style programming code methods is that this
can lead to uncontrolled bouts of alliteration, pun-making and double
entendre. Basic and COBOL people don't talk that way.
On 13 December 2011 10:45, Pete wrote:
> Nice! I wish that had been a conscious play on words.
>
Colin-
Tuesday, December 13, 2011, 10:04:50 AM, you wrote:
> How did you sort those lines, before reading between them?
Note to self: file enhancement request for
sort between the lines of
--
-Mark Wieder
mwie...@ahsoftware.net
___
use-livecode
Nice! I wish that had been a conscious play on words.
On Tue, Dec 13, 2011 at 10:04 AM, Colin Holgate wrote:
> How did you sort those lines, before reading between them?
>
>
> On Dec 13, 2011, at 12:29 PM, Pete wrote:
>
> > Looks like your bug report got changed to an enhancement request with n
You have to read between them to know how not to sort.
Bob
On Dec 13, 2011, at 10:04 AM, Colin Holgate wrote:
> How did you sort those lines, before reading between them?
>
>
> On Dec 13, 2011, at 12:29 PM, Pete wrote:
>
>> Looks like your bug report got changed to an enhancement request wit
I think Mark's point is specifically to do with the length function which
can only return a numeric value. The suggestion is that the sort command
should be smart enough to know that and automatically use a numeric sort
(unless overridden) since it's not possible for text data to be produced.
I a
How did you sort those lines, before reading between them?
On Dec 13, 2011, at 12:29 PM, Pete wrote:
> Looks like your bug report got changed to an enhancement request with not
> much chance of happening (reading between the lines).
___
use-livecode m
Mark Wieder wrote:
I'm sort of OK with it because there's a simple way to get the desired
answer. But I filed bug 9910 requesting the simplified syntax with
"numeric" being optional.
Respectfully, I think it may be asking a bit much of the engine - and
perhaps the scripter - to expect the eng
Hi Mark,
Looks like your bug report got changed to an enhancement request with not
much chance of happening (reading between the lines).
On Mon, Dec 12, 2011 at 6:10 PM, Mark Wieder wrote:
> Craig-
>
> Monday, December 12, 2011, 5:18:26 PM, you wrote:
>
> > I'm OK with it.
>
> I'm sort of OK wit
I went to bed thinking about this. Think about what would have to happen for
Livecode to conclude this needed to be a numeric sort: It would have to
evaluate every line in the sort, and if it found just one line that was not a
number, it would have to then use a text sort. What if the list was 1
? I can't really think of a "natural" way, can
you?
Craig
-Original Message-
From: Mark Wieder
To: How to use LiveCode
Sent: Mon, Dec 12, 2011 4:12 pm
Subject: Re: sort by length of line (Weird)
Craig-
Monday, December 12, 2011, 5:18:26 PM, you wrote:
> I'm
Craig-
Monday, December 12, 2011, 5:18:26 PM, you wrote:
> I'm OK with it.
I'm sort of OK with it because there's a simple way to get the desired
answer. But I filed bug 9910 requesting the simplified syntax with
"numeric" being optional.
--
-Mark Wieder
mwie...@ahsoftware.net
_
Bob-
Monday, December 12, 2011, 3:56:31 PM, you wrote:
> It is doing just that, only it's doing a text sort of the numbers:
> 1
> 10
> 100
> 11
> 12
> etc.
Yes, and that's just wrong. I can think of no problem for which that
is the solution.
--
-Mark Wieder
mwie...@ahsoftware.net
__
Original Message-
From: Bob Sneidar
To: How to use LiveCode
Sent: Mon, Dec 12, 2011 1:58 pm
Subject: Re: sort by length of line (Weird)
It is doing just that, only it's doing a text sort of the numbers:
1
10
100
11
12
etc.
He wants a NUMERIC sort of the numbers. Hence sort myVar
It is doing just that, only it's doing a text sort of the numbers:
1
10
100
11
12
etc.
He wants a NUMERIC sort of the numbers. Hence sort myVar numeric by the length
of each
Bob
On Dec 12, 2011, at 11:56 AM, Mark Wieder wrote:
> OK - that's just weird. I see what's going on, but what I'd expect
On Dec 12, 2011, at 1:56 PM, Mark Wieder wrote:
> OK - that's just weird. I see what's going on, but what I'd expect is what (I
> think) Craig expects - that I'd get a list of the strings sorted by their
> character lengths.
>
> Is there *any* use case in which you'd want strings sorted by the a
ec 12, 2011 9:59 am
Subject: Re: sort by length of line (Weird)
OK - that's just weird. I see what's going on, but what I'd expect is what (I
think) Craig expects - that I'd get a list of the strings sorted by their
character lengths.
Is there *any* use case in which you
Well, well.
I never would have thought it was doing that, though I get it.
Thanks all.
-Original Message-
From: Ken Ray
To: How to use LiveCode
Sent: Mon, Dec 12, 2011 8:08 am
Subject: Re: sort by length of line (Weird)
On Dec 12, 2011, at 11:09 AM, Mark Schonewille wrote
OK - that's just weird. I see what's going on, but what I'd expect is what (I
think) Craig expects - that I'd get a list of the strings sorted by their
character lengths.
Is there *any* use case in which you'd want strings sorted by the alphabetic
representations of their lengths? I can't think of
I figured it out, and it's a funny little issue! It is doing the sort
correctly, but is evaluating the length of the words in an alphabetic way. The
10 letter words are alphabetically shorter than the 9 letter words, because
"10" comes before "9".
You can solve it like this:
sort fld 2 numeric
Which is a also a great (and fastest) way to get the max width of text in a
column.
get fld "B"
sort lines of it numeric *descending* by number of characters of each
put number of characters in line 1 of it into tWidest_Word_Width
don't you just love BINARY??
On 12 December 2011 09:09, Mark S
On Dec 12, 2011, at 11:09 AM, Mark Schonewille wrote:
> Try numeric.
Right - Here's an explanation: when you sort by length, what gets sorted is the
actual *numbers* themselves, so unless you tell LC to "sort numeric", you'll
get things in this order:
1
10
11
2
3
4
(etc.).
With your data, it
Try numeric.
--
Kind regards,
Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com
Share the clipboard of your computer over a local network with Clipboard Link
http://clipboardlink.economy-x-talk.com
Op 12 dec. 2011 om 17:55 heeft dunb...@aol.com het volgende geschreven:
> Hmmm.
>
>
-Original Message-
From: Mark Schonewille
To: How to use LiveCode
Sent: Sun, Dec 11, 2011 6:54 pm
Subject: Re: sort by length of line
Hi Craig,
sort lines of myList by length(each)
sort lines of myList by the length of each
sort lines of myList by number of chars of each
"Eac
Hi Craig,
sort lines of myList by length(each)
sort lines of myList by the length of each
sort lines of myList by number of chars of each
"Each" is simply the element that's currently being sorted, as if you put a
repeat loop into one line of syntax.
--
Best regards,
Mark Schonewille
Economy-
On Dec 11, 2011, at 9:04 PM,
wrote:
>
> I can do this the long way, but is there a clever sortkey that will sort
> lines by the length of those lines?
>
> In other words, if I have a variable myVar with:
>
> aaa
> xxx
>
>
> I want to write something like:
>
> sort myVar by the len
Sorry, should have made a new thread.
I can do this the long way, but is there a clever sortkey that will sort lines
by the length of those lines?
In other words, if I have a variable myVar with:
aaa
xxx
I want to write something like:
sort myVar by the length of each
to
32 matches
Mail list logo