len(right(number, 3))

FlexibleLearning at aol.com FlexibleLearning at aol.com
Wed Jan 26 04:23:11 EST 2005

>I searched "len" and got
>put char (length(it) - 3) to  (length(it)) of it into myExtension
>but don't understand what it  means.
1. A negative char means counting from the end, so char -3 means the third  
char from the end.
2. Len is short for 'length", or the total number of chars in the  string.
3. The above means put character starting at the total length of the string  
less 3, up to character the total length of the string into myExtension...  Or 
put the last 3 characters of the string into myExtension.
My guess is that the syntax is designed to demonstrate the length function  
rather than optimise the task. A simpler version of the example above would  be:
put char -3 to -1 of it into myExtension


More information about the Use-livecode mailing list