Results 1 to 5 of 5

Thread: [RESOLVED] array names algorithm

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2014
    Posts
    23

    Resolved [RESOLVED] array names algorithm

    I need to write an algorithm that can automatically read a string into up to 50 arrays. The name of each array is valuearray followed by the array number i.e. the 3rd array would be valuearray3()

    What i want to be able to do is write an alogrithm that reads the contents into each array without having to declare each array i.e.

    Dim valuearray1() as string = text
    Dim valuearray2() as string = text
    Dim valuearray3() as string = text
    ...
    Dim valuearray50() as string = text

    What i want is an algorithm that functions something like this:
    declarations
    Dim text As String = "String"
    Dim arrayindex As Intger
    Dim index As Integer

    Algorithm
    For index = 1 To 50
    "valuearray" + index + "(1)" = text
    arrayindex += 1
    Next index

    This algorithm would add the text "string" into the first index of each array from valuearray1 to valuearray50

    the only problem is that i don't know how code it in VB. It's be appreciated if you could help
    Last edited by BumpaPumpa; Jun 21st, 2015 at 02:33 AM.

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