problem with counting words

2014-10-17 Thread Peter M. Brigham
Continuing the extension of itemdelimiter…. Now Richard's original nDepth() function can be expanded by using getItem(), so you can get nested "items" with different "itemdelimiters" (any or all of which may be text strings instead of single characters). I renamed Richard's function to something

Re: problem with counting words

2014-10-17 Thread Peter M. Brigham
Re extending the itemdelimiter keyword... The handler I posted for getItem() is easily modified to allow the itemdel to consist of a string of characters, so you could do: getItem("a//b//c//d//e//f",4,"//") -> d So while we're waiting for the language to be expanded, you could use this: func

Re: problem with counting words

2014-10-17 Thread Peter M. Brigham
On Oct 15, 2014, at 11:13 PM, Richard Gaskin wrote: > Peter M. Brigham wrote: > .. > > and you don't risk forgetting to reset the itemDelim, which I > > often forget to do, especially in repeat loops…. > > As a discrete function it should be okay, since unlike SuperCard in LiveCode > the itemdel

Re: problem with counting words

2014-10-16 Thread Richard Gaskin
Dick Kriesel wrote: On Oct 14, 2014, at 12:45 PM, Richard Gaskin wrote: on mouseUp put 1000 into n put "aaa,bbb,ccc#ddd#eee#fff,ggg,hhh" into tSomeData -- put the millisecs into t repeat n get nDepth(tSomeData, 3, comma, 2, "#" ) end repeat put the millisecs - t into t1 pu

Re: problem with counting words

2014-10-16 Thread Dick Kriesel
On Oct 14, 2014, at 12:45 PM, Richard Gaskin wrote: > on mouseUp > put 1000 into n > put "aaa,bbb,ccc#ddd#eee#fff,ggg,hhh" into tSomeData > -- > put the millisecs into t > repeat n > get nDepth(tSomeData, 3, comma, 2, "#" ) > end repeat > put the millisecs - t into t1 > put

Re: problem with counting words

2014-10-16 Thread Kay C Lan
On Wed, Oct 15, 2014 at 12:58 AM, Peter Haworth wrote: > > a=1,b=2,c=3 > > That's pretty basic and is easily handled by: replace comma with cr Then just work through the lines and the itemDelimiter to =. What I was thinking about was: "A","B","C","D" etc and being able to specify the chunkDe

Re: problem with counting words

2014-10-15 Thread Richard Gaskin
Peter M. Brigham wrote: .. > and you don't risk forgetting to reset the itemDelim, which I > often forget to do, especially in repeat loops…. As a discrete function it should be okay, since unlike SuperCard in LiveCode the itemdel is a local property. -- Richard Gaskin Fourth World LiveCode

Re: problem with counting words

2014-10-15 Thread Jerry Jensen
On Oct 15, 2014, at 7:18 PM, Peter M. Brigham wrote: > On Oct 14, 2014, at 3:45 PM, Richard Gaskin wrote: > >> function nDepth >> get param(1) >> repeat with i = 2 to paramCount() step 2 >> set the itemDel to param(i+1) >> get item param(i) of it >> end repeat >> return it >> end nDe

Re: problem with counting words

2014-10-15 Thread Peter M. Brigham
On Oct 14, 2014, at 3:45 PM, Richard Gaskin wrote: > function nDepth > get param(1) > repeat with i = 2 to paramCount() step 2 > set the itemDel to param(i+1) > get item param(i) of it > end repeat > return it > end nDepth Another one to add to my collection. Thanks, Richard! I

Re: problem with counting words

2014-10-15 Thread Peter M. Brigham
instead of just two. > > Craig > > -Original Message- > From: Richard Gaskin > To: use-livecode > Sent: Tue, Oct 14, 2014 3:46 pm > Subject: Re: problem with counting words > > FWIW, changing the itemdel takes only about 0.00012 ms on

Re: problem with counting words

2014-10-15 Thread Björnke von Gierke
There is no way to search the dictionary, but I have made a replacement for it, which can do full searches: http://bjoernke.com/bvgdocu/ As a side note I really wish "trueWord" would be named "humanWord" instead, it'd make the distinction to the historic "word" much more immediate comprehensibl

Re: problem with counting words

2014-10-14 Thread Bob Sneidar
Thanks Richard. Yet one more snippet of code in my utility button. That didn’t sound weird, did it? ;-) Bob S On Oct 14, 2014, at 12:45 , Richard Gaskin mailto:ambassa...@fourthworld.com>> wrote: FWIW, changing the itemdel takes only about 0.00012 ms on a relatively slow (2.16GHz) Mac, and a

Re: problem with counting words

2014-10-14 Thread Richard Gaskin
dunbarx wrote: Right, and I am sure you know this, but it was never particularly a speed issue,rather more a mental and organizational one, that would be even more opaque if you had, say a handful of nested delimiters instead of just two. The speed info I provided wasn't to show that it's fas

Re: problem with counting words

2014-10-14 Thread dunbarx
To: use-livecode Sent: Tue, Oct 14, 2014 3:46 pm Subject: Re: problem with counting words FWIW, changing the itemdel takes only about 0.00012 ms on a relatively slow (2.16GHz) Mac, and about a third as long (0.43 ms) on my custom Linux box (3.0 GHz). on mouseup put 10 into n

Re: problem with counting words

2014-10-14 Thread Richard Gaskin
FWIW, changing the itemdel takes only about 0.00012 ms on a relatively slow (2.16GHz) Mac, and about a third as long (0.43 ms) on my custom Linux box (3.0 GHz). on mouseup put 10 into n -- put the millisecs into t repeat n get 1+1 end repeat put the millisecs - t

Re: problem with counting words

2014-10-14 Thread dunbarx
, given tData: aaa,bbb,ccc#ddd#eee#fff,ggg,hhh get item 2 to 3 delimited by "#" of item 3 of tData would return: ddd#eee Craig -Original Message- From: Peter Haworth To: How to use LiveCode Sent: Tue, Oct 14, 2014 12:59 pm Subject: Re: problem with counting words

Re: problem with counting words

2014-10-14 Thread Peter Haworth
t; IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On > Behalf > Of Peter Haworth > Sent: Tuesday, October 14, 2014 11:32 AM > To: How to use LiveCode >

Re: problem with counting words

2014-10-14 Thread Bob Sneidar
That’s been fielded before in a post on this list. Some will only use the forum, others only the list. Still others only the digest. It’s a noble goal, and doomed to failure. :-) Bob S On Oct 14, 2014, at 09:33 , dunb...@aol.com wrote: > It seems to me that not all list members visit the foru

Re: problem with counting words

2014-10-14 Thread dunbarx
o use LiveCode' Sent: Tue, Oct 14, 2014 12:29 pm Subject: RE: problem with counting words That would be a great enhancement. +1 A collection of delimiters(item list?) would be needed to even emulate the current word chunk. Ralph DiMola IT Director Evergreen Information Services rdim...@evergre

RE: problem with counting words

2014-10-14 Thread Ralph DiMola
...@lists.runrev.com] On Behalf Of Peter Haworth Sent: Tuesday, October 14, 2014 11:32 AM To: How to use LiveCode Subject: Re: problem with counting words On Tue, Oct 14, 2014 at 12:45 AM, Kay C Lan wrote: > If you want something new... a chunk, then the ability to specify it's > delimiter as

Re: problem with counting words

2014-10-14 Thread Peter Haworth
On Tue, Oct 14, 2014 at 12:45 AM, Kay C Lan wrote: > If you want something new... a chunk, then the ability to specify it's > delimiter as a range of characters that are either single of combined > *could* be a valid enhancement. > Rather than try to explain the thinking behind "delimited by", I

Re: problem with counting words

2014-10-14 Thread Terence Heaford
get char 1 to 7 of word 9 of item x of line y of card field 1”. Al the best Terry On 14 Oct 2014, at 08:45, Kay C Lan wrote: > What is the point of a chunk or a word if it is only delimited by a single > character? It is identical to an item! ___ u

Re: problem with counting words

2014-10-14 Thread Kay C Lan
On Tue, Oct 14, 2014 at 2:03 AM, Peter Haworth wrote: > There's a qcc enhancement request out there for a new chunk type ("chunk") > along with a "delimited by" clause. > > On Mon, Oct 13, 2014 at 7:32 AM, Terence Heaford > > wrote: > > > set the wordDelim to space > > set the wordDelim to “*” >

Re: problem with counting words

2014-10-13 Thread Mark Wieder
Jacque- Monday, October 13, 2014, 2:35:12 PM, you wrote: > Ewww. That is either the best or worst thing I've seen today. Or both. I can't decide. -- -Mark Wieder ahsoftw...@gmail.com This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. T

RE: problem with counting words

2014-10-13 Thread Robert Brenstein
Not particularly challenging but a cool name: Maximilian Maria Thurn and Taxis On 13.10.2014 at 18:54 Uhr -0400 Ralph DiMola apparently wrote: This is something I know about. Between a pretty decent VB com .dll and additional in house rules I get about 95.98% accuracy splitting up US/internati

RE: problem with counting words

2014-10-13 Thread Ralph DiMola
nfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Bob Sneidar Sent: Monday, October 13, 2014 4:20 PM To: How to use LiveCode Subject: Re: problem with counting words Understandable. And yet the question is not how you are to inter

Re: problem with counting words

2014-10-13 Thread Sean Cole (Pi)
Too funny :) Sean Cole *Pi Digital Productions Ltd* www.pidigital.co.uk +44(1634)402193 +44(7702)116447 π 'Don't try to think outside the box. Just remember the truth: There is no box!' 'For then you realise it is not the box you are trying to look outside of, but it is yourself!' This email and

Re: problem with counting words

2014-10-13 Thread J. Landman Gay
On 10/13/2014, 2:11 PM, Colin Holgate wrote: To get to the other’s hide? On Oct 13, 2014, at 3:01 PM, Dave Kilroy wrote: ...now if only I can come up with a reason why the buffalo crossed the road... Ewww. That is either the best or worst thing I've seen today. -- Jacqueline Landman Gay

Re: problem with counting words

2014-10-13 Thread Bob Sneidar
Understandable. And yet the question is not how you are to interpret a word boundary, but how a computer which only knows ones and zeros can. It’s the (computer) age old problem: Computers don’t do what you want them to. They only do what you tell them to. ;-) A great example is how to discern

Re: problem with counting words

2014-10-13 Thread Colin Holgate
To get to the other’s hide? On Oct 13, 2014, at 3:01 PM, Dave Kilroy wrote: > ...now if only I can come up with a reason why the buffalo crossed the > road... ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscr

Re: problem with counting words

2014-10-13 Thread Dave Kilroy
or -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/problem-with-counting-words-tp4684441p4684506.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.r

Re: problem with counting words

2014-10-13 Thread Peter Haworth
There's a qcc enhancement request out there for a new chunk type ("chunk") along with a "delimited by" clause. For this example, it would be possible to put the number of chunks delimited by space of field "xyz" into tCount Pete lcSQL Software Home of lcStackBrowser

Re: problem with counting words

2014-10-13 Thread Colin Holgate
I get that joke! Wait, maybe I didn’t, my email program does Unicode… On Oct 13, 2014, at 1:07 PM, la...@significantplanet.org wrote: > Hi Richard, > in a word... > "I really enjoyed reading your post and I learned a lot!" ___ use-livecode mailing lis

Re: problem with counting words

2014-10-13 Thread larry
Hi Richard, in a word... "I really enjoyed reading your post and I learned a lot!" Larry - Original Message - From: "Richard Gaskin" To: Sent: Monday, October 13, 2014 9:03 AM Subject: Re: problem with counting words Good post, Kay. Each of the examples you p

Re: problem with counting words

2014-10-13 Thread Geoff Canyon
When the new language code becomes available I am going to write an extension just for you, Richard... gc > On Oct 13, 2014, at 11:03 AM, Richard Gaskin > wrote: > > I think most of us (except Geoff Canyon who has a rare mind for this sort of > stuff ) would agree that we're all glad this i

Re: problem with counting words

2014-10-13 Thread Richard Gaskin
Good post, Kay. Each of the examples you provided is among the reasons I like xTalk. But even though they demonstrate useful features of the language, neither is dependent on xTalk's trait of counting quoted text as a single word when using the word chunk type. Perhaps I should preface this

Re: problem with counting words

2014-10-13 Thread Terence Heaford
set the wordDelim to space set the wordDelim to “*” set the wordDelim to “any single character you want” Should be easy for the LiveCode programmers to deliver such a command. also put the wordDelim into myVar Initally set to space, resets to space at the end of a handler. All the best Terry

RE: problem with counting words

2014-10-13 Thread Ralph DiMola
<-Original Message- mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Mark Wieder >punctuation: commas, periods, semicolons, etc. > >I also find that text within quotes being a single word is congruent with defining arguments for comandline syntax. > >-- >-Mark Wieder > ahsoftw...

Re: problem with counting words

2014-10-13 Thread J. Landman Gay
And I suppose you had to throw them uphill, both ways. That must have been scary. Sort of a rocky horror show. On October 13, 2014 12:26:21 AM CDT, Mark Wieder wrote: >Jacque- > >Sunday, October 12, 2014, 8:43:34 PM, you wrote: > >> Absolutely. I keep a pile of rocks next to my desk. By the end

Re: problem with counting words

2014-10-12 Thread Mark Wieder
Jacque- Sunday, October 12, 2014, 8:43:34 PM, you wrote: > Absolutely. I keep a pile of rocks next to my desk. By the end of winter > I've usually run out, and there is too much snow to go get more, so then > I start throwing my husband. He has opinions about that. When I started out, all we had

Re: problem with counting words

2014-10-12 Thread dunbarx
Hi. You have plenty to think about. But maybe something more concrete will get you started. You are certainly game. Make two new stacks. They will be named "untitled 1" and "untitled 2". No matter. In stack "untitled 1" place a button. In its script put: on mouseUp start using stack "untit

Re: problem with counting words

2014-10-12 Thread Geoff Canyon
Here's a function to count the words disregarding quotes. Note that it's important to replace quotes with space, because there are three words in this is"three words" and there are three words in this isthree words but you want to count four words, which this will do: function wordsWit

Re: problem with counting words

2014-10-12 Thread Kay C Lan
On Mon, Oct 13, 2014 at 12:10 PM, Jerry Jensen wrote: > On Oct 12, 2014, at 9:03 PM, J. Landman Gay > wrote: > > > My motto is: Bytes be damned, let the engine handle it. > > > > I say right out loud that is totally appropriate for this millenium. > .Jerry > Yes, thankfully Bytes don't take up

Re: problem with counting words

2014-10-12 Thread Jerry Jensen
On Oct 12, 2014, at 9:03 PM, J. Landman Gay wrote: > On 10/12/2014, 10:42 PM, Jerry Jensen wrote: >> Jacque has a lovely talent for seeing simple solutions. I have an >> unfortunate obsession with saving bytes from ye olden days. > > Thank you, but I'm afraid any talent I have is due to total ob

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 10:42 PM, Jerry Jensen wrote: Jacque has a lovely talent for seeing simple solutions. I have an unfortunate obsession with saving bytes from ye olden days. Thank you, but I'm afraid any talent I have is due to total oblivion about such things. I'm a one-trick language pony, I do

Re: problem with counting words

2014-10-12 Thread Kay C Lan
On Mon, Oct 13, 2014 at 11:16 AM, J. Landman Gay wrote: One thing to mention though is that these custom solutions won't transfer > to stacks that are distributed to others > The other thing to remember is a plugin can't be edited as easily as any other stack. If Larry is just starting out makin

Re: problem with counting words

2014-10-12 Thread Jerry Jensen
On Oct 12, 2014, at 7:51 PM, J. Landman Gay wrote: > I think I'd just make a copy of the text in a variable, delete all the > quotes, and count the words. After you get the count, discard the variable. > You don't need to reconstruct it. Oh, how very sensible! I retract all my comments fumblin

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 10:23 PM, Mark Wieder wrote: larry- Sunday, October 12, 2014, 7:10:26 PM, you wrote: So I thank you and I will stop throwing rocks at my computer. LOL. Don't stop throwing rocks - it's an essential part of programming. Absolutely. I keep a pile of rocks next to my desk. By

Re: problem with counting words

2014-10-12 Thread Mark Wieder
larry- Sunday, October 12, 2014, 6:58:21 PM, you wrote: > You mention a library stack. I do not know how to make one or use one. Is > there some tutorial or something that will tell me how? Well, *do* followup on reading Richard Gaskin's writeup on the message path. But meanwhile try this... pu

Re: problem with counting words

2014-10-12 Thread Mark Wieder
larry- Sunday, October 12, 2014, 7:10:26 PM, you wrote: > So I thank you and I will stop throwing rocks at my computer. LOL. Don't stop throwing rocks - it's an essential part of programming. -- -Mark Wieder ahsoftw...@gmail.com This communication may be unlawfully collected and stored by th

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 9:29 PM, la...@significantplanet.org wrote: What I'm unclear about is, may I have multiple functions within, say, a card or stack script? In other words, if I have one script that contains 10 commands within it that could be called up, is that counted as 1 script or as 10 scripts?

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 10:04 PM, Peter M. Brigham wrote: You can create a plugin that opens invisibly when you start up LiveCode, and the plugin can contain a button with a script full of whatever functions and commands you want to have available. Then you can put this into the plugin stack script: on o

Re: problem with counting words

2014-10-12 Thread Peter M. Brigham
On Oct 12, 2014, at 10:51 PM, J. Landman Gay wrote: > A backscript is just a script you write that you can put into the message > path; it receives messages after everything else gets a shot at them. The > script can live in any object; buttons are common storage places. That's > probably what

Re: problem with counting words

2014-10-12 Thread Kay C Lan
Thanks, > Larry > > - Original Message - From: "Kay C Lan" > To: "How to use LiveCode" > Sent: Sunday, October 12, 2014 8:09 PM > > Subject: Re: problem with counting words > > > Open the User Guide (from the IDE Help Menu select 'User

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 7:42 PM, la...@significantplanet.org wrote: On the other hand, it is giving me fits having to go from regular quotes to curly quotes (for counting) and then back to regular quotes for display (since LC displays a curly quote as some oddball char). But if I could write my own funct

Re: problem with counting words

2014-10-12 Thread larry
ctober 12, 2014 8:09 PM Subject: Re: problem with counting words Open the User Guide (from the IDE Help Menu select 'User Guide' and type Library in your pdf viewer's search box. Chapter 5.8 'Extending the Message Path' should come up as the first hit. This also may be help

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 7:32 PM, Mark Wieder wrote: What I'd need to do in that case is say linecount "some file with spaces.txt" And then the operating system would treat everything within the quotes as a single parameter. Which is probably the same reason the HC team did it that way, because the ex

Re: problem with counting words

2014-10-12 Thread Robert Brenstein
On 12.10.2014 at 19:58 Uhr -0600 apparently wrote: Hi Robert, I understand what you wrote. That is not a problem for me. What I want is to be able to put my function into the LC IDE so that I can use it in other stacks. You mention a library stack. I do not know how to make one or use one. I

Re: problem with counting words

2014-10-12 Thread larry
y own functions that I can use right within any script of any stack. - Original Message - From: "Kay C Lan" To: "How to use LiveCode" Sent: Sunday, October 12, 2014 7:58 PM Subject: Re: problem with counting words On Mon, Oct 13, 2014 at 7:45 AM, Richard Gaskin wrote

Re: problem with counting words

2014-10-12 Thread Kay C Lan
ry stack. I do not know how to make one or use one. Is > there some tutorial or something that will tell me how? > Thanks, > Larry > > - Original Message - From: "Robert Brenstein" > To: "How to use LiveCode" > Sent: Sunday, October 12, 2014 7:15 PM

Re: problem with counting words

2014-10-12 Thread Kay C Lan
On Mon, Oct 13, 2014 at 9:58 AM, Kay C Lan wrote: > > sort lines of myListOfNames by word of -1 each > > sort lnes of myListOfNames by word -1 of each Hate it when I hit send and then immediately see an error in my typing. ___ use-livecode mailing l

Re: problem with counting words

2014-10-12 Thread Kay C Lan
On Mon, Oct 13, 2014 at 7:45 AM, Richard Gaskin wrote: > > I hear ya', but like so many other oddities in the language this one came > from Apple, > Sheer brilliance! One of the first analogies of HyperCard was that it was a an electronic rolodex. Here is a list of names: Abu MusabAl-Zarqaw

Re: problem with counting words

2014-10-12 Thread larry
how? Thanks, Larry - Original Message - From: "Robert Brenstein" To: "How to use LiveCode" Sent: Sunday, October 12, 2014 7:15 PM Subject: Re: problem with counting words Larry, Change the first line of your function to function commaInsert thisFigure B

Re: problem with counting words

2014-10-12 Thread Robert Brenstein
u know if that is possible in LC? As far as I know, it is not possible. Larry ----- Original Message - From: To: Sent: Sunday, October 12, 2014 4:53 PM Subject: Re: problem with counting words Larry. But you can make your own "dictionary". Without limit. Most of that, too,

Re: problem with counting words

2014-10-12 Thread larry
6:32 PM Subject: Re: problem with counting words larry- Sunday, October 12, 2014, 5:16:45 PM, you wrote: Hello Mark, It truly pleases me that you explained a reason for text within quotes being a single word. Glad I could help. I don't have enough experience (actually none) in defining

Re: problem with counting words

2014-10-12 Thread Mark Wieder
larry- Sunday, October 12, 2014, 5:16:45 PM, you wrote: > Hello Mark, > It truly pleases me that you explained a reason for text within quotes being > a single word. Glad I could help. > I don't have enough experience (actually none) in defining arguments for > commandline syntax and would neve

Re: problem with counting words

2014-10-12 Thread larry
- Original Message - From: "Mark Wieder" To: "How to use LiveCode" Sent: Sunday, October 12, 2014 6:00 PM Subject: Re: problem with counting words Terence- Sunday, October 12, 2014, 12:38:53 PM, you wrote: Wouldn’t it be good if RunRev could add WordDelimiter to

Re: problem with counting words

2014-10-12 Thread Mark Wieder
Terence- Sunday, October 12, 2014, 12:38:53 PM, you wrote: > Wouldn’t it be good if RunRev could add WordDelimiter to the > dictionary, would that solve the problem. > I believe it exists in SuperCard. > I thought LiveCode was a more modern version of SuperCard and would surely > have this opt

Re: problem with counting words

2014-10-12 Thread Richard Gaskin
larry wrote: > Here is the real problem. I don't know much. > I'm sitting here assuming that a word is a word, regardless of > whether it is inside quotes. > Now I find out there is trueword. It's just hard for me to reconcile > LiveCode's boast of "simple English" and stuff like this. I hear

Re: problem with counting words

2014-10-12 Thread larry
>adding of functions to the dictionary as in the two line example in italics >above. Do you know if that is possible in LC? As far as I know, it is not possible. Larry ----- Original Message - From: To: Sent: Sunday, October 12, 2014 4:53 PM Subject: Re: problem with countin

Re: problem with counting words

2014-10-12 Thread dunbarx
Larry. But you can make your own "dictionary". Without limit. Most of that, too, has been possible since Hypercard. You can define your own properties, commands and functions, and place them in permanent use in several ways, for example, as a library stack in use or a plug-in. Have you ever wr

Re: problem with counting words

2014-10-12 Thread Jerry Jensen
Not lame. Good question! I've always tried to get RID of curly-quotes, never tried to use them. So, I pasted one in from Word and found out using charToNum that its number 210. replace quote with numToChar(210) in field "foo" --do your counting replace numToChar(210) with quote in field "foo" A

Re: problem with counting words

2014-10-12 Thread larry
se LiveCode" Sent: Sunday, October 12, 2014 1:38 PM Subject: Re: problem with counting words Wouldn’t it be good if RunRev could add WordDelimiter to the dictionary, would that solve the problem. I believe it exists in SuperCard. I thought LiveCode was a more modern version of SuperCard

Re: problem with counting words

2014-10-12 Thread larry
Easy to say, but how does one replace the quotes with curly-quotes? I can't find out where it says how to do that. Sorry I'm so lame. Larry - Original Message - From: "Jerry Jensen" To: "How to use LiveCode" Sent: Sunday, October 12, 2014 1:26 PM Subj

Re: problem with counting words

2014-10-12 Thread Jerry Jensen
Yes, but the current concept of delimiting words is not a single character. Space, tab, return all work. Now, if you could say: set the wordDel to space or tab or return That would be the ticket! Or you could extend it using that pesky unicode definition and call it "trueword". H... On Oct 1

Re: problem with counting words

2014-10-12 Thread Terence Heaford
Wouldn’t it be good if RunRev could add WordDelimiter to the dictionary, would that solve the problem. I believe it exists in SuperCard. I thought LiveCode was a more modern version of SuperCard and would surely have this option. All the best Terry On 12 Oct 2014, at 20:20, Jerry Jensen wro

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 1:17 PM, la...@significantplanet.org wrote: btw, I spoke to a programmer friend of mine (who used to work for Novell) and he said he'd never heard anything like that in the several programming languages he knows. It's been in x-talk since HyperCard. BTW, the "trueword" token was

Re: problem with counting words

2014-10-12 Thread J. Landman Gay
On 10/12/2014, 1:56 PM, la...@significantplanet.org wrote: Please tell me where it says that in the dictionary - I could find nothing about it. Under the entry for "word": Designates a space-delimited or quoted string as part of a chunk expression. Note: Words are delimited by double quotes (

Re: problem with counting words

2014-10-12 Thread Jerry Jensen
Ah, and then there are tabs to deal with, and double-spaces will count an empty item between. It may be better to just replace the quotes with curly-quotes, count the words, and then replace the curly-quotes back to quotes if you want. On Oct 12, 2014, at 12:20 PM, Jerry Jensen wrote: > Hi Lar

Re: problem with counting words

2014-10-12 Thread Jerry Jensen
Hi Larry, the itemDel is the character that delimits ITEMS, not words. You could use it to get around your problem with quotes. If you set the itemDel to space, you would then look for the number of ITEMS in the field. Thats not quite the end of it though, because there may not be a space betwe

Re: problem with counting words

2014-10-12 Thread Mark Schonewille
"Larry", "From the "word" entry:" "Comments: A word is delimited by one or more spaces, tabs, or returns, or enclosed by double quotes. A single word can contain multiple characters and multiple items, but not multiple lines. Note: Words are delimited by double quotes ("), but not by curved

Re: problem with counting words

2014-10-12 Thread Colin Holgate
Here are some of the relevant parts from the Dictionary entry for ‘word’: Summary: Designates a space-delimited or quoted string as part of a chunk expression. Comments: A word is delimited by one or more spaces, tabs, or returns, or enclosed by double quotes. A single word can contain multiple

Re: problem with counting words

2014-10-12 Thread larry
w to use LiveCode" Sent: Sunday, October 12, 2014 12:36 PM Subject: Re: problem with counting words The dictionary clearly says that quoted strings are counted as a single word. If you wanted to work around that as an issue by using the itemDelimiter, you would then look at the number of

Re: problem with counting words

2014-10-12 Thread Colin Holgate
The dictionary clearly says that quoted strings are counted as a single word. If you wanted to work around that as an issue by using the itemDelimiter, you would then look at the number of items in the field, not the number of words. There’s a better option though, you can see how many truewords

problem with counting words

2014-10-12 Thread larry
Hello, I'm posting this to help any other poor saps who run into this insanity: I want to count the words in a field. I have: set the itemDel to space put the number of words of field "myTest" into field "myNumber" Here is what happens: I am testing the word count in LiveCode 6.1.1. Believ