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
___
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: 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 the last character...

 I tried...
 put char 1 to last character of tdata into tsubstring
 ...but this fails.

 Thanks for any help!
 Warren
 ___
 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: 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 char 1 to last character of tdata into tsubstring
...but this fails.

Thanks for any help!
Warren
___
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

  


--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

___
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: 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.

 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 char 1 to last character of tdata into tsubstring
 ...but this fails.

 Thanks for any help!
 Warren
 ___
 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




 --
 Phil Davis

 PDS Labs
 Professional Software Development
 http://pdslabs.net

 ___
 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: 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 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.

 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 char 1 to last character of tdata into tsubstring
 ...but this fails.

 Thanks for any help!
 Warren
 ___
 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




 --
 Phil Davis

 PDS Labs
 Professional Software Development
 http://pdslabs.net

 ___
 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

___
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: 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 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 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.

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 char 1 to last character of tdata into tsubstring
...but this fails.

Thanks for any help!
Warren
___
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





--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

___
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



___
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

  


--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

___
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: 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 wanted must 
have the form:

char starNumber to endNumber... (like char 1 to 8)

You had a start number, but then had an end character. (like char 1 to w)

Craig Newman


In a message dated 8/26/09 1:41:25 PM, warrenk...@gmail.com writes:


 
 I tried...
 put char 1 to last character of tdata into tsubstring
 ...but this fails.
 
 

___
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