Beta 4.7.03 is available at

http://powerpro.webeddie.com/download/ppro4703.zip

One more itch.  var[n] syntax can be used to access or change nth 
character in string.  (If n is a non-integer string, it is still a 
regular expression call).

Zero-based indexing is used,  so I provided zero-based find and 
revfind and slice and deprecated index and revindex and select (which 
means they still work the same but are not documented as fully).

Also improved error messages to show call stack.

You can use the syntax var[n]  to reference a character in the string 
held by the variable and var[n,m] to represent an inclusive range.  
Here n and m represent any expression yielding an integer.  The first 
character is numbered 0.  For negative integers, -n is equivalent to 
length(var)-n (so –1 is the last character).  You can use

var[n] = expr

to replace the nth character in the string by the expr, which can be 
any length (including 0).  Samples: 

local var="abcde"
var[0]   // yields "a"
var[2,3]   // yields "cd"
var[-5,-2]   // yields "abcd"
var[3]="*" // sets var to abc*e
var[3]="123" // sets var to abc123e
var[1,4]="" // sets var to "a"


Reply via email to