Results 1 to 7 of 7

Thread: 3 levels of 'split' string; 1 level not working

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2010
    Posts
    61

    3 levels of 'split' string; 1 level not working

    The attached code works, apart from the area between the 2 sets of "---------------" lines; specifically I think lines labelled 10 and 20.

    The highlighted area of code splits the text using " " as delimiter, then splits any remaining hyphenated words by "-" as delimiter, but retains the hyphen, on one or other of the resulting 'words'.

    The problem is that although it displays the correct words in InkEditBox 2, it overwrites the value of articleSpltArr(j) with the value of hyphenWordArr(1), and loses the original string value at that value of j. Not what I had in mind.

    I had thought that redimming the array as I have done would preserve the original value, add another string to the array, and make that one = hyphenWordArr(1). But this isnt what's happening.

    hyphenWord and hyphenWordArr only exist to help performing the split; they aren't needed for anything else.

    Short of putting hyphenWordArr(1) and articleSpltArr(j)'s values into a third array, what can I do to make this work properly?

    Attached code and test file, and rtf of form1.frm

    Thanks
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width