Determine last character of a variable

2009-08-26 Thread Warren Kuhl
This is probably a very stupid question.. I am trying to extract a substring from a variable and am unsure how to determine the last character... I tried... put char 1 to last character of tdata into tsubstring ...but this fails. Thanks for any help! Warren

Re: Determine last character of a variable

2009-08-26 Thread stephen barncard
put char 1 to -1 of tdata into tsubstring - Stephen Barncard San Francisco http://barncard.com 2009/8/26 Warren Kuhl warrenk...@gmail.com: This is probably a very stupid question.. I am trying to extract a substring from a variable and am unsure how to determine

Re: Determine last character of a variable

2009-08-26 Thread Phil Davis
Try char 1 to -1 of tdata. char -1 is the last char char -2 is the next-to-last char and so on. Phil Davis Warren Kuhl wrote: This is probably a very stupid question.. I am trying to extract a substring from a variable and am unsure how to determine the last character... I tried... put

Re: Determine last character of a variable

2009-08-26 Thread Warren Kuhl
Phil/Stephen, Thanks for your help! I never understood what the -1 meant when dealing with characters. Appreciate your quick responses! Warren On 8/26/09, Phil Davis rev...@pdslabs.net wrote: Try char 1 to -1 of tdata. char -1 is the last char char -2 is the next-to-last char and so on.

Re: Determine last character of a variable

2009-08-26 Thread stephen barncard
Also good for whitespace removal in some cases... put word 1 to -1 of whatever into tOutput - Stephen Barncard San Francisco http://barncard.com 2009/8/26 Warren Kuhl warrenk...@gmail.com: Phil/Stephen, Thanks for your help!  I never understood what the -1 meant

Re: Determine last character of a variable

2009-08-26 Thread Phil Davis
In my book, Rev's chunking capabilities are the 8th wonder of the modern world! Their usefulness defies description. Phil Davis stephen barncard wrote: Also good for whitespace removal in some cases... put word 1 to -1 of whatever into tOutput - Stephen Barncard San

Re: Determine last character of a variable

2009-08-26 Thread DunbarX
As Phil said, chunking is way cool, and might be what sets our favorite programming languages apart from all the others. HC had it because it did not support arrays and data structures. Chunking was an answer to that deficiency. You should make sure you understand that the construction you