Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any
New issue 75 by fabio.st...@gmail.com: Split function problem http://code.google.com/p/gambas/issues/detail?id=75 Split function problem Version: 2.21 Revision: Operating system: Linux Distribution: Ubuntu 11.05 Architecture: x86 GUI component: QT4 Desktop used: Gnome If I use Split on "1 2 3 4 5" DIM s AS String DIM sa AS String[] DIM i AS Integer s = "1 2 3 4 5" sa = NEW String[] sa = Split(s, " ") FOR i = 0 TO sa.length - 1 PRINT i, sa[i] NEXT the output is: 0 1 1 2 2 3 3 4 4 5 If I use Split on " 1 2 3 4 5" DIM s AS String DIM sa AS String[] DIM i AS Integer s = " 1 2 3 4 5" sa = NEW String[] sa = Split(s, " ") FOR i = 0 TO sa.length - 1 PRINT i, sa[i] NEXT the output is: 0....... 1 1 2 2 3 3 4 4 5 5 Regards Fabio Sturman ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user