Hi Bruce,
i think there is something wrong with the string-functions slice and
select. Can you please have a look at the following commands:
win.debug(slice("abcde",0,3)) //returns "abcd" - should be "abc"
win.debug(slice("abcde",1,3)) //returns "bcd" - correct
win.debug(slice("abcde",1,2)) //returns "bc" - correct
win.debug(slice("abcde",2,2)) //returns "c" - should be "cd"
If you run the following script, you will get some strange results.
Best regards Detlef
perform_select("12345678")
perform_select("ABCDEFGH")
;-------------------------------------------
function perform_select(f_string)
;-------------------------------------------
for(local i=1;i<=length(f_string);i++)
perform_select_loop(f_string,i)
endfor
quit
;-------------------------------------------
function perform_select_loop(f_string,f_from)
;-------------------------------------------
for(local l_length=1;((l_length+f_from-1)<=length
(f_string));l_length++)
local l_msg = ?~select("~++f_string++?
~",~++f_from++","++l_length++?~) ==> "~
win.debug(l_msg ++ select(f_string,f_from,l_length) ++ ?~"~)
endfor
quit