dynamobi/dynamobi — Issue #661: [FRG-211] Position function fails if substring is at end of string and java calc is used
Author: dynamobi-build
Created: 2011-12-30 03:41:50+00:00
State: open
Labels: FRG, Java Calc Codegen

[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