Community
Participate
Working Groups
Build Identifier: 20110829 Nightly build Run the following program. The returned token is garbage. It also looks like the index is based on characters rather than bytes. program pgm type BasicProgram {} commandLine STRING = "CALL PROG1 arg1,arg2"; delimiters STRING = " ,"; // space and comma delimiters i INT = 1; max INT; token STRING? = ""; function main() max = 40; while( i < max) // i is updated below token = StrLib.getNextToken(commandLine, i, delimiters); SysLib.writeStdout(token); SysLib.writeStdout(i); end // while end end In EDT, I get: 5 [B@12ac982 11 [B@1389e4 16 [B@c20e24 21 egl.lang.InvalidIndexException egl.lang.InvalidIndexException In RBD, I get: CALL 9 PROG1 21 arg1 31 arg2 41 Reproducible: Always Steps to Reproduce: 1.See above 2. 3.
There were problems in several places, but they're all fixed now. The getNextToken in eglx.lang.StringLib (formerly StrLib) does use a character index not a byte index. The getNextToken in eglx.rbd.StrLib uses a byte index not a character index because that's the way RBD's StrLib works.
Verified 20110830