Results 1 to 40 of 83

Thread: How much do you trust the Collection class?

Threaded View

  1. #8
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: How much do you trust the Collection class?

    Ahh yes, BASE32 or BASE64 is a good idea.

    Also, dilettante, you're right. I didn't think about control characters. Therefore, it'd be better if we added &h20 to get things off of them. The ChrW() would become:

    Code:
    ChrW(Int(CDbl(Rnd()) * CDbl(&HD7E0)) + &h20)
    I've never messed with it that much in VB6, but here's a link to a BASE64 encode/decode routine. I'm sure there are others, and I'd certainly test well before using any of these, but this would solve the problem of ucase/lcase and non-allowed characters. Using this, you could go back to the &h0 to &HFFFF range.

    EDIT1: Again, Donar, you haven't shown us a problem with Collections. What you have illustrated is that Collection keys are truly treated as strings of Unicode characters (and not just as bits). Therefore, we must be somewhat careful when constructing these strings to be used as keys.
    Last edited by Elroy; Aug 25th, 2016 at 09:55 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

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