Another way to do it is this:
function countOccurrences pString
repeat for each item tItem in pString
add 1 to tFrequencyArray[tItem]
end repeat
return tFrequencyArray
end countOccurrences
To get the number of 2’s, just extract tFrequencyArray[2] etc.
The advantage is that you
Very clever, Mike. I never thought to use itemDelimiter this way. I’ll have to
play with this.
Thanks very much,
Roger
> On May 23, 2024, at 7:37 PM, Mike Kerner via use-livecode
> wrote:
>
> just spitballing:
> let's call our containers "tSearchingFor" and "tSearchString"
>
> *set* the ite
Probably not the shortest approach, but I’d probably do either this…
function countItemRepsInList pList, pItem
replace comma with cr in pList
filter pList with pItem
return (the number of lines in pList)
end countItemRepsInList
or this
function countItemRepsInList pList, pItem
put 0
just spitballing:
let's call our containers "tSearchingFor" and "tSearchString"
*set* the itemDelimiter to comma & tSearchString & comma
*put* the number of items in tSearchingFor - 1 into tNum
*if* tSearchString begins with tSearchingFor & comma *then* *add* 1 to tNum
*if* tSearchString ends w
Hi all,
Please, what’s the easiest way to return the total number of a given repeated
number in a list of numbers? IOW, how many times is 2 repeated in a list
containing 1,2,3,2,4,2,5,2,8 etc. Appreciate your help.
Thanks,
Roger
___
use-livecode ma
Yikes, I agree this is really not a good turn. I usually see this stuff on
stuff marketed to high end firms where price is not much of a factor.
Having been an evangelist for Livecode thru all its evolution all the way back
to MetaCard days (over three decades), I’m afraid I will not be pointing
Pricing still seems to be available for Student and Educational plans:
For example, at https://livecode.com/education-plans/ under the "Buy a
LiveCode Subscription" there is a link for "View Pricing Options"
(https://livecode.com/education-plans/#pricingoptions)
It is just Pros & Business the
Hello all,
This is a temporary change to the website while we transition a few things.
Pricing will be restored on the site in due course. Please bear with us.
Best Regards,
Heather
Heather Laine
Customer Services Manager
LiveCode Ltd
www.livecode.com
> On 23 May 2024, at 16:29, matthias re
I agree. I have a long standing issue with companies that want me to give them
email, phone and sometimes address in order to get a quote. In the case of your
friend, he doesn’t know the company, and does not know he can trust them. How
can he tell, he may just end up on a thousand other mailing
Hi,
today I wanted to show a friend, who is interested in using Livecode, the
different subscription plans and their prices.
But to my surprise, prices are no longer displayed on the website. The
interested customers have to request a quote.
I am not sure what to think about this. Was this an
10 matches
Mail list logo