Results 1 to 4 of 4

Thread: Sets (of the mathematical variety)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Sydney, Australia
    Posts
    74

    Smile

    is there any easy way that i can maintain a set of, say, strings, and be able to access them easily, possibly in order whilst ensuring uniquity (if that is a word)

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    databases, or arrays? I didn't fully understand what you wanted...

  3. #3
    Guest
    I dont know if this is what you wanted but you could use an Enumeration of strings:

    Code:
    Private Enum NameOfEnum
        String1 = "MyString1"
        String2 = "MyString2"
        String3 = "MyString3"
        String4 = "MyString4"
        String5 = "MyString5"
        String6 = "MyString6"
    End Enum
    
    Private Sub Form_Load()
        MsgBox NameOfEnum.String1
    End Sub

    they are pretty much constant, you cant change them.

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    I think that the ensuring uniqueness bit would be up to your code, either a 2D array or a UDT Array would do what you want I imagine, as would a collection.

    If you bound it up in a class you could have your own rules to ensure uniqueness
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

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