Re: delete chunk.
Just tossing this out there, but I *love* this behavior. I'm sure there are situations where it's undesirable, but are easily compensated for by just adding another delimiter. Begin able to do the following is very handy and makes the code clean: put foo cr after fld x put bar cr after fld x put the number of lines of fld x Having that return 2 is extremely convenient. Agreed, but sometimes it's not convenient when you want to get the last item of a line; for example, if you have a container that holds columns for First Name (tab) Last Name (tab) Notes, and some lines have a note and some don't, you can't just set the itemDelimiter to tab and run through the container and get the last item or item -1 of the line to check if the person entered a note; if they didn't provide one, then check the last item will give you their Last Name instead. It would be great if there was a global setting that you could toggle it on in these circumstances, something like: put item -1 of Ken,Ray, == returns Ray set the dontIgnoreTrailingDelimiter to true put item -1 of Ken,Ray, == returns :-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Hi Ken, Just tossing this out there, but I *love* this behavior. I'm sure there are situations where it's undesirable, but are easily compensated for by just adding another delimiter. Begin able to do the following is very handy and makes the code clean: put foo cr after fld x put bar cr after fld x put the number of lines of fld x Having that return 2 is extremely convenient. Agreed, but sometimes it's not convenient when you want to get the last item of a line; for example, if you have a container that holds columns for First Name (tab) Last Name (tab) Notes, and some lines have a note and some don't, you can't just set the itemDelimiter to tab and run through the container and get the last item or item -1 of the line to check if the person entered a note; if they didn't provide one, then check the last item will give you their Last Name instead. It would be great if there was a global setting that you could toggle it on in these circumstances, something like: Yes, good idea! put item -1 of Ken,Ray, == returns Ray set the dontIgnoreTrailingDelimiter to true put item -1 of Ken,Ray, == returns But please no dontXYZ props anymore, they are SO counterintuitive! Don't you think that set the useqt to false is mentally a lot less challenging than set the dontuseqt to true??? :-D :-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ Best Klaus -- Klaus Major http://www.major-k.de kl...@major.on-rev.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 03/11/2010 04:41, J. Landman Gay wrote: Right. You can't have an empty last item, and if you try, the last delimiter is removed. There's a comment about it in the dictionary under item. You can have an empty last item - see the end of the email. But even without that special case, you can have a trailing delimiter - if you do this in the message box of LC 4.5 put a,b,c into t ; put empty into item -1 of t; put t then you get a,b, i.e. the trailing comma remains. If instead you say delete item -1 of temp then the trailing delimiter disappears. I guess it just *is* that way, and always has been. The problem is that the docs are completely wrong when they say delete /chunk/ of /container / is the same as put empty into /chunk/ of /container/ But it can be tricky to follow the logic. Here's a quiz without trying it :-) what do you get from put a,b,c into t put empty into the last item of t put empty into the last item of t put empty into the last item of t put t answer follows below You get a,, the first put empty ... removes c The second one removes b The third one does nothing - because the last item is empty. -- Alex. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
This seems perfectly intuitive to me. When you delete an item, you are doing something entirely different than just manipulating the contents of an item. In one case you reduce the number of items. In the other you merely insert, or remove, data from them.For example, a,b,,, has five items. Putting empty, or anything, into item 4, say, makes sense, and we have not changed the number of itms at all. I think it all may just be a misperception, having to do with the last item being perceived differently from an interior item. I'll bet this thread would not have started if the process had been: delete item 3 of a,b,,, put empty into item 3 of a,b,,, Craig Newman ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Actually, I think that's exactly the problem. a,b,,, has 4 items. The trailing , is ignored. a,b,,,e has 5 items. putting a space, or some type of invisible char after the trailing , makes it 5 items. It drives me nuts, if the comma is there it should designate a null item whether its in the middle or at the end. On Wed, Nov 3, 2010 at 7:43 AM, dunb...@aol.com wrote: This seems perfectly intuitive to me. When you delete an item, you are doing something entirely different than just manipulating the contents of an item. In one case you reduce the number of items. In the other you merely insert, or remove, data from them.For example, a,b,,, has five items. Putting empty, or anything, into item 4, say, makes sense, and we have not changed the number of itms at all. I think it all may just be a misperception, having to do with the last item being perceived differently from an interior item. I'll bet this thread would not have started if the process had been: delete item 3 of a,b,,, put empty into item 3 of a,b,,, Craig Newman ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 03/11/2010 13:43, dunb...@aol.com wrote: This seems perfectly intuitive to me. When you delete an item, you are doing something entirely different than just manipulating the contents of an item. In one case you reduce the number of items. In the other you merely insert, or remove, data from them. But manipulating the contents of an item does (can) change the number of items. put a,b,c into temp put temp the number of items in temp === a,b,c 3 put empty into the last item of temp put temp the number of items in temp === a,b, 2 -- Alex. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On Wed, Nov 3, 2010 at 1:23 AM, Alex Tweedly a...@tweedly.net wrote: Hmmm ... what should I get from put a,b,c into temp delete item -1 of temp I think temp should now have a,b, - i.e. the last item has disappeared, but the (now) trailing item delimiter should still be there. However, I actually get that temp has a,b - the last comma has also disappeared. The docs say that delete chunk of container is equivalent to put empty into chunk of container - but if I replace it so I do put a,b,c into temp put empty into item -1 of temp then I do indeed get a,b,. Feels like a bug, and I should put it into QCC - but it's late at night and I may be just missing something. Am I ? Thanks -- Alex. Alex, I have not followed all the thread but a synonym for: delete item -1 of temp is delete last item of temp See items like kind of containers. With a,b,c you have a group three boxes. By using: delete last item of temp you will removing completly the last box from the group And you will have as result 2 boxes: a,b However by using: put empty into last item of temp you will empty the last box, but the box will still exist: a,b, So not a bug but a natural way to use items in LC ;) Regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
I agree it would be great to be able to say set the payAttentionToTrailingDelimiters to true But in the meantime you can use the fact that doubling a trailing delimiter will be ignored. repeat for each line L in tData if the last item of (L the itemDel) is empty then -- deal with an empty one else -- use the last item of L which is not empty end if -- Alex. On 03/11/2010 12:52, Ken Ray wrote: Just tossing this out there, but I *love* this behavior. I'm sure there are situations where it's undesirable, but are easily compensated for by just adding another delimiter. Begin able to do the following is very handy and makes the code clean: put foo cr after fld x put bar cr after fld x put the number of lines of fld x Having that return 2 is extremely convenient. Agreed, but sometimes it's not convenient when you want to get the last item of a line; for example, if you have a container that holds columns for First Name (tab) Last Name (tab) Notes, and some lines have a note and some don't, you can't just set the itemDelimiter to tab and run through the container and get the last item or item -1 of the line to check if the person entered a note; if they didn't provide one, then check the last item will give you their Last Name instead. It would be great if there was a global setting that you could toggle it on in these circumstances, something like: put item -1 of Ken,Ray, == returns Ray set the dontIgnoreTrailingDelimiter to true put item -1 of Ken,Ray, == returns :-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Hi Alex, I am starting to agree with you that some of this becomes counterintuitive. Not hard to work around, but potentially confusing to a newcomer. I am in the habit of fastidiously making sure that my lists do not have a trailing delimiter, so I have not been plagued by this too much. a,b,,, should say that it contains five items (two characters and three empty items). If it does not, that is confusing. On Wed, Nov 3, 2010 at 10:25 AM, Alex Tweedly a...@tweedly.net wrote: I agree it would be great to be able to say set the payAttentionToTrailingDelimiters to true But in the meantime you can use the fact that doubling a trailing delimiter will be ignored. repeat for each line L in tData if the last item of (L the itemDel) is empty then -- deal with an empty one else -- use the last item of L which is not empty end if -- Alex. On 03/11/2010 12:52, Ken Ray wrote: Just tossing this out there, but I *love* this behavior. I'm sure there are situations where it's undesirable, but are easily compensated for by just adding another delimiter. Begin able to do the following is very handy and makes the code clean: put foo cr after fld x put bar cr after fld x put the number of lines of fld x Having that return 2 is extremely convenient. Agreed, but sometimes it's not convenient when you want to get the last item of a line; for example, if you have a container that holds columns for First Name (tab) Last Name (tab) Notes, and some lines have a note and some don't, you can't just set the itemDelimiter to tab and run through the container and get the last item or item -1 of the line to check if the person entered a note; if they didn't provide one, then check the last item will give you their Last Name instead. It would be great if there was a global setting that you could toggle it on in these circumstances, something like: put item -1 of Ken,Ray, == returns Ray set the dontIgnoreTrailingDelimiter to true put item -1 of Ken,Ray, == returns :-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- Do all things with love ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Yep, a delimiter should be a delimiter even if it delimits null. On Wed, Nov 3, 2010 at 8:32 AM, Jonathan Lynch jonathandly...@gmail.comwrote: Hi Alex, I am starting to agree with you that some of this becomes counterintuitive. Not hard to work around, but potentially confusing to a newcomer. I am in the habit of fastidiously making sure that my lists do not have a trailing delimiter, so I have not been plagued by this too much. a,b,,, should say that it contains five items (two characters and three empty items). If it does not, that is confusing. On Wed, Nov 3, 2010 at 10:25 AM, Alex Tweedly a...@tweedly.net wrote: I agree it would be great to be able to say set the payAttentionToTrailingDelimiters to true But in the meantime you can use the fact that doubling a trailing delimiter will be ignored. repeat for each line L in tData if the last item of (L the itemDel) is empty then -- deal with an empty one else -- use the last item of L which is not empty end if -- Alex. On 03/11/2010 12:52, Ken Ray wrote: Just tossing this out there, but I *love* this behavior. I'm sure there are situations where it's undesirable, but are easily compensated for by just adding another delimiter. Begin able to do the following is very handy and makes the code clean: put foo cr after fld x put bar cr after fld x put the number of lines of fld x Having that return 2 is extremely convenient. Agreed, but sometimes it's not convenient when you want to get the last item of a line; for example, if you have a container that holds columns for First Name (tab) Last Name (tab) Notes, and some lines have a note and some don't, you can't just set the itemDelimiter to tab and run through the container and get the last item or item -1 of the line to check if the person entered a note; if they didn't provide one, then check the last item will give you their Last Name instead. It would be great if there was a global setting that you could toggle it on in these circumstances, something like: put item -1 of Ken,Ray, == returns Ray set the dontIgnoreTrailingDelimiter to true put item -1 of Ken,Ray, == returns :-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- Do all things with love ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 11/3/10 9:00 AM, Mike Bonner wrote: Actually, I think that's exactly the problem. a,b,,, has 4 items. The trailing , is ignored. a,b,,,e has 5 items. putting a space, or some type of invisible char after the trailing , makes it 5 items. It drives me nuts, if the comma is there it should designate a null item whether its in the middle or at the end. Okay, then how many lines should be in: acr bcr ? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
In my opinion? it SHOULD say 3. 2 lines with stuff, and 1 blank. Of course it says 2, but this is the same reason people delete the last char of.. when doing things. If you fill a field with this cr that cr, and then click at the bottom of the field, your cursor goes to the blank line underneath the 2 lines with text. The line exists, it should be counted. Looking at it the other way, if you put fred into line 1 of field 1, put mike into line 2 of field 1, the cr is added between the 2 automatically, but there is no extra trailing line. There are 2 lines. Having text for line 1 cr empty for line 2 cr text for line 3, at that point, line 2 looks and acts exactly like line 2 would look and behave if there were no line 3. You can click in it, type in it, it acts like a line. And is counted as a line like it should be. If however it is a trailing empty line it is not counted. It's the same exact thing. A cr followed by empty. Simply adding another line after it shouldn't make it magically appear as a line. either it is or it isn't, at least so it seems to me. Having said all this, there is most likely a reason it is the way it is that I don't have enough knowledge to understand. As with removing trailing carriage returns, if it's a null item it isn't difficult to work around and i'm not sure I can come up with a valid reason for actually having an empty item, but that doesn't mean there isn't a use for it. /shrug As a last visual example, I have several spice bottles in my kitchen, some of which are empty. If I re-arrange them so that an empty one is on the end of the row it doesn't cease to exist, and it doesn't pop back in to being because i put it between 2 spice bottles that DO have contents. On Wed, Nov 3, 2010 at 9:20 AM, J. Landman Gay jac...@hyperactivesw.comwrote: On 11/3/10 9:00 AM, Mike Bonner wrote: Actually, I think that's exactly the problem. a,b,,, has 4 items. The trailing , is ignored. a,b,,,e has 5 items. putting a space, or some type of invisible char after the trailing , makes it 5 items. It drives me nuts, if the comma is there it should designate a null item whether its in the middle or at the end. Okay, then how many lines should be in: acr bcr ? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Tomato On Nov 3, 2010, at 8:41 AM, Mike Bonner wrote: In my opinion? it SHOULD say 3. 2 lines with stuff, and 1 blank. Of course it says 2, but this is the same reason people delete the last char of.. when doing things. If you fill a field with this cr that cr, and then click at the bottom of the field, your cursor goes to the blank line underneath the 2 lines with text. The line exists, it should be counted. Looking at it the other way, if you put fred into line 1 of field 1, put mike into line 2 of field 1, the cr is added between the 2 automatically, but there is no extra trailing line. There are 2 lines. Having text for line 1 cr empty for line 2 cr text for line 3, at that point, line 2 looks and acts exactly like line 2 would look and behave if there were no line 3. You can click in it, type in it, it acts like a line. And is counted as a line like it should be. If however it is a trailing empty line it is not counted. It's the same exact thing. A cr followed by empty. Simply adding another line after it shouldn't make it magically appear as a line. either it is or it isn't, at least so it seems to me. Having said all this, there is most likely a reason it is the way it is that I don't have enough knowledge to understand. As with removing trailing carriage returns, if it's a null item it isn't difficult to work around and i'm not sure I can come up with a valid reason for actually having an empty item, but that doesn't mean there isn't a use for it. /shrug As a last visual example, I have several spice bottles in my kitchen, some of which are empty. If I re-arrange them so that an empty one is on the end of the row it doesn't cease to exist, and it doesn't pop back in to being because i put it between 2 spice bottles that DO have contents. On Wed, Nov 3, 2010 at 9:20 AM, J. Landman Gay jac...@hyperactivesw.com wrote: On 11/3/10 9:00 AM, Mike Bonner wrote: Actually, I think that's exactly the problem. a,b,,, has 4 items. The trailing , is ignored. a,b,,,e has 5 items. putting a space, or some type of invisible char after the trailing , makes it 5 items. It drives me nuts, if the comma is there it should designate a null item whether its in the middle or at the end. Okay, then how many lines should be in: acr bcr ? -- Jacqueline Landman Gay Jim Ault Las Vegas ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 11/3/10 10:41 AM, Mike Bonner wrote: Having said all this, there is most likely a reason it is the way it is that I don't have enough knowledge to understand. As with removing trailing carriage returns, if it's a null item it isn't difficult to work around and i'm not sure I can come up with a valid reason for actually having an empty item, but that doesn't mean there isn't a use for it. /shrug It may be the difference between seeing the delimiter as a terminating character or as a dividing character. If you consider the comma or return as a terminator, then it is attached to the preceding string. If that entry is empty, there is nothing to terminate and the engine removes it. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
It helps if I think of it that way but in the case of empty items in the middle of a line it doesn't behave that way. Still terminates nothing, but is counted as an item. Despite all the conversation, I've never really run into it as a problem except when I was playing with merge one day. Had a string like [[item1]],[[item2]],[[item3]] and would merge it, and was lost when some of my items were empty, and the number of items would return different values based on which item was empty. Real confusing for a newbie when you can do if item 2 is empty then.. but not if the last item is empty when you expect there to be 3 items. The way it works currently, you can never check to see if the last item is empty because it never can be. If it is, it will check the next one to the left instead. I just changed how I do things so it's not a big deal. I got curious one day and did some tests. Building a long list (multi row/column) by looping and using put something into item # line # of tListImMaking was horrendously slow when compared to put whateveritemsyouneedonthisline return after tListImMaking, and then truncating the last return, so that eliminated a percentage of the things I was attempting and shoved me down different roads. On Wed, Nov 3, 2010 at 11:33 AM, J. Landman Gay jac...@hyperactivesw.comwrote: On 11/3/10 10:41 AM, Mike Bonner wrote: Having said all this, there is most likely a reason it is the way it is that I don't have enough knowledge to understand. As with removing trailing carriage returns, if it's a null item it isn't difficult to work around and i'm not sure I can come up with a valid reason for actually having an empty item, but that doesn't mean there isn't a use for it. /shrug It may be the difference between seeing the delimiter as a terminating character or as a dividing character. If you consider the comma or return as a terminator, then it is attached to the preceding string. If that entry is empty, there is nothing to terminate and the engine removes it. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
So think about this. If we only regard the delimiter as a delimiter between items (rather than a terminator), then how would we have a container with zero items? I mean, if 1 delimiter indicates the presence of two items, then zero delimiters would indicate one item. would an empty container have zero items, or one item that is empty? On Wed, Nov 3, 2010 at 1:33 PM, J. Landman Gay jac...@hyperactivesw.comwrote: On 11/3/10 10:41 AM, Mike Bonner wrote: Having said all this, there is most likely a reason it is the way it is that I don't have enough knowledge to understand. As with removing trailing carriage returns, if it's a null item it isn't difficult to work around and i'm not sure I can come up with a valid reason for actually having an empty item, but that doesn't mean there isn't a use for it. /shrug It may be the difference between seeing the delimiter as a terminating character or as a dividing character. If you consider the comma or return as a terminator, then it is attached to the preceding string. If that entry is empty, there is nothing to terminate and the engine removes it. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- Do all things with love ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Hmm. I get your point, and now I think I have a little bit of gray leaking out my left ear. If you look at it as if the delimiter is both an instigator AND a terminator, then if you have a var with , in it, it seems like it should be 2 empty (and pointless) items. I had been thinking that it could be considered an instigator only with an assumed delimiter before the first item, but then as you say, empty isn't empty, empty would be 1 empty item. This also explains why I will never ever write my own intepreter/compiler. Too many things I will never understand well enough. Love trying to get my head around things, failure to do so can be as educational as success if not more so. On Wed, Nov 3, 2010 at 11:56 AM, Jonathan Lynch jonathandly...@gmail.comwrote: So think about this. If we only regard the delimiter as a delimiter between items (rather than a terminator), then how would we have a container with zero items? I mean, if 1 delimiter indicates the presence of two items, then zero delimiters would indicate one item. would an empty container have zero items, or one item that is empty? On Wed, Nov 3, 2010 at 1:33 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 11/3/10 10:41 AM, Mike Bonner wrote: Having said all this, there is most likely a reason it is the way it is that I don't have enough knowledge to understand. As with removing trailing carriage returns, if it's a null item it isn't difficult to work around and i'm not sure I can come up with a valid reason for actually having an empty item, but that doesn't mean there isn't a use for it. /shrug It may be the difference between seeing the delimiter as a terminating character or as a dividing character. If you consider the comma or return as a terminator, then it is attached to the preceding string. If that entry is empty, there is nothing to terminate and the engine removes it. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- Do all things with love ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
I agree it would be great to be able to say set the payAttentionToTrailingDelimiters to true But in the meantime you can use the fact that doubling a trailing delimiter will be ignored. repeat for each line L in tData if the last item of (L the itemDel) is empty then -- deal with an empty one else -- use the last item of L which is not empty end if Thanks, Alex... that's something I do when I need to, but it seems like more of a workaround to me, which is why I'd rather have some kind of global setting I could turn on when I needed it. In some ways it's like like the wholematches... I don't believe we had that in HyperCard, so if you were trying to see if a whole something matched, you had to do slap the delimiters in front of and after everything, like: -- imagine field 1 has a CR-delimited list of different kinds of fruit if offset((cr pears cr),(cr tFruit cr)) 0 then... It's so much easier to say: set the wholeMatches to true if lineOffset(pear,tFruit) 0 then... Maybe we should call it the wholeChunks ? set the wholeChunks to true put item -1 of Ken,Ray, == returns ?? :-) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
delete chunk.
Hmmm ... what should I get from put a,b,c into temp delete item -1 of temp I think temp should now have a,b, - i.e. the last item has disappeared, but the (now) trailing item delimiter should still be there. However, I actually get that temp has a,b - the last comma has also disappeared. The docs say that delete chunk of container is equivalent to put empty into chunk of container - but if I replace it so I do put a,b,c into temp put empty into item -1 of temp then I do indeed get a,b,. Feels like a bug, and I should put it into QCC - but it's late at night and I may be just missing something. Am I ? Thanks -- Alex. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
These are different - item -1 containing empty is different than item -1 not existing It seems like it is behaving intuitively to me. The docs might be confusing, though. Sent from my Verizon Wireless BlackBerry -Original Message- From: Alex Tweedly a...@tweedly.net Sender: use-revolution-boun...@lists.runrev.com Date: Wed, 03 Nov 2010 00:23:08 To: Use Revolution Listuse-revolution@lists.runrev.com Reply-To: How to use Revolution use-revolution@lists.runrev.com Subject: delete chunk. Hmmm ... what should I get from put a,b,c into temp delete item -1 of temp I think temp should now have a,b, - i.e. the last item has disappeared, but the (now) trailing item delimiter should still be there. However, I actually get that temp has a,b - the last comma has also disappeared. The docs say that delete chunk of container is equivalent to put empty into chunk of container - but if I replace it so I do put a,b,c into temp put empty into item -1 of temp then I do indeed get a,b,. Feels like a bug, and I should put it into QCC - but it's late at night and I may be just missing something. Am I ? Thanks -- Alex. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 11/2/10 7:23 PM, Alex Tweedly wrote: Hmmm ... what should I get from put a,b,c into temp delete item -1 of temp I think temp should now have a,b, - i.e. the last item has disappeared, but the (now) trailing item delimiter should still be there. However, I actually get that temp has a,b - the last comma has also disappeared. That's correct. Removing the last chunk of any string also removes the delimiter. There have been many debates on whether this is correct or not, but it's been that way in every xtalk since the beginning. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
Also try put the number of items in a,b,c \ the number of items in a,b, \ the number of items in a,b On Nov 2, 2010, at 5:45 PM, J. Landman Gay wrote: On 11/2/10 7:23 PM, Alex Tweedly wrote: Hmmm ... what should I get from put a,b,c into temp delete item -1 of temp I think temp should now have a,b, - i.e. the last item has disappeared, but the (now) trailing item delimiter should still be there. However, I actually get that temp has a,b - the last comma has also disappeared. That's correct. Removing the last chunk of any string also removes the delimiter. There have been many debates on whether this is correct or not, but it's been that way in every xtalk since the beginning. -- Jacqueline Landman Gay Jim Ault Las Vegas ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 11/2/10 10:40 PM, Jim Ault wrote: Also try put the number of items in a,b,c \ the number of items in a,b, \ the number of items in a,b Right. You can't have an empty last item, and if you try, the last delimiter is removed. There's a comment about it in the dictionary under item. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On 11/2/10 11:41 PM, J. Landman Gay wrote: On 11/2/10 10:40 PM, Jim Ault wrote: Also try put the number of items in a,b,c \ the number of items in a,b, \ the number of items in a,b Right. You can't have an empty last item, and if you try, the last delimiter is removed. There's a comment about it in the dictionary under item. Meant to add: this is also consistent with the number of lines, where a trailing cr doesn't count either. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: delete chunk.
On Nov 2, 2010, at 10:44 PM, J. Landman Gay wrote: On 11/2/10 11:41 PM, J. Landman Gay wrote: On 11/2/10 10:40 PM, Jim Ault wrote: Also try put the number of items in a,b,c \ the number of items in a,b, \ the number of items in a,b Right. You can't have an empty last item, and if you try, the last delimiter is removed. There's a comment about it in the dictionary under item. Meant to add: this is also consistent with the number of lines, where a trailing cr doesn't count either. Just tossing this out there, but I *love* this behavior. I'm sure there are situations where it's undesirable, but are easily compensated for by just adding another delimiter. Begin able to do the following is very handy and makes the code clean: put foo cr after fld x put bar cr after fld x put the number of lines of fld x Having that return 2 is extremely convenient. Jeff M.___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution