[reporter="elin", created="Thu, 21 Sep 2006 17:36:14 -0500 (GMT-05:00)"]
If calcVM is set to either auto or java, position function returns 0 instead of the correct position when the substring is at the end of the string.
-- to repro:
alter system set "calcVirtualMachine"='CALCVM_JAVA';
-- this returns 0
values position('tra' in 'fdgjklewrtra');
alter system set "calcVirtualMachine"='CALCVM_AUTO';
-- as does this, since it chooses to use the java calc
values posistion('tra' in 'fdgjklewrtra');
alter system set "calcVirtualMachine"='CALCVM_FENNEL';
-- but we get the right answer 10, here
values posistion('tra' in 'fdgjklewrtra');
[reporter="elin", created="Thu, 21 Sep 2006 17:36:14 -0500 (GMT-05:00)"] If calcVM is set to either auto or java, position function returns 0 instead of the correct position when the substring is at the end of the string.
-- to repro:
alter system set "calcVirtualMachine"='CALCVM_JAVA';
-- this returns 0
values position('tra' in 'fdgjklewrtra');
alter system set "calcVirtualMachine"='CALCVM_AUTO';
-- as does this, since it chooses to use the java calc
values posistion('tra' in 'fdgjklewrtra');
alter system set "calcVirtualMachine"='CALCVM_FENNEL';
-- but we get the right answer 10, here
values posistion('tra' in 'fdgjklewrtra');
related test: calc.funcStringCover