hello,

I had read the following from the help, but i still do not understannd all. Do 
anyone tell the syntax,var[n] = expr,is vector?
thx



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 ? 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